comm_monitor.hh (13892:0182a0601f66) | comm_monitor.hh (14208:1c8f93faf08f) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2012-2013, 2015, 2018 ARM Limited | 2 * Copyright (c) 2012-2013, 2015, 2018-2019 ARM Limited |
3 * Copyright (c) 2016 Google Inc. 4 * Copyright (c) 2017, Centre National de la Recherche Scientifique 5 * All rights reserved. 6 * 7 * The license below extends only to copyright in the software and shall 8 * not be construed as granting a license to any other intellectual 9 * property including but not limited to intellectual property relating 10 * to a hardware implementation of the functionality of the software --- 64 unchanged lines hidden (view full) --- 75 /** 76 * Constructor based on the Python params 77 * 78 * @param params Python parameters 79 */ 80 CommMonitor(Params* params); 81 82 void init() override; | 3 * Copyright (c) 2016 Google Inc. 4 * Copyright (c) 2017, Centre National de la Recherche Scientifique 5 * All rights reserved. 6 * 7 * The license below extends only to copyright in the software and shall 8 * not be construed as granting a license to any other intellectual 9 * property including but not limited to intellectual property relating 10 * to a hardware implementation of the functionality of the software --- 64 unchanged lines hidden (view full) --- 75 /** 76 * Constructor based on the Python params 77 * 78 * @param params Python parameters 79 */ 80 CommMonitor(Params* params); 81 82 void init() override; |
83 void regStats() override; | |
84 void startup() override; 85 void regProbePoints() override; 86 87 public: // SimObject interfaces 88 Port &getPort(const std::string &if_name, 89 PortID idx=InvalidPortID) override; 90 91 private: --- 178 unchanged lines hidden (view full) --- 270 271 void recvRespRetry(); 272 273 void recvRangeChange(); 274 275 bool tryTiming(PacketPtr pkt); 276 277 /** Stats declarations, all in a struct for convenience. */ | 83 void startup() override; 84 void regProbePoints() override; 85 86 public: // SimObject interfaces 87 Port &getPort(const std::string &if_name, 88 PortID idx=InvalidPortID) override; 89 90 private: --- 178 unchanged lines hidden (view full) --- 269 270 void recvRespRetry(); 271 272 void recvRangeChange(); 273 274 bool tryTiming(PacketPtr pkt); 275 276 /** Stats declarations, all in a struct for convenience. */ |
278 struct MonitorStats | 277 struct MonitorStats : public Stats::Group |
279 { | 278 { |
280 | |
281 /** Disable flag for burst length histograms **/ 282 bool disableBurstLengthHists; 283 284 /** Histogram of read burst lengths */ 285 Stats::Histogram readBurstLengthHist; 286 287 /** Histogram of write burst lengths */ 288 Stats::Histogram writeBurstLengthHist; 289 290 /** Disable flag for the bandwidth histograms */ 291 bool disableBandwidthHists; 292 293 /** 294 * Histogram for read bandwidth per sample window. The 295 * internal counter is an unsigned int rather than a stat. 296 */ 297 unsigned int readBytes; 298 Stats::Histogram readBandwidthHist; | 279 /** Disable flag for burst length histograms **/ 280 bool disableBurstLengthHists; 281 282 /** Histogram of read burst lengths */ 283 Stats::Histogram readBurstLengthHist; 284 285 /** Histogram of write burst lengths */ 286 Stats::Histogram writeBurstLengthHist; 287 288 /** Disable flag for the bandwidth histograms */ 289 bool disableBandwidthHists; 290 291 /** 292 * Histogram for read bandwidth per sample window. The 293 * internal counter is an unsigned int rather than a stat. 294 */ 295 unsigned int readBytes; 296 Stats::Histogram readBandwidthHist; |
299 Stats::Formula averageReadBW; | |
300 Stats::Scalar totalReadBytes; | 297 Stats::Scalar totalReadBytes; |
298 Stats::Formula averageReadBandwidth; |
|
301 302 /** 303 * Histogram for write bandwidth per sample window. The 304 * internal counter is an unsigned int rather than a stat. 305 */ 306 unsigned int writtenBytes; 307 Stats::Histogram writeBandwidthHist; | 299 300 /** 301 * Histogram for write bandwidth per sample window. The 302 * internal counter is an unsigned int rather than a stat. 303 */ 304 unsigned int writtenBytes; 305 Stats::Histogram writeBandwidthHist; |
308 Stats::Formula averageWriteBW; | |
309 Stats::Scalar totalWrittenBytes; | 306 Stats::Scalar totalWrittenBytes; |
307 Stats::Formula averageWriteBandwidth; |
|
310 311 /** Disable flag for latency histograms. */ 312 bool disableLatencyHists; 313 314 /** Histogram of read request-to-response latencies */ 315 Stats::Histogram readLatencyHist; 316 317 /** Histogram of write request-to-response latencies */ --- 66 unchanged lines hidden (view full) --- 384 */ 385 Stats::SparseHistogram writeAddrDist; 386 387 /** 388 * Create the monitor stats and initialise all the members 389 * that are not statistics themselves, but used to control the 390 * stats or track values during a sample period. 391 */ | 308 309 /** Disable flag for latency histograms. */ 310 bool disableLatencyHists; 311 312 /** Histogram of read request-to-response latencies */ 313 Stats::Histogram readLatencyHist; 314 315 /** Histogram of write request-to-response latencies */ --- 66 unchanged lines hidden (view full) --- 382 */ 383 Stats::SparseHistogram writeAddrDist; 384 385 /** 386 * Create the monitor stats and initialise all the members 387 * that are not statistics themselves, but used to control the 388 * stats or track values during a sample period. 389 */ |
392 MonitorStats(const CommMonitorParams* params) : 393 disableBurstLengthHists(params->disable_burst_length_hists), 394 disableBandwidthHists(params->disable_bandwidth_hists), 395 readBytes(0), writtenBytes(0), 396 disableLatencyHists(params->disable_latency_hists), 397 disableITTDists(params->disable_itt_dists), 398 timeOfLastRead(0), timeOfLastWrite(0), timeOfLastReq(0), 399 disableOutstandingHists(params->disable_outstanding_hists), 400 outstandingReadReqs(0), outstandingWriteReqs(0), 401 disableTransactionHists(params->disable_transaction_hists), 402 readTrans(0), writeTrans(0), 403 disableAddrDists(params->disable_addr_dists), 404 readAddrMask(params->read_addr_mask), 405 writeAddrMask(params->write_addr_mask) 406 { } | 390 MonitorStats(Stats::Group *parent, const CommMonitorParams* params); |
407 408 void updateReqStats(const ProbePoints::PacketInfo& pkt, bool is_atomic, 409 bool expects_response); 410 void updateRespStats(const ProbePoints::PacketInfo& pkt, Tick latency, 411 bool is_atomic); 412 }; 413 414 /** This function is called periodically at the end of each time bin */ --- 36 unchanged lines hidden --- | 391 392 void updateReqStats(const ProbePoints::PacketInfo& pkt, bool is_atomic, 393 bool expects_response); 394 void updateRespStats(const ProbePoints::PacketInfo& pkt, Tick latency, 395 bool is_atomic); 396 }; 397 398 /** This function is called periodically at the end of each time bin */ --- 36 unchanged lines hidden --- |