Review Board 2.0.15


WorkItems: Enables run time sampling for code marked using pseudo insts.

Review Request #932 - Created Dec. 16, 2011 and submitted

Information
Ali Saidi
gem5
Reviewers
Default
WorkItems: Enables run time sampling for code marked using pseudo insts.

Enhances histogram stat to report geometric mean.
Adds mechanism to collect run time samples for specific portions of a benchmark,
using work_begin and work_end pseudo instructions.

   
Ship it!
Posted (Jan. 4, 2012, 6:53 a.m.)
1) Why not add harmonic mean while you're at it?
2) I'd rather see these sorts of stats changes separate, but I won't insist.
3) I have no idea how much these stats are used.  Does adding a log() to every sample affect performance much?  Is the log() necessary?  These are floating point numbers, so can't you just multiply them out?  I'm not sure how hard it would be to compare m5.prof of one moderately complex run (O3 + cache hierarchy + a SPEC benchmark), but if it's not too hard, it might be worth a check.  (I'd certainly prefer to just have the code in there since it is useful.)  Again, I won't insist.
src/base/stats/text.cc (Diff revision 1)
 
 
how about just gmean.
src/sim/system.hh (Diff revision 1)
 
 
inline keyword is unnecessary inside a class body.
return value should be on its own line. below too.
Posted (Jan. 4, 2012, 11:51 a.m.)
How does this relate to the existing work item code?  It seems a little odd that the old code kept only per-CPU stats but the new code keeps only per system stats.  Are these logically independent things that just happen to use the same pseudo-insts?
  1. The old code doesn't  keep at per-cpu stats. It doesn't keep any stats at all. All it's used for is existing the simulator for checkpoints or after a certain number of work items have been completed.