Hi, I am sure there are much better ways to do this but so far there are not any other suggestions.
One solution could be creating an event and scheduling it to monitor the number of misses. When the number reaches N, exitSimLoop exits the simulation with a cause, such as "Encountered N misses". Then, on Simulation.py, you can check the cause. If it is for the misses, you can dump the stats and continue the simulation. I have not tried this solution myself, it is just an idea. So if there is anything wrong with it, hopefully someone with more experience can point out and suggest a better way. Here are the relevant chapters of Learning gem5: Event-driven programming: https://www.gem5.org/documentation/learning_gem5/part2/events/ Adding parameters to SimObjects and more events: https://www.gem5.org/documentation/learning_gem5/part2/parameters/ Serhat ________________________________ From: gem5-users [gem5-users-boun...@gem5.org] on behalf of Rosen Lu [wisdom....@gmail.com] Sent: 14 March 2020 21:59 To: gem5 users mailing list Subject: [gem5-users] dump stats for every N misses Hello everyone, I know that we can call periodStatDump() in se.py to dump stats for every N cycles. Now I want to dump starts for every N misses, define the period with the number of misses. Does gem5 has any function to support that? Any ideas or suggestions would be helpful. Thank you very much. Rosen
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users