Hello, I believe, you can use "m5_reset_stats" in SE mode, in your program. You may want to check util/m5/m5op.h and other related files in util/m5 directory.
Cheers Serhat ________________________________________ From: gem5-users [gem5-users-boun...@gem5.org] on behalf of Summer Deng [csummer...@gmail.com] Sent: 15 March 2017 16:18 To: gem5 users mailing list Subject: Re: [gem5-users] reset stats counters Thanks for your answer! But I am running gem5 in SE mode. I believe the m5op.h libraries can only be used in FS mode. I found some functions(e.g. statdump, statreset) in src/sim/stat_control.hh. Do you know whether these function will do that? How should I call these functions? Thank you! Best, Summer On Mar 15, 2017, at 11:14 AM, Ferran Olid <ferran.o...@metempsy.com> wrote: > Hi Summer, > > There's a library in /src/python/m5 called m5op.h that you can use in > your benchmark to reset stats after N ticks. I am not quite sure if you > can call it from the cpu source code. You can also call it in the > /configs/common/Simulation.py file, although you may need to play a bit > with m5.simulate in order to reset the stats after some ticks or > instructions. > > Hope this helped, > Ferran O. > > > On 15/03/17 16:45, Summer Deng wrote: >> Thank you for your answer. My real question is about the stat reset >> function. What is that function? Can I call that function in the cpu code >> (src/cpu/o3/cpu.cc)? >> >> Thanks! >> Best, >> Summer >> On Mar 14, 2017, at 8:08 PM, Wei Shu <wxs0...@louisiana.edu> wrote: >> >>> Find the global variable of instruction count and make a if condition test >>> in your code. >>> >>> ----- Original Message ----- >>> From: "Summer Deng" <csummer...@gmail.com> >>> To: gem5-users@gem5.org >>> Sent: Tuesday, March 14, 2017 5:06:29 PM >>> Subject: [gem5-users] reset stats counters >>> >>> Hi everyone, >>> >>> Does anyone know how to reset gem5 stats after the execution has started, >>> say after 1K instructions, ? >>> >>> Thank you very much! >>> Best, >>> Summer >>> _______________________________________________ >>> gem5-users mailing list >>> gem5-users@gem5.org >>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >>> _______________________________________________ >>> gem5-users mailing list >>> gem5-users@gem5.org >>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >> _______________________________________________ >> gem5-users mailing list >> gem5-users@gem5.org >> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users > > > _______________________________________________ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users _______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users _______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users