Hi all,

I want to dump the statistics periodically based on the fixed
number of instructions. I already followed the following post:

http://www.mail-archive.com/[email protected]/msg07544.html

and this is the code I use in Simulation.py for periodic
dumping (this code works in gem5-master version):

testsys.cpu[0].scheduleInstStop(0,
#instructions_upto_ROI, "dump statistics")
event =
m5.simulate()
if
event.getCause() == "dump statistics":
     m5.stats.dump()
     m5.stats.reset()
else
     pass
 
for n in
range(#periods):     testsys.cpu[0].scheduleInstStop(0, 
#instructions_per_period, "dump
statistics") 
     event = m5.simulate()
     if event.getCause() ==
"dump statistics":
         m5.stats.dump()
        m5.stats.reset()
      else:
          pass
 
According to this code, gem5 dumps the stats up to ROI and then dumps
stats periodically inside the ROI. However this code works only for one core. I
have tried using the following code in case of multiple cores:
 
for i in xrange(np):
   testsys.cpu[i].scheduleInstStop(0,
#instructions_upto_ROI, "dump statistics")
   event = m5.simulate()
   if event.getCause() == "dump
statistics":
       m5.stats.dump()
       m5.stats.reset()
   else
       pass
 
for i in xrange(np):
  for n in
range(#periods):      testsys.cpu[i].scheduleInstStop(0, 
#instructions_per_period, "dump
statistics") 
      event = m5.simulate()
      if event.getCause() ==
"dump statistics":
          m5.stats.dump()
          m5.stats.reset()
       else:
          pass
 
where 'np' is the number of cores (-n option in the command line). Using this 
code, the simulation goes into infinite loop and it does not dump the stats 
periodically for any of the cores. 
 
Can anybody please tell me how should I change the above code to get the 
instruction-based
periodic dumping for multiple cores?
 
Thank you very much,
Shervin
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to