summaryrefslogtreecommitdiff
path: root/src/mem/comm_monitor.hh
diff options
context:
space:
mode:
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 */