One possibility is to instrument the benchmark with gem5 magic
instructions (the same instructions that m5 dumpstats ends up
calling).

Parsec in particular already has instrumentation stubs called
__parsec_roi_begin(), which you can implement for gem5 as shown at:
https://github.com/arm-university/arm-gem5-rsk/blob/aa3b51b175a0f3b6e75c9c856092ae0c8f2a7cdc/parsec_patches/xcompile-patch.diff#L221

This basically makes gem5 run magic escape instructions, which is
basically what "m5 checkpoint" does in the background.

You could then add such a dump point inside the outer main loop of the
application. This would give more structured per-loop stats rather
than dumping every n cycles, which might be more useful.

I've also asked the "dump every N cycles" option at:
https://stackoverflow.com/questions/49109766/how-to-make-checkpoints-periodically-every-n-cpu-cycle-clock-ticks-in-gem5

On Sat, Mar 3, 2018 at 5:08 PM, Xin Zhan <[email protected]> wrote:
> Dear all,
>
> I need to periodically dump stats when running benchmark in order to compute
> run-time power using McPAT. The command I am using is dumpresetstats [delay
> [period]] and the script:
>
> #!/bin/sh
> # Script to run the x264 benchmark
> cd parsec
> /sbin/m5 dumpresetstats 0 1000
> ./run x264 simsmall 4
> m5 exit
>
> However, the output stats.txt will be too large for the entire benchmark
> (could be over 100G when the dumping period is set to be 1us). So, I wonder
> if there is a way to dump stats periodically only after a certain preset
> point? For example, start to periodically dump stats only after 1s during
> the runtime. Anyone has any idea about how to control it?
>
> Thanks in advance!
> Xin
>
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to