Please ignore. Resolved with adding the m5ops.S file in gcc command line On Thu, Jan 26, 2023 at 12:52 AM Preet Derasari <preetderas...@gmail.com> wrote:
> Hi Ayan, > > Can you show how you have coded the m5_dump_stats and m5_reset_stats? > > I would also recommend using multiple m5_dump_reset_stats(0,0) commands if > you just want to print the statistics for a specific code regions. > > Also did you correctly compile the m5utils as described here?: > https://www.gem5.org/documentation/general_docs/m5ops/ > (refer to the "Linking M5 to your C/C++ code" section in there for more > details) > > Thanks. > > (resending with reply to all) > > On Wed, Jan 25, 2023 at 12:16 PM Ayan Ray via gem5-users < > gem5-users@gem5.org> wrote: > >> Hi , >> >> I have used m5_dump_stats and reset_stats in the cpp file. But when i >> compile with below command still it complains , included the m5ops.h too : >> >> #include <iostream> >> #include "gem5/m5ops.h" >> >> g++ -static -I include -o test test.cpp >> >> test.cpp:(.text+0xca): undefined reference to `m5_dump_stats' >> test.cpp:(.text+0xd9): undefined reference to `m5_reset_stats' >> test.cpp:(.text+0xfa): undefined reference to `m5_dump_stats' >> collect2: error: ld returned 1 exit status >> >> Might be something basic , can anybody please help quickly ? >> >> Thanks >> _______________________________________________ >> gem5-users mailing list -- gem5-users@gem5.org >> To unsubscribe send an email to gem5-users-le...@gem5.org >> >
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org