diff options
author | Dam Sunwoo <dam.sunwoo@arm.com> | 2014-01-24 15:29:30 -0600 |
---|---|---|
committer | Dam Sunwoo <dam.sunwoo@arm.com> | 2014-01-24 15:29:30 -0600 |
commit | 85e8779de78ed913bb6d2a794bee5252d719b0e5 (patch) | |
tree | 8ebd9519b4a6b0590c4d675061a0d1d4b43a1928 /src/mem/request.hh | |
parent | 739c6df94ea0030fea04065e6b8d8a1e232752a0 (diff) | |
download | gem5-85e8779de78ed913bb6d2a794bee5252d719b0e5.tar.xz |
mem: per-thread cache occupancy and per-block ages
This patch enables tracking of cache occupancy per thread along with
ages (in buckets) per cache blocks. Cache occupancy stats are
recalculated on each stat dump.
Diffstat (limited to 'src/mem/request.hh')
-rw-r--r-- | src/mem/request.hh | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/mem/request.hh b/src/mem/request.hh index 54b671645..fb21e3ff3 100644 --- a/src/mem/request.hh +++ b/src/mem/request.hh @@ -219,6 +219,11 @@ class Request */ Tick _time; + /** + * The task id associated with this request + */ + uint32_t _taskId; + /** The address space ID. */ int _asid; @@ -244,7 +249,8 @@ class Request * default constructor.) */ Request() - : translateDelta(0), accessDelta(0), depth(0) + : _taskId(ContextSwitchTaskId::Unknown), + translateDelta(0), accessDelta(0), depth(0) {} /** @@ -253,16 +259,19 @@ class Request * These fields are adequate to perform a request. */ Request(Addr paddr, int size, Flags flags, MasterID mid) + : _taskId(ContextSwitchTaskId::Unknown) { setPhys(paddr, size, flags, mid); } Request(Addr paddr, int size, Flags flags, MasterID mid, Tick time) + : _taskId(ContextSwitchTaskId::Unknown) { setPhys(paddr, size, flags, mid, time); } Request(Addr paddr, int size, Flags flags, MasterID mid, Tick time, Addr pc) + : _taskId(ContextSwitchTaskId::Unknown) { setPhys(paddr, size, flags, mid, time); privateFlags.set(VALID_PC); @@ -271,6 +280,7 @@ class Request Request(int asid, Addr vaddr, int size, Flags flags, MasterID mid, Addr pc, int cid, ThreadID tid) + : _taskId(ContextSwitchTaskId::Unknown) { setVirt(asid, vaddr, size, flags, mid, pc); setThreadContext(cid, tid); @@ -477,6 +487,17 @@ class Request return _masterId; } + uint32_t + taskId() const + { + return _taskId; + } + + void + taskId(uint32_t id) { + _taskId = id; + } + /** Accessor function for asid.*/ int getAsid() |