gem5  v20.1.0.0
comm_monitor.cc
Go to the documentation of this file.
1 /*
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
11  * licensed hereunder. You may use the software subject to the license
12  * terms below provided that you ensure that this notice is replicated
13  * unmodified and in its entirety in all distributions of the software,
14  * modified or unmodified, in source code or in binary form.
15  *
16  * Redistribution and use in source and binary forms, with or without
17  * modification, are permitted provided that the following conditions are
18  * met: redistributions of source code must retain the above copyright
19  * notice, this list of conditions and the following disclaimer;
20  * redistributions in binary form must reproduce the above copyright
21  * notice, this list of conditions and the following disclaimer in the
22  * documentation and/or other materials provided with the distribution;
23  * neither the name of the copyright holders nor the names of its
24  * contributors may be used to endorse or promote products derived from
25  * this software without specific prior written permission.
26  *
27  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
32  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
33  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38  */
39 
40 #include "mem/comm_monitor.hh"
41 
42 #include "base/trace.hh"
43 #include "debug/CommMonitor.hh"
44 #include "sim/stats.hh"
45 
47  : SimObject(params),
48  memSidePort(name() + "-mem_side_port", *this),
49  cpuSidePort(name() + "-cpu_side_port", *this),
50  samplePeriodicEvent([this]{ samplePeriodic(); }, name()),
51  samplePeriodTicks(params->sample_period),
52  samplePeriod(params->sample_period / SimClock::Float::s),
53  stats(this, params)
54 {
56  "Created monitor %s with sample period %d ticks (%f ms)\n",
57  name(), samplePeriodTicks, samplePeriod * 1E3);
58 }
59 
61 CommMonitorParams::create()
62 {
63  return new CommMonitor(this);
64 }
65 
66 void
68 {
69  // make sure both sides of the monitor are connected
71  fatal("Communication monitor is not connected on both sides.\n");
72 }
73 
74 void
76 {
77  ppPktReq.reset(new ProbePoints::Packet(getProbeManager(), "PktRequest"));
78  ppPktResp.reset(new ProbePoints::Packet(getProbeManager(), "PktResponse"));
79 }
80 
81 Port &
82 CommMonitor::getPort(const std::string &if_name, PortID idx)
83 {
84  if (if_name == "mem_side_port") {
85  return memSidePort;
86  } else if (if_name == "cpu_side_port") {
87  return cpuSidePort;
88  } else {
89  return SimObject::getPort(if_name, idx);
90  }
91 }
92 
93 void
95 {
97 }
98 
99 void
101 {
103 }
104 
106  const CommMonitorParams *params)
107  : Stats::Group(parent),
108 
109  disableBurstLengthHists(params->disable_burst_length_hists),
110  ADD_STAT(readBurstLengthHist,
111  "Histogram of burst lengths of transmitted packets"),
112  ADD_STAT(writeBurstLengthHist,
113  "Histogram of burst lengths of transmitted packets"),
114 
115  disableBandwidthHists(params->disable_bandwidth_hists),
116  readBytes(0),
117  ADD_STAT(readBandwidthHist,
118  "Histogram of read bandwidth per sample period (bytes/s)"),
119  ADD_STAT(totalReadBytes, "Number of bytes read"),
120  ADD_STAT(averageReadBandwidth, "Average read bandwidth (bytes/s)",
121  totalReadBytes / simSeconds),
122 
123  writtenBytes(0),
124  ADD_STAT(writeBandwidthHist, "Histogram of write bandwidth (bytes/s)"),
125  ADD_STAT(totalWrittenBytes, "Number of bytes written"),
126  ADD_STAT(averageWriteBandwidth, "Average write bandwidth (bytes/s)",
127  totalWrittenBytes / simSeconds),
128 
129  disableLatencyHists(params->disable_latency_hists),
130  ADD_STAT(readLatencyHist, "Read request-response latency"),
131  ADD_STAT(writeLatencyHist, "Write request-response latency"),
132 
133  disableITTDists(params->disable_itt_dists),
134  ADD_STAT(ittReadRead, "Read-to-read inter transaction time"),
135  ADD_STAT(ittWriteWrite , "Write-to-write inter transaction time"),
136  ADD_STAT(ittReqReq, "Request-to-request inter transaction time"),
137  timeOfLastRead(0), timeOfLastWrite(0), timeOfLastReq(0),
138 
139  disableOutstandingHists(params->disable_outstanding_hists),
140  ADD_STAT(outstandingReadsHist, "Outstanding read transactions"),
141  outstandingReadReqs(0),
142  ADD_STAT(outstandingWritesHist, "Outstanding write transactions"),
143  outstandingWriteReqs(0),
144 
145  disableTransactionHists(params->disable_transaction_hists),
146  ADD_STAT(readTransHist,
147  "Histogram of read transactions per sample period"),
148  readTrans(0),
149  ADD_STAT(writeTransHist,
150  "Histogram of write transactions per sample period"),
151  writeTrans(0),
152 
153  disableAddrDists(params->disable_addr_dists),
154  readAddrMask(params->read_addr_mask),
155  writeAddrMask(params->write_addr_mask),
156  ADD_STAT(readAddrDist, "Read address distribution"),
157  ADD_STAT(writeAddrDist, "Write address distribution")
158 {
159  using namespace Stats;
160 
162  .init(params->burst_length_bins)
164 
166  .init(params->burst_length_bins)
168 
169  // Stats based on received responses
171  .init(params->bandwidth_bins)
173 
176 
179 
180  // Stats based on successfully sent requests
182  .init(params->bandwidth_bins)
184 
187 
190 
191 
193  .init(params->latency_bins)
195 
197  .init(params->latency_bins)
199 
201  .init(1, params->itt_max_bin, params->itt_max_bin /
202  params->itt_bins)
204 
206  .init(1, params->itt_max_bin, params->itt_max_bin /
207  params->itt_bins)
209 
210  ittReqReq
211  .init(1, params->itt_max_bin, params->itt_max_bin /
212  params->itt_bins)
214 
216  .init(params->outstanding_bins)
218 
220  .init(params->outstanding_bins)
222 
224  .init(params->transaction_bins)
226 
228  .init(params->transaction_bins)
230 
232  .init(0)
234 
236  .init(0)
238 }
239 
240 void
242  const ProbePoints::PacketInfo& pkt_info, bool is_atomic,
243  bool expects_response)
244 {
245  if (pkt_info.cmd.isRead()) {
246  // Increment number of observed read transactions
248  ++readTrans;
249 
250  // Get sample of burst length
252  readBurstLengthHist.sample(pkt_info.size);
253 
254  // Sample the masked address
255  if (!disableAddrDists)
256  readAddrDist.sample(pkt_info.addr & readAddrMask);
257 
258  if (!disableITTDists) {
259  // Sample value of read-read inter transaction time
260  if (timeOfLastRead != 0)
263 
264  // Sample value of req-req inter transaction time
265  if (timeOfLastReq != 0)
268  }
269  if (!is_atomic && !disableOutstandingHists && expects_response)
271 
272  } else if (pkt_info.cmd.isWrite()) {
273  // Same as for reads
275  ++writeTrans;
276 
278  writeBurstLengthHist.sample(pkt_info.size);
279 
280  // Update the bandwidth stats on the request
281  if (!disableBandwidthHists) {
282  writtenBytes += pkt_info.size;
283  totalWrittenBytes += pkt_info.size;
284  }
285 
286  // Sample the masked write address
287  if (!disableAddrDists)
289 
290  if (!disableITTDists) {
291  // Sample value of write-to-write inter transaction time
292  if (timeOfLastWrite != 0)
295 
296  // Sample value of req-to-req inter transaction time
297  if (timeOfLastReq != 0)
300  }
301 
302  if (!is_atomic && !disableOutstandingHists && expects_response)
304  }
305 }
306 
307 void
309  const ProbePoints::PacketInfo& pkt_info, Tick latency, bool is_atomic)
310 {
311  if (pkt_info.cmd.isRead()) {
312  // Decrement number of outstanding read requests
313  if (!is_atomic && !disableOutstandingHists) {
314  assert(outstandingReadReqs != 0);
316  }
317 
318  if (!disableLatencyHists)
319  readLatencyHist.sample(latency);
320 
321  // Update the bandwidth stats based on responses for reads
322  if (!disableBandwidthHists) {
323  readBytes += pkt_info.size;
324  totalReadBytes += pkt_info.size;
325  }
326 
327  } else if (pkt_info.cmd.isWrite()) {
328  // Decrement number of outstanding write requests
329  if (!is_atomic && !disableOutstandingHists) {
330  assert(outstandingWriteReqs != 0);
332  }
333 
334  if (!disableLatencyHists)
335  writeLatencyHist.sample(latency);
336  }
337 }
338 
339 Tick
341 {
342  const bool expects_response(pkt->needsResponse() &&
343  !pkt->cacheResponding());
344  ProbePoints::PacketInfo req_pkt_info(pkt);
345  ppPktReq->notify(req_pkt_info);
346 
347  const Tick delay(memSidePort.sendAtomic(pkt));
348 
349  stats.updateReqStats(req_pkt_info, true, expects_response);
350  if (expects_response)
351  stats.updateRespStats(req_pkt_info, delay, true);
352 
353  // Some packets, such as WritebackDirty, don't need response.
354  assert(pkt->isResponse() || !expects_response);
355  ProbePoints::PacketInfo resp_pkt_info(pkt);
356  ppPktResp->notify(resp_pkt_info);
357  return delay;
358 }
359 
360 Tick
362 {
363  return cpuSidePort.sendAtomicSnoop(pkt);
364 }
365 
366 bool
368 {
369  // should always see a request
370  assert(pkt->isRequest());
371 
372  // Store relevant fields of packet, because packet may be modified
373  // or even deleted when sendTiming() is called.
374  const ProbePoints::PacketInfo pkt_info(pkt);
375 
376  const bool expects_response(pkt->needsResponse() &&
377  !pkt->cacheResponding());
378 
379  // If a cache miss is served by a cache, a monitor near the memory
380  // would see a request which needs a response, but this response
381  // would not come back from the memory. Therefore we additionally
382  // have to check the cacheResponding flag
383  if (expects_response && !stats.disableLatencyHists) {
385  }
386 
387  // Attempt to send the packet
388  bool successful = memSidePort.sendTimingReq(pkt);
389 
390  // If not successful, restore the sender state
391  if (!successful && expects_response && !stats.disableLatencyHists) {
392  delete pkt->popSenderState();
393  }
394 
395  if (successful) {
396  ppPktReq->notify(pkt_info);
397  }
398 
399  if (successful) {
400  DPRINTF(CommMonitor, "Forwarded %s request\n", pkt->isRead() ? "read" :
401  pkt->isWrite() ? "write" : "non read/write");
402  stats.updateReqStats(pkt_info, false, expects_response);
403  }
404  return successful;
405 }
406 
407 bool
409 {
410  // should always see responses
411  assert(pkt->isResponse());
412 
413  // Store relevant fields of packet, because packet may be modified
414  // or even deleted when sendTiming() is called.
415  const ProbePoints::PacketInfo pkt_info(pkt);
416 
417  Tick latency = 0;
418  CommMonitorSenderState* received_state =
419  dynamic_cast<CommMonitorSenderState*>(pkt->senderState);
420 
421  if (!stats.disableLatencyHists) {
422  // Restore initial sender state
423  if (received_state == NULL)
424  panic("Monitor got a response without monitor sender state\n");
425 
426  // Restore the sate
427  pkt->senderState = received_state->predecessor;
428  }
429 
430  // Attempt to send the packet
431  bool successful = cpuSidePort.sendTimingResp(pkt);
432 
433  if (!stats.disableLatencyHists) {
434  // If packet successfully send, sample value of latency,
435  // afterwards delete sender state, otherwise restore state
436  if (successful) {
437  latency = curTick() - received_state->transmitTime;
438  DPRINTF(CommMonitor, "Latency: %d\n", latency);
439  delete received_state;
440  } else {
441  // Don't delete anything and let the packet look like we
442  // did not touch it
443  pkt->senderState = received_state;
444  }
445  }
446 
447  if (successful) {
448  ppPktResp->notify(pkt_info);
449  DPRINTF(CommMonitor, "Received %s response\n", pkt->isRead() ? "read" :
450  pkt->isWrite() ? "write" : "non read/write");
451  stats.updateRespStats(pkt_info, latency, false);
452  }
453  return successful;
454 }
455 
456 void
458 {
460 }
461 
462 bool
464 {
465  return memSidePort.sendTimingSnoopResp(pkt);
466 }
467 
468 void
470 {
472 }
473 
474 bool
476 {
477  // check if the connected request port is snooping
478  return cpuSidePort.isSnooping();
479 }
480 
483 {
484  // get the address ranges of the connected CPU-side port
485  return memSidePort.getAddrRanges();
486 }
487 
488 void
490 {
492 }
493 
494 void
496 {
498 }
499 
500 bool
502 {
503  return memSidePort.tryTiming(pkt);
504 }
505 
506 void
508 {
510 }
511 
512 void
514 {
515  // the periodic stats update runs on the granularity of sample
516  // periods, but in combination with this there may also be a
517  // external resets and dumps of the stats (through schedStatEvent)
518  // causing the stats themselves to capture less than a sample
519  // period
520 
521  // only capture if we have not reset the stats during the last
522  // sample period
523  if (simTicks.value() >= samplePeriodTicks) {
524  if (!stats.disableTransactionHists) {
525  stats.readTransHist.sample(stats.readTrans);
526  stats.writeTransHist.sample(stats.writeTrans);
527  }
528 
529  if (!stats.disableBandwidthHists) {
530  stats.readBandwidthHist.sample(stats.readBytes / samplePeriod);
531  stats.writeBandwidthHist.sample(stats.writtenBytes / samplePeriod);
532  }
533 
534  if (!stats.disableOutstandingHists) {
535  stats.outstandingReadsHist.sample(stats.outstandingReadReqs);
536  stats.outstandingWritesHist.sample(stats.outstandingWriteReqs);
537  }
538  }
539 
540  // reset the sampled values
541  stats.readTrans = 0;
542  stats.writeTrans = 0;
543 
544  stats.readBytes = 0;
545  stats.writtenBytes = 0;
546 
548 }
549 
550 void
552 {
554 }
CommMonitor::MonitorStats::writeAddrDist
Stats::SparseHistogram writeAddrDist
Histogram of number of write accesses to addresses over time.
Definition: comm_monitor.hh:378
fatal
#define fatal(...)
This implements a cprintf based fatal() function.
Definition: logging.hh:183
CommMonitor::samplePeriodic
void samplePeriodic()
This function is called periodically at the end of each time bin.
Definition: comm_monitor.cc:513
CommMonitor::MonitorStats::updateReqStats
void updateReqStats(const ProbePoints::PacketInfo &pkt, bool is_atomic, bool expects_response)
Definition: comm_monitor.cc:241
SimClock::Float::s
double s
These variables equal the number of ticks in the unit of time they're named after in a double.
Definition: core.cc:49
Packet::isResponse
bool isResponse() const
Definition: packet.hh:560
CommMonitor::MonitorStats::disableBurstLengthHists
bool disableBurstLengthHists
Disable flag for burst length histograms.
Definition: comm_monitor.hh:275
CommMonitor::startup
void startup() override
startup() is the final initialization call before simulation.
Definition: comm_monitor.cc:551
ProbePoints::PacketInfo::addr
Addr addr
Definition: mem.hh:55
Packet::cacheResponding
bool cacheResponding() const
Definition: packet.hh:619
CommMonitor
The communication monitor is a SimObject which can monitor statistics of the communication happening ...
Definition: comm_monitor.hh:60
CommMonitor::recvAtomic
Tick recvAtomic(PacketPtr pkt)
Definition: comm_monitor.cc:340
CommMonitor::MonitorStats::writeBurstLengthHist
Stats::Histogram writeBurstLengthHist
Histogram of write burst lengths.
Definition: comm_monitor.hh:281
ResponsePort::sendTimingResp
bool sendTimingResp(PacketPtr pkt)
Attempt to send a timing response to the request port by calling its corresponding receive function.
Definition: port.hh:367
CommMonitor::recvRespRetry
void recvRespRetry()
Definition: comm_monitor.cc:495
CommMonitor::recvTimingSnoopResp
bool recvTimingSnoopResp(PacketPtr pkt)
Definition: comm_monitor.cc:463
CommMonitor::isSnooping
bool isSnooping() const
Definition: comm_monitor.cc:475
CommMonitor::memSidePort
MonitorRequestPort memSidePort
Instance of request port, facing the memory side.
Definition: comm_monitor.hh:178
CommMonitor::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: comm_monitor.cc:67
CommMonitor::CommMonitorSenderState::transmitTime
Tick transmitTime
Tick when request is transmitted.
Definition: comm_monitor.hh:110
comm_monitor.hh
CommMonitor::recvTimingReq
bool recvTimingReq(PacketPtr pkt)
Definition: comm_monitor.cc:367
CommMonitor::MonitorStats::readBytes
unsigned int readBytes
Histogram for read bandwidth per sample window.
Definition: comm_monitor.hh:290
CommMonitor::recvFunctionalSnoop
void recvFunctionalSnoop(PacketPtr pkt)
Definition: comm_monitor.cc:100
CommMonitor::MonitorStats::outstandingWriteReqs
unsigned int outstandingWriteReqs
Definition: comm_monitor.hh:346
CommMonitor::MonitorStats::disableTransactionHists
bool disableTransactionHists
Disable flag for transaction histograms.
Definition: comm_monitor.hh:349
CommMonitor::MonitorStats::timeOfLastWrite
Tick timeOfLastWrite
Definition: comm_monitor.hh:326
Packet::isRead
bool isRead() const
Definition: packet.hh:556
ProbePointArg
ProbePointArg generates a point for the class of Arg.
Definition: thermal_domain.hh:50
CommMonitor::MonitorStats::readTrans
unsigned int readTrans
Definition: comm_monitor.hh:353
CommMonitor::MonitorStats::writtenBytes
unsigned int writtenBytes
Histogram for write bandwidth per sample window.
Definition: comm_monitor.hh:299
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
CommMonitor::params
const Params * params() const
Definition: comm_monitor.hh:67
CommMonitor::samplePeriodicEvent
EventFunctionWrapper samplePeriodicEvent
Periodic event called at the end of each simulation time bin.
Definition: comm_monitor.hh:397
PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:237
CommMonitor::MonitorStats::writeBandwidthHist
Stats::Histogram writeBandwidthHist
Definition: comm_monitor.hh:300
ResponsePort::sendAtomicSnoop
Tick sendAtomicSnoop(PacketPtr pkt)
Send an atomic snoop request packet, where the data is moved and the state is updated in zero time,...
Definition: port.hh:323
RequestPort::getAddrRanges
AddrRangeList getAddrRanges() const
Get the address ranges of the connected responder port.
Definition: port.cc:148
CommMonitor::recvRetrySnoopResp
void recvRetrySnoopResp()
Definition: comm_monitor.cc:469
CommMonitor::MonitorStats::outstandingWritesHist
Stats::Histogram outstandingWritesHist
Histogram of outstanding write requests.
Definition: comm_monitor.hh:345
CommMonitor::MonitorStats::ittWriteWrite
Stats::Distribution ittWriteWrite
Definition: comm_monitor.hh:323
RequestPort::sendFunctional
void sendFunctional(PacketPtr pkt) const
Send a functional request packet, where the data is instantly updated everywhere in the memory system...
Definition: port.hh:482
CommMonitor::MonitorStats::writeLatencyHist
Stats::Histogram writeLatencyHist
Histogram of write request-to-response latencies.
Definition: comm_monitor.hh:311
Packet::isRequest
bool isRequest() const
Definition: packet.hh:559
CommMonitor::cpuSidePort
MonitorResponsePort cpuSidePort
Instance of response port, i.e.
Definition: comm_monitor.hh:239
CommMonitor::MonitorStats::timeOfLastReq
Tick timeOfLastReq
Definition: comm_monitor.hh:327
CommMonitor::MonitorStats::disableBandwidthHists
bool disableBandwidthHists
Disable flag for the bandwidth histograms.
Definition: comm_monitor.hh:284
CommMonitor::recvFunctional
void recvFunctional(PacketPtr pkt)
Definition: comm_monitor.cc:94
CommMonitor::MonitorStats::disableLatencyHists
bool disableLatencyHists
Disable flag for latency histograms.
Definition: comm_monitor.hh:305
RequestPort::sendTimingSnoopResp
bool sendTimingSnoopResp(PacketPtr pkt)
Attempt to send a timing snoop response packet to the response port by calling its corresponding rece...
Definition: port.hh:512
CommMonitor::MonitorStats::readTransHist
Stats::Histogram readTransHist
Histogram of number of read transactions per time bin.
Definition: comm_monitor.hh:352
CommMonitor::MonitorStats::readBandwidthHist
Stats::Histogram readBandwidthHist
Definition: comm_monitor.hh:291
CommMonitor::MonitorStats::disableITTDists
bool disableITTDists
Disable flag for ITT distributions.
Definition: comm_monitor.hh:314
CommMonitor::CommMonitor
CommMonitor(Params *params)
Constructor based on the Python params.
Definition: comm_monitor.cc:46
Stats::DataWrap::flags
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
Definition: statistics.hh:331
CommMonitor::regProbePoints
void regProbePoints() override
Register probe points for this object.
Definition: comm_monitor.cc:75
CommMonitor::MonitorStats::disableAddrDists
bool disableAddrDists
Disable flag for address distributions.
Definition: comm_monitor.hh:360
CommMonitor::MonitorStats::averageWriteBandwidth
Stats::Formula averageWriteBandwidth
Definition: comm_monitor.hh:302
CommMonitor::recvReqRetry
void recvReqRetry()
Definition: comm_monitor.cc:489
ResponsePort::sendTimingSnoopReq
void sendTimingSnoopReq(PacketPtr pkt)
Attempt to send a timing snoop request packet to the request port by calling its corresponding receiv...
Definition: port.hh:384
stats.hh
CommMonitor::Params
CommMonitorParams Params
Parameters of communication monitor.
Definition: comm_monitor.hh:66
CommMonitor::recvTimingResp
bool recvTimingResp(PacketPtr pkt)
Definition: comm_monitor.cc:408
EventManager::schedule
void schedule(Event &event, Tick when)
Definition: eventq.hh:1005
MemCmd::isRead
bool isRead() const
Definition: packet.hh:199
RequestPort::sendTimingReq
bool sendTimingReq(PacketPtr pkt)
Attempt to send a timing request to the responder port by calling its corresponding receive function.
Definition: port.hh:492
CommMonitor::MonitorStats::readAddrMask
const Addr readAddrMask
Address mask for sources of read accesses to be captured.
Definition: comm_monitor.hh:363
SimObject::getPort
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
Definition: sim_object.cc:123
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:234
ADD_STAT
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Definition: group.hh:67
simSeconds
Stats::Formula simSeconds
Definition: stat_control.cc:61
CommMonitor::MonitorStats::outstandingReadsHist
Stats::Histogram outstandingReadsHist
Histogram of outstanding read requests.
Definition: comm_monitor.hh:337
CommMonitor::MonitorStats::disableOutstandingHists
bool disableOutstandingHists
Disable flag for outstanding histograms.
Definition: comm_monitor.hh:330
CommMonitor::MonitorStats::writeTransHist
Stats::Histogram writeTransHist
Histogram of number of timing write transactions per time bin.
Definition: comm_monitor.hh:356
Port
Ports are used to interface objects to each other.
Definition: port.hh:56
Packet::needsResponse
bool needsResponse() const
Definition: packet.hh:570
Stats::Group::stats
std::vector< Info * > stats
Definition: group.hh:212
RequestPort::sendRetryResp
virtual void sendRetryResp()
Send a retry to the response port that previously attempted a sendTimingResp to this request port and...
Definition: port.hh:522
CommMonitor::MonitorStats::readBurstLengthHist
Stats::Histogram readBurstLengthHist
Histogram of read burst lengths.
Definition: comm_monitor.hh:278
ResponsePort::isSnooping
bool isSnooping() const
Find out if the peer request port is snooping or not.
Definition: port.hh:288
CommMonitor::ppPktReq
ProbePoints::PacketUPtr ppPktReq
Successfully forwarded request packet.
Definition: comm_monitor.hh:421
CommMonitor::recvRangeChange
void recvRangeChange()
Definition: comm_monitor.cc:507
CommMonitor::MonitorStats::totalReadBytes
Stats::Scalar totalReadBytes
Definition: comm_monitor.hh:292
CommMonitor::MonitorStats::readAddrDist
Stats::SparseHistogram readAddrDist
Histogram of number of read accesses to addresses over time.
Definition: comm_monitor.hh:372
CommMonitor::MonitorStats::MonitorStats
MonitorStats(Stats::Group *parent, const CommMonitorParams *params)
Create the monitor stats and initialise all the members that are not statistics themselves,...
Definition: comm_monitor.cc:105
CommMonitor::tryTiming
bool tryTiming(PacketPtr pkt)
Definition: comm_monitor.cc:501
CommMonitor::CommMonitorSenderState
Sender state class for the monitor so that we can annotate packets with a transmit time and receive t...
Definition: comm_monitor.hh:91
Stats::ValueBase::value
Counter value()
Definition: statistics.hh:905
name
const std::string & name()
Definition: trace.cc:50
Stats::nozero
const FlagsType nozero
Don't print if this is zero.
Definition: info.hh:57
SimObject::getProbeManager
ProbeManager * getProbeManager()
Get the probe manager for this object.
Definition: sim_object.cc:117
CommMonitor::ppPktResp
ProbePoints::PacketUPtr ppPktResp
Successfully forwarded response packet.
Definition: comm_monitor.hh:424
Stats::SparseHistBase::sample
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
Definition: statistics.hh:2902
Packet::pushSenderState
void pushSenderState(SenderState *sender_state)
Push a new sender state to the packet and make the current sender state the predecessor of the new on...
Definition: packet.cc:332
ProbePoints::PacketInfo::cmd
MemCmd cmd
Definition: mem.hh:54
CommMonitor::samplePeriod
const double samplePeriod
Sample period in seconds.
Definition: comm_monitor.hh:407
CommMonitor::MonitorStats::writeTrans
unsigned int writeTrans
Definition: comm_monitor.hh:357
Stats::Distribution::init
Distribution & init(Counter min, Counter max, Counter bkt)
Set the parameters of this distribution.
Definition: statistics.hh:2634
Stats::pdf
const FlagsType pdf
Print the percent of the total that this entry represents.
Definition: info.hh:51
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
Stats::Group
Statistics container.
Definition: group.hh:83
Packet::popSenderState
SenderState * popSenderState()
Pop the top of the state stack and return a pointer to it.
Definition: packet.cc:340
ResponsePort::sendFunctionalSnoop
void sendFunctionalSnoop(PacketPtr pkt) const
Send a functional snoop request packet, where the data is instantly updated everywhere in the memory ...
Definition: port.hh:343
Port::isConnected
bool isConnected() const
Is this port currently connected to a peer?
Definition: port.hh:128
ProbePoints::PacketInfo::size
uint32_t size
Definition: mem.hh:56
Stats::DistBase::sample
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
Definition: statistics.hh:1924
ResponsePort::sendRetrySnoopResp
void sendRetrySnoopResp()
Send a retry to the request port that previously attempted a sendTimingSnoopResp to this response por...
Definition: port.hh:412
Packet::isWrite
bool isWrite() const
Definition: packet.hh:557
CommMonitor::MonitorStats::ittReqReq
Stats::Distribution ittReqReq
Definition: comm_monitor.hh:324
CommMonitor::MonitorStats::totalWrittenBytes
Stats::Scalar totalWrittenBytes
Definition: comm_monitor.hh:301
simTicks
Stats::Value simTicks
Definition: stat_control.cc:62
CommMonitor::MonitorStats::writeAddrMask
const Addr writeAddrMask
Address mask for sources of write accesses to be captured.
Definition: comm_monitor.hh:366
Stats
Definition: statistics.cc:61
CommMonitor::MonitorStats::timeOfLastRead
Tick timeOfLastRead
Definition: comm_monitor.hh:325
CommMonitor::recvAtomicSnoop
Tick recvAtomicSnoop(PacketPtr pkt)
Definition: comm_monitor.cc:361
Stats::SparseHistogram::init
SparseHistogram & init(size_type size)
Set the parameters of this histogram.
Definition: statistics.hh:3022
trace.hh
CommMonitor::MonitorStats::readLatencyHist
Stats::Histogram readLatencyHist
Histogram of read request-to-response latencies.
Definition: comm_monitor.hh:308
ResponsePort::sendRetryReq
void sendRetryReq()
Send a retry to the request port that previously attempted a sendTimingReq to this response port and ...
Definition: port.hh:398
Stats::Histogram::init
Histogram & init(size_type size)
Set the parameters of this histogram.
Definition: statistics.hh:2669
Packet::senderState
SenderState * senderState
This packet's sender state.
Definition: packet.hh:508
RequestPort::sendAtomic
Tick sendAtomic(PacketPtr pkt)
Send an atomic request packet, where the data is moved and the state is updated in zero time,...
Definition: port.hh:461
CommMonitor::recvTimingSnoopReq
void recvTimingSnoopReq(PacketPtr pkt)
Definition: comm_monitor.cc:457
CommMonitor::MonitorStats::updateRespStats
void updateRespStats(const ProbePoints::PacketInfo &pkt, Tick latency, bool is_atomic)
Definition: comm_monitor.cc:308
std::list< AddrRange >
CommMonitor::MonitorStats::ittReadRead
Stats::Distribution ittReadRead
Inter transaction time (ITT) distributions.
Definition: comm_monitor.hh:322
Packet::SenderState::predecessor
SenderState * predecessor
Definition: packet.hh:433
ResponsePort::sendRangeChange
void sendRangeChange() const
Called by the owner to send a range change.
Definition: port.hh:293
CommMonitor::getAddrRanges
AddrRangeList getAddrRanges() const
Definition: comm_monitor.cc:482
ProbePoints::PacketInfo
A struct to hold on to the essential fields from a packet, so that the packet and underlying request ...
Definition: mem.hh:53
CommMonitor::samplePeriodTicks
const Tick samplePeriodTicks
Length of simulation time bin.
Definition: comm_monitor.hh:405
CommMonitor::MonitorStats::averageReadBandwidth
Stats::Formula averageReadBandwidth
Definition: comm_monitor.hh:293
CommMonitor::MonitorStats::outstandingReadReqs
unsigned int outstandingReadReqs
Definition: comm_monitor.hh:338
MemCmd::isWrite
bool isWrite() const
Definition: packet.hh:200
RequestPort::tryTiming
bool tryTiming(PacketPtr pkt) const
Check if the responder can handle a timing request.
Definition: port.hh:502
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:171
CommMonitor::getPort
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
Definition: comm_monitor.cc:82
curTick
Tick curTick()
The current simulated tick.
Definition: core.hh:45
SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:92

Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17