Hi Sampad, Here is where m5_reset_stats is implemented in the simulator: https://gem5.googlesource.com/public/gem5/+/refs/heads/stable/src/sim/pseudo_inst.cc#303
There are a large number of steps between when the guest code calls m5_reset_stats and when the above function executes, but this should help you start hacking :). Cheers, Jason On Sat, Oct 2, 2021 at 4:05 AM Sampad Mohapatra via gem5-users < gem5-users@gem5.org> wrote: > Hi All, > > I need to set a bool variable in src/cpu/simple/base.(hh|cc) to be true > when m5_reset_stats() is *explicitly *called from some binary executing > on gem5. Using this bool and instruction count, I want to exit the > simulation. > > How can I modify the body (hack) of m5_reset_stats() to call other > functions ? Where is its body defined ? > If not possible, then is there any alternative way to set the bool > variable when m5_reset_stats() is *explicitly* called ? > > Thank You, > Sampad Mohapatra > > > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-le...@gem5.org > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s