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

Reply via email to