diff options
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/base.cc | 10 | ||||
-rw-r--r-- | src/cpu/base.hh | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/cpu/base.cc b/src/cpu/base.cc index b7decaec1..17ae65793 100644 --- a/src/cpu/base.cc +++ b/src/cpu/base.cc @@ -255,6 +255,16 @@ BaseCPU::regStats() .desc("number of cpu cycles simulated") ; + numWorkItemsStarted + .name(name() + ".numWorkItemsStarted") + .desc("number of work items this cpu started") + ; + + numWorkItemsCompleted + .name(name() + ".numWorkItemsCompleted") + .desc("number of work items this cpu completed") + ; + int size = threadContexts.size(); if (size > 1) { for (int i = 0; i < size; ++i) { diff --git a/src/cpu/base.hh b/src/cpu/base.hh index bea15aa08..a56f3db24 100644 --- a/src/cpu/base.hh +++ b/src/cpu/base.hh @@ -104,6 +104,8 @@ class BaseCPU : public MemObject inline Tick ticks(int numCycles) const { return clock * numCycles; } inline Tick curCycle() const { return curTick() / clock; } inline Tick tickToCycles(Tick val) const { return val / clock; } + inline void workItemBegin() { numWorkItemsStarted++; } + inline void workItemEnd() { numWorkItemsCompleted++; } // @todo remove me after debugging with legion done Tick instCount() { return instCnt; } @@ -317,6 +319,8 @@ class BaseCPU : public MemObject public: // Number of CPU cycles simulated Stats::Scalar numCycles; + Stats::Scalar numWorkItemsStarted; + Stats::Scalar numWorkItemsCompleted; }; #endif // __CPU_BASE_HH__ |