summaryrefslogtreecommitdiff
path: root/src/mem/comm_monitor.hh
diff options
context:
space:
mode:
authorRahul Thakur <rjthakur@google.com>2017-01-27 14:58:16 -0600
committerRahul Thakur <rjthakur@google.com>2017-01-27 14:58:16 -0600
commite9889c46edf8591b18d52dd27accb55457139537 (patch)
tree2726f6ac6c56853b8fde2679279ae9dfe3e072f8 /src/mem/comm_monitor.hh
parent32d05d5fb630bad6dddcfbbb65a3895a15187215 (diff)
downloadgem5-e9889c46edf8591b18d52dd27accb55457139537.tar.xz
mem: Refactor CommMonitor stats, add basic atomic mode stats
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/mem/comm_monitor.hh')
-rw-r--r--src/mem/comm_monitor.hh24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/mem/comm_monitor.hh b/src/mem/comm_monitor.hh
index 5ccce8037..28c8ec7a1 100644
--- a/src/mem/comm_monitor.hh
+++ b/src/mem/comm_monitor.hh
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2012-2013, 2015 ARM Limited
- * All rights reserved
+ * Copyright (c) 2016 Google Inc.
+ * All rights reserved.
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
@@ -36,6 +37,7 @@
*
* Authors: Thomas Grass
* Andreas Hansson
+ * Rahul Thakur
*/
#ifndef __MEM_COMM_MONITOR_HH__
@@ -357,6 +359,12 @@ class CommMonitor : public MemObject
/** Disable flag for address distributions. */
bool disableAddrDists;
+ /** Address mask for sources of read accesses to be captured */
+ const Addr readAddrMask;
+
+ /** Address mask for sources of write accesses to be captured */
+ const Addr writeAddrMask;
+
/**
* Histogram of number of read accesses to addresses over
* time.
@@ -385,9 +393,15 @@ class CommMonitor : public MemObject
outstandingReadReqs(0), outstandingWriteReqs(0),
disableTransactionHists(params->disable_transaction_hists),
readTrans(0), writeTrans(0),
- disableAddrDists(params->disable_addr_dists)
+ disableAddrDists(params->disable_addr_dists),
+ readAddrMask(params->read_addr_mask),
+ writeAddrMask(params->write_addr_mask)
{ }
+ void updateReqStats(const ProbePoints::PacketInfo& pkt, bool is_atomic,
+ bool expects_response);
+ void updateRespStats(const ProbePoints::PacketInfo& pkt, Tick latency,
+ bool is_atomic);
};
/** This function is called periodically at the end of each time bin */
@@ -406,12 +420,6 @@ class CommMonitor : public MemObject
/** Sample period in seconds */
const double samplePeriod;
- /** Address mask for sources of read accesses to be captured */
- const Addr readAddrMask;
-
- /** Address mask for sources of write accesses to be captured */
- const Addr writeAddrMask;
-
/** @} */
/** Instantiate stats */