summaryrefslogtreecommitdiff
path: root/src/sim/system.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2012-01-16 04:27:10 -0800
committerGabe Black <gblack@eecs.umich.edu>2012-01-16 04:27:10 -0800
commitda2a4acc26ba264c3c4a12495776fd6a1c4fb133 (patch)
treef142100388b9d1403492c97b0d323728ce18ef8a /src/sim/system.hh
parent241cc0c8402f1b9f2ec20d1cc152d96930959b2a (diff)
parenta7394ad6807bd5e85f680184bf308673ca00534a (diff)
downloadgem5-da2a4acc26ba264c3c4a12495776fd6a1c4fb133.tar.xz
Merge yet again with the main repository.
Diffstat (limited to 'src/sim/system.hh')
-rw-r--r--src/sim/system.hh14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/sim/system.hh b/src/sim/system.hh
index 00d8360e0..d675eb727 100644
--- a/src/sim/system.hh
+++ b/src/sim/system.hh
@@ -157,14 +157,16 @@ class System : public SimObject
Enums::MemoryMode memoryMode;
uint64_t workItemsBegin;
uint64_t workItemsEnd;
+ uint32_t numWorkIds;
std::vector<bool> activeCpus;
public:
+ virtual void regStats();
/**
* Called by pseudo_inst to track the number of work items started by this
* system.
*/
- uint64_t
+ uint64_t
incWorkItemsBegin()
{
return ++workItemsBegin;
@@ -198,6 +200,14 @@ class System : public SimObject
return count;
}
+ inline void workItemBegin(uint32_t tid, uint32_t workid)
+ {
+ std::pair<uint32_t,uint32_t> p(tid, workid);
+ lastWorkItemStarted[p] = curTick();
+ }
+
+ void workItemEnd(uint32_t tid, uint32_t workid);
+
/**
* Fix up an address used to match PCs for hooking simulator
* events on to target function executions. See comment in
@@ -285,6 +295,8 @@ class System : public SimObject
public:
Counter totalNumInsts;
EventQueue instEventQueue;
+ std::map<std::pair<uint32_t,uint32_t>, Tick> lastWorkItemStarted;
+ std::map<uint32_t, Stats::Histogram*> workItemStats;
////////////////////////////////////////////
//