Hi Bhaskar, There are a few steps you need to take, and it involves a few widely-adopted gem5 concepts:
- First, the stack distance calculator is a probe, and the output is in the shape of gem5 stats. Thus, you need to instantiate the probe, and attach it to a probe point. - Second, to be able to attach the probe in various locations in the memory system (core to L1, before the L2, in front of the system memory), we use a module called a CommMonitor, which has a bunch of generic stats, but also suitable packet probe points. Consequently, you need to modify your script that assembles and configures the system, in your case se.py, and instantiate a CommMonitor, connect it where you want to monitor the communication, then instantiate a StackDistProbe and attach it to the monitor you just instantiated. The bad news is that it involves quite a few steps. The good news is that these are all things you will need to do as a gem5 user in any case, so better get used to it :-). For an example, have a look at one of the regression scripts, tests/config/tgen-simple-mem.py. This script includes both trace generation, and calculation of stack distance. Note that you don’t need to set "verify = True" on the StackDistProbe. If you do you will calculate the stack distance both using a clever algorithm, and a “naïve” stack which is a lot slower. Andreas From: gem5-users <gem5-users-boun...@gem5.org<mailto:gem5-users-boun...@gem5.org>> on behalf of Bhaskar Kalita <bhaskark...@gmail.com<mailto:bhaskark...@gmail.com>> Reply-To: gem5 users mailing list <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> Date: Sunday, 1 November 2015 at 22:08 To: "gem5-users@gem5.org<mailto:gem5-users@gem5.org>" <gem5-users@gem5.org<mailto:gem5-users@gem5.org>> Subject: [gem5-users] How to use stack distance calculator in gem5. Hi I am Bhaskar. I am a final year B.E student. For my final year project I am using the gem5 simulator. I need to collect the stack distance of programs using gem5. I used the --debug-flag="StackDist", but it did not print anything. I also tried setting the verifyStack flag in mem/stack_dist_calc.hh to true as: // Flag to enable verification of stack. (Slows down the simulation) const bool verifyStack=true; but it did not work too. For reference this is the command line am usuing: build/X86/gem5.debug --debug-flag='StackDist' --debug-file='sdp.trc.gz' --stats-file=forij.txt --dump-config=for.ini --json-config=for.json configs/example/se.py --num-cpus=1 --cpu-type=DerivO3CPU --caches --l1i_size=32kB --l1d_size=32kB --l2cache --num-l2caches=1 --l2_size=256kB --l2_assoc=4 -c "bench/x86/forij;" Can you please guide me through my problem and tell me to do the necessary steps. Thanks for your support -Bhaskar ________________________________ -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users