diff options
author | Prakash Ramrakhyani <Prakash.Ramrakhyani@arm.com> | 2012-01-09 18:08:20 -0600 |
---|---|---|
committer | Prakash Ramrakhyani <Prakash.Ramrakhyani@arm.com> | 2012-01-09 18:08:20 -0600 |
commit | 51aa7e4a0392d5e8f98bd7a4d09f4026dd21bd0a (patch) | |
tree | 4a93fd0bdfd9e4403053e10ac329500649216f08 /src/sim/pseudo_inst.cc | |
parent | 525d1e46dcb3180c8d73996adc025ce255575bd7 (diff) | |
download | gem5-51aa7e4a0392d5e8f98bd7a4d09f4026dd21bd0a.tar.xz |
sim: Enable sampling of run-time for code-sections marked using pseudo insts.
This patch adds a mechanism to collect run time samples for specific portions
of a benchmark, using work_begin and work_end pseudo instructions.It also enhances
the histogram stat to report geometric mean.
Diffstat (limited to 'src/sim/pseudo_inst.cc')
-rw-r--r-- | src/sim/pseudo_inst.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc index 2062dfb8c..647420ca1 100644 --- a/src/sim/pseudo_inst.cc +++ b/src/sim/pseudo_inst.cc @@ -383,6 +383,7 @@ workbegin(ThreadContext *tc, uint64_t workid, uint64_t threadid) tc->getCpuPtr()->workItemBegin(); System *sys = tc->getSystemPtr(); const System::Params *params = sys->params(); + sys->workItemBegin(threadid, workid); DPRINTF(WorkItems, "Work Begin workid: %d, threadid %d\n", workid, threadid); @@ -439,6 +440,7 @@ workend(ThreadContext *tc, uint64_t workid, uint64_t threadid) tc->getCpuPtr()->workItemEnd(); System *sys = tc->getSystemPtr(); const System::Params *params = sys->params(); + sys->workItemEnd(threadid, workid); DPRINTF(WorkItems, "Work End workid: %d, threadid %d\n", workid, threadid); |