I would suggest using DPRINTF instead of cout. It's possible that some print statements aren't being flushed.
Jason On Mon, Oct 11, 2021 at 7:16 AM Sampad Mohapatra <[email protected]> wrote: > Hi Jason, > > I have added a std::cout statement to the resetstats()'s body and I am > calling m5_reset_stats from my GPU benchmarks. > The GPU kernels are launched right after reset is called. I pipe the > output of simulations to a file. But, strangely enough > some outputs show the std::cout statements while others don't. What could > be the reason ? > > Thanks, > Sampad > > On Mon, Oct 4, 2021 at 12:08 PM Jason Lowe-Power <[email protected]> > wrote: > >> 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 < >> [email protected]> 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 -- [email protected] >>> To unsubscribe send an email to [email protected] >>> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s >> >>
_______________________________________________ gem5-users mailing list -- [email protected] To unsubscribe send an email to [email protected] %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
