gem5  v21.1.0.2
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/core.hh"
45 #include "sim/cur_tick.hh"
46 #include "sim/stats.hh"
47 
48 namespace gem5
49 {
50 
52  : SimObject(params),
53  memSidePort(name() + "-mem_side_port", *this),
54  cpuSidePort(name() + "-cpu_side_port", *this),
55  samplePeriodicEvent([this]{ samplePeriodic(); }, name()),
56  samplePeriodTicks(params.sample_period),
57  samplePeriod(params.sample_period / sim_clock::as_float::s),
58  stats(this, params)
59 {
61  "Created monitor %s with sample period %d ticks (%f ms)\n",
62  name(), samplePeriodTicks, samplePeriod * 1E3);
63 }
64 
65 void
67 {
68  // make sure both sides of the monitor are connected
70  fatal("Communication monitor is not connected on both sides.\n");
71 }
72 
73 void
75 {
76  ppPktReq.reset(new probing::Packet(getProbeManager(), "PktRequest"));
77  ppPktResp.reset(new probing::Packet(getProbeManager(), "PktResponse"));
78 }
79 
80 Port &
81 CommMonitor::getPort(const std::string &if_name, PortID idx)
82 {
83  if (if_name == "mem_side_port") {
84  return memSidePort;
85  } else if (if_name == "cpu_side_port") {
86  return cpuSidePort;
87  } else {
88  return SimObject::getPort(if_name, idx);
89  }
90 }
91 
92 void
94 {
96 }
97 
98 void
100 {
102 }
103 
105  const CommMonitorParams &params)
106  : statistics::Group(parent),
107 
108  disableBurstLengthHists(params.disable_burst_length_hists),
109  ADD_STAT(readBurstLengthHist, statistics::units::Byte::get(),
110  "Histogram of burst lengths of transmitted packets"),
111  ADD_STAT(writeBurstLengthHist, statistics::units::Byte::get(),
112  "Histogram of burst lengths of transmitted packets"),
113 
114  disableBandwidthHists(params.disable_bandwidth_hists),
115  readBytes(0),
116  ADD_STAT(readBandwidthHist, statistics::units::Rate<
117  statistics::units::Byte, statistics::units::Second>::get(),
118  "Histogram of read bandwidth per sample period"),
119  ADD_STAT(totalReadBytes, statistics::units::Byte::get(),
120  "Number of bytes read"),
121  ADD_STAT(averageReadBandwidth, statistics::units::Rate<
122  statistics::units::Byte, statistics::units::Second>::get(),
123  "Average read bandwidth",
124  totalReadBytes / simSeconds),
125 
126  writtenBytes(0),
127  ADD_STAT(writeBandwidthHist, statistics::units::Rate<
128  statistics::units::Byte, statistics::units::Second>::get(),
129  "Histogram of write bandwidth"),
130  ADD_STAT(totalWrittenBytes, statistics::units::Rate<
131  statistics::units::Byte, statistics::units::Second>::get(),
132  "Number of bytes written"),
133  ADD_STAT(averageWriteBandwidth, statistics::units::Rate<
134  statistics::units::Byte, statistics::units::Second>::get(),
135  "Average write bandwidth",
136  totalWrittenBytes / simSeconds),
137 
138  disableLatencyHists(params.disable_latency_hists),
139  ADD_STAT(readLatencyHist, statistics::units::Tick::get(),
140  "Read request-response latency"),
141  ADD_STAT(writeLatencyHist, statistics::units::Tick::get(),
142  "Write request-response latency"),
143 
144  disableITTDists(params.disable_itt_dists),
145  ADD_STAT(ittReadRead, statistics::units::Tick::get(),
146  "Read-to-read inter transaction time"),
147  ADD_STAT(ittWriteWrite, statistics::units::Tick::get(),
148  "Write-to-write inter transaction time"),
149  ADD_STAT(ittReqReq, statistics::units::Tick::get(),
150  "Request-to-request inter transaction time"),
151  timeOfLastRead(0), timeOfLastWrite(0), timeOfLastReq(0),
152 
153  disableOutstandingHists(params.disable_outstanding_hists),
154  ADD_STAT(outstandingReadsHist, statistics::units::Count::get(),
155  "Outstanding read transactions"),
156  outstandingReadReqs(0),
157  ADD_STAT(outstandingWritesHist, statistics::units::Count::get(),
158  "Outstanding write transactions"),
159  outstandingWriteReqs(0),
160 
161  disableTransactionHists(params.disable_transaction_hists),
162  ADD_STAT(readTransHist, statistics::units::Count::get(),
163  "Histogram of read transactions per sample period"),
164  readTrans(0),
165  ADD_STAT(writeTransHist, statistics::units::Count::get(),
166  "Histogram of write transactions per sample period"),
167  writeTrans(0),
168 
169  disableAddrDists(params.disable_addr_dists),
170  readAddrMask(params.read_addr_mask),
171  writeAddrMask(params.write_addr_mask),
172  ADD_STAT(readAddrDist, statistics::units::Count::get(),
173  "Read address distribution"),
174  ADD_STAT(writeAddrDist, statistics::units::Count::get(),
175  "Write address distribution")
176 {
177  using namespace statistics;
178 
180  .init(params.burst_length_bins)
182 
184  .init(params.burst_length_bins)
186 
187  // Stats based on received responses
189  .init(params.bandwidth_bins)
191 
194 
197 
198  // Stats based on successfully sent requests
200  .init(params.bandwidth_bins)
202 
205 
208 
209 
211  .init(params.latency_bins)
213 
215  .init(params.latency_bins)
217 
219  .init(1, params.itt_max_bin, params.itt_max_bin /
220  params.itt_bins)
222 
224  .init(1, params.itt_max_bin, params.itt_max_bin /
225  params.itt_bins)
227 
228  ittReqReq
229  .init(1, params.itt_max_bin, params.itt_max_bin /
230  params.itt_bins)
232 
234  .init(params.outstanding_bins)
236 
238  .init(params.outstanding_bins)
240 
242  .init(params.transaction_bins)
244 
246  .init(params.transaction_bins)
248 
250  .init(0)
252 
254  .init(0)
256 }
257 
258 void
260  const probing::PacketInfo& pkt_info, bool is_atomic,
261  bool expects_response)
262 {
263  if (pkt_info.cmd.isRead()) {
264  // Increment number of observed read transactions
266  ++readTrans;
267 
268  // Get sample of burst length
270  readBurstLengthHist.sample(pkt_info.size);
271 
272  // Sample the masked address
273  if (!disableAddrDists)
274  readAddrDist.sample(pkt_info.addr & readAddrMask);
275 
276  if (!disableITTDists) {
277  // Sample value of read-read inter transaction time
278  if (timeOfLastRead != 0)
281 
282  // Sample value of req-req inter transaction time
283  if (timeOfLastReq != 0)
286  }
287  if (!is_atomic && !disableOutstandingHists && expects_response)
289 
290  } else if (pkt_info.cmd.isWrite()) {
291  // Same as for reads
293  ++writeTrans;
294 
296  writeBurstLengthHist.sample(pkt_info.size);
297 
298  // Update the bandwidth stats on the request
299  if (!disableBandwidthHists) {
300  writtenBytes += pkt_info.size;
301  totalWrittenBytes += pkt_info.size;
302  }
303 
304  // Sample the masked write address
305  if (!disableAddrDists)
307 
308  if (!disableITTDists) {
309  // Sample value of write-to-write inter transaction time
310  if (timeOfLastWrite != 0)
313 
314  // Sample value of req-to-req inter transaction time
315  if (timeOfLastReq != 0)
318  }
319 
320  if (!is_atomic && !disableOutstandingHists && expects_response)
322  }
323 }
324 
325 void
327  const probing::PacketInfo& pkt_info, Tick latency, bool is_atomic)
328 {
329  if (pkt_info.cmd.isRead()) {
330  // Decrement number of outstanding read requests
331  if (!is_atomic && !disableOutstandingHists) {
332  assert(outstandingReadReqs != 0);
334  }
335 
336  if (!disableLatencyHists)
337  readLatencyHist.sample(latency);
338 
339  // Update the bandwidth stats based on responses for reads
340  if (!disableBandwidthHists) {
341  readBytes += pkt_info.size;
342  totalReadBytes += pkt_info.size;
343  }
344 
345  } else if (pkt_info.cmd.isWrite()) {
346  // Decrement number of outstanding write requests
347  if (!is_atomic && !disableOutstandingHists) {
348  assert(outstandingWriteReqs != 0);
350  }
351 
352  if (!disableLatencyHists)
353  writeLatencyHist.sample(latency);
354  }
355 }
356 
357 Tick
359 {
360  const bool expects_response(pkt->needsResponse() &&
361  !pkt->cacheResponding());
362  probing::PacketInfo req_pkt_info(pkt);
363  ppPktReq->notify(req_pkt_info);
364 
365  const Tick delay(memSidePort.sendAtomic(pkt));
366 
367  stats.updateReqStats(req_pkt_info, true, expects_response);
368  if (expects_response)
369  stats.updateRespStats(req_pkt_info, delay, true);
370 
371  // Some packets, such as WritebackDirty, don't need response.
372  assert(pkt->isResponse() || !expects_response);
373  probing::PacketInfo resp_pkt_info(pkt);
374  ppPktResp->notify(resp_pkt_info);
375  return delay;
376 }
377 
378 Tick
380 {
381  return cpuSidePort.sendAtomicSnoop(pkt);
382 }
383 
384 bool
386 {
387  // should always see a request
388  assert(pkt->isRequest());
389 
390  // Store relevant fields of packet, because packet may be modified
391  // or even deleted when sendTiming() is called.
392  const probing::PacketInfo pkt_info(pkt);
393 
394  const bool expects_response(pkt->needsResponse() &&
395  !pkt->cacheResponding());
396 
397  // If a cache miss is served by a cache, a monitor near the memory
398  // would see a request which needs a response, but this response
399  // would not come back from the memory. Therefore we additionally
400  // have to check the cacheResponding flag
401  if (expects_response && !stats.disableLatencyHists) {
403  }
404 
405  // Attempt to send the packet
406  bool successful = memSidePort.sendTimingReq(pkt);
407 
408  // If not successful, restore the sender state
409  if (!successful && expects_response && !stats.disableLatencyHists) {
410  delete pkt->popSenderState();
411  }
412 
413  if (successful) {
414  ppPktReq->notify(pkt_info);
415  }
416 
417  if (successful) {
418  DPRINTF(CommMonitor, "Forwarded %s request\n", pkt->isRead() ? "read" :
419  pkt->isWrite() ? "write" : "non read/write");
420  stats.updateReqStats(pkt_info, false, expects_response);
421  }
422  return successful;
423 }
424 
425 bool
427 {
428  // should always see responses
429  assert(pkt->isResponse());
430 
431  // Store relevant fields of packet, because packet may be modified
432  // or even deleted when sendTiming() is called.
433  const probing::PacketInfo pkt_info(pkt);
434 
435  Tick latency = 0;
436  CommMonitorSenderState* received_state =
437  dynamic_cast<CommMonitorSenderState*>(pkt->senderState);
438 
439  if (!stats.disableLatencyHists) {
440  // Restore initial sender state
441  if (received_state == NULL)
442  panic("Monitor got a response without monitor sender state\n");
443 
444  // Restore the sate
445  pkt->senderState = received_state->predecessor;
446  }
447 
448  // Attempt to send the packet
449  bool successful = cpuSidePort.sendTimingResp(pkt);
450 
451  if (!stats.disableLatencyHists) {
452  // If packet successfully send, sample value of latency,
453  // afterwards delete sender state, otherwise restore state
454  if (successful) {
455  latency = curTick() - received_state->transmitTime;
456  DPRINTF(CommMonitor, "Latency: %d\n", latency);
457  delete received_state;
458  } else {
459  // Don't delete anything and let the packet look like we
460  // did not touch it
461  pkt->senderState = received_state;
462  }
463  }
464 
465  if (successful) {
466  ppPktResp->notify(pkt_info);
467  DPRINTF(CommMonitor, "Received %s response\n", pkt->isRead() ? "read" :
468  pkt->isWrite() ? "write" : "non read/write");
469  stats.updateRespStats(pkt_info, latency, false);
470  }
471  return successful;
472 }
473 
474 void
476 {
478 }
479 
480 bool
482 {
483  return memSidePort.sendTimingSnoopResp(pkt);
484 }
485 
486 void
488 {
490 }
491 
492 bool
494 {
495  // check if the connected request port is snooping
496  return cpuSidePort.isSnooping();
497 }
498 
501 {
502  // get the address ranges of the connected CPU-side port
503  return memSidePort.getAddrRanges();
504 }
505 
506 void
508 {
510 }
511 
512 void
514 {
516 }
517 
518 bool
520 {
521  return memSidePort.tryTiming(pkt);
522 }
523 
524 void
526 {
528 }
529 
530 void
532 {
533  // the periodic stats update runs on the granularity of sample
534  // periods, but in combination with this there may also be a
535  // external resets and dumps of the stats (through schedStatEvent)
536  // causing the stats themselves to capture less than a sample
537  // period
538 
539  // only capture if we have not reset the stats during the last
540  // sample period
541  if (simTicks.value() >= samplePeriodTicks) {
542  if (!stats.disableTransactionHists) {
543  stats.readTransHist.sample(stats.readTrans);
544  stats.writeTransHist.sample(stats.writeTrans);
545  }
546 
547  if (!stats.disableBandwidthHists) {
548  stats.readBandwidthHist.sample(stats.readBytes / samplePeriod);
549  stats.writeBandwidthHist.sample(stats.writtenBytes / samplePeriod);
550  }
551 
552  if (!stats.disableOutstandingHists) {
553  stats.outstandingReadsHist.sample(stats.outstandingReadReqs);
554  stats.outstandingWritesHist.sample(stats.outstandingWriteReqs);
555  }
556  }
557 
558  // reset the sampled values
559  stats.readTrans = 0;
560  stats.writeTrans = 0;
561 
562  stats.readBytes = 0;
563  stats.writtenBytes = 0;
564 
566 }
567 
568 void
570 {
572 }
573 
574 } // namespace gem5
gem5::CommMonitor
The communication monitor is a SimObject which can monitor statistics of the communication happening ...
Definition: comm_monitor.hh:63
gem5::CommMonitor::MonitorStats::outstandingReadsHist
statistics::Histogram outstandingReadsHist
Histogram of outstanding read requests.
Definition: comm_monitor.hh:338
gem5::curTick
Tick curTick()
The universal simulation clock.
Definition: cur_tick.hh:46
fatal
#define fatal(...)
This implements a cprintf based fatal() function.
Definition: logging.hh:189
gem5::PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:252
gem5::RequestPort::tryTiming
bool tryTiming(PacketPtr pkt) const
Check if the responder can handle a timing request.
Definition: port.hh:505
gem5::CommMonitor::MonitorStats::readTransHist
statistics::Histogram readTransHist
Histogram of number of read transactions per time bin.
Definition: comm_monitor.hh:353
gem5::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:126
gem5::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:495
gem5::Packet::isRequest
bool isRequest() const
Definition: packet.hh:586
gem5::CommMonitor::recvRespRetry
void recvRespRetry()
Definition: comm_monitor.cc:513
gem5::CommMonitor::recvTimingResp
bool recvTimingResp(PacketPtr pkt)
Definition: comm_monitor.cc:426
gem5::CommMonitor::recvAtomic
Tick recvAtomic(PacketPtr pkt)
Definition: comm_monitor.cc:358
gem5::CommMonitor::CommMonitor
CommMonitor(const Params &params)
Constructor based on the Python params.
Definition: comm_monitor.cc:51
gem5::CommMonitor::MonitorStats::outstandingReadReqs
unsigned int outstandingReadReqs
Definition: comm_monitor.hh:339
gem5::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:346
gem5::ResponsePort::sendRetryReq
void sendRetryReq()
Send a retry to the request port that previously attempted a sendTimingReq to this response port and ...
Definition: port.hh:401
gem5::CommMonitor::MonitorStats::writeBurstLengthHist
statistics::Histogram writeBurstLengthHist
Histogram of write burst lengths.
Definition: comm_monitor.hh:282
gem5::CommMonitor::recvTimingSnoopReq
void recvTimingSnoopReq(PacketPtr pkt)
Definition: comm_monitor.cc:475
gem5::CommMonitor::MonitorStats::writeTransHist
statistics::Histogram writeTransHist
Histogram of number of timing write transactions per time bin.
Definition: comm_monitor.hh:357
gem5::ResponsePort::sendRetrySnoopResp
void sendRetrySnoopResp()
Send a retry to the request port that previously attempted a sendTimingSnoopResp to this response por...
Definition: port.hh:415
gem5::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:316
gem5::CommMonitor::MonitorStats::readBandwidthHist
statistics::Histogram readBandwidthHist
Definition: comm_monitor.hh:292
comm_monitor.hh
gem5::CommMonitor::MonitorStats::disableLatencyHists
bool disableLatencyHists
Disable flag for latency histograms.
Definition: comm_monitor.hh:306
gem5::CommMonitor::recvAtomicSnoop
Tick recvAtomicSnoop(PacketPtr pkt)
Definition: comm_monitor.cc:379
gem5::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:464
gem5::statistics::nozero
const FlagsType nozero
Don't print if this is zero.
Definition: info.hh:68
cur_tick.hh
gem5::Packet::cacheResponding
bool cacheResponding() const
Definition: packet.hh:646
gem5::CommMonitor::MonitorStats::readAddrMask
const Addr readAddrMask
Address mask for sources of read accesses to be captured.
Definition: comm_monitor.hh:364
gem5::CommMonitor::MonitorStats::readAddrDist
statistics::SparseHistogram readAddrDist
Histogram of number of read accesses to addresses over time.
Definition: comm_monitor.hh:373
gem5::Packet::isWrite
bool isWrite() const
Definition: packet.hh:583
gem5::probing::PacketInfo::addr
Addr addr
Definition: mem.hh:61
gem5::CommMonitor::MonitorStats::writeAddrMask
const Addr writeAddrMask
Address mask for sources of write accesses to be captured.
Definition: comm_monitor.hh:367
gem5::CommMonitor::MonitorStats::writeAddrDist
statistics::SparseHistogram writeAddrDist
Histogram of number of write accesses to addresses over time.
Definition: comm_monitor.hh:379
gem5::EventManager::schedule
void schedule(Event &event, Tick when)
Definition: eventq.hh:1019
gem5::MemCmd::isWrite
bool isWrite() const
Definition: packet.hh:218
gem5::CommMonitor::getAddrRanges
AddrRangeList getAddrRanges() const
Definition: comm_monitor.cc:500
gem5::CommMonitor::MonitorStats::totalWrittenBytes
statistics::Scalar totalWrittenBytes
Definition: comm_monitor.hh:302
gem5::CommMonitor::MonitorStats::readBytes
unsigned int readBytes
Histogram for read bandwidth per sample window.
Definition: comm_monitor.hh:291
gem5::CommMonitor::samplePeriodic
void samplePeriodic()
This function is called periodically at the end of each time bin.
Definition: comm_monitor.cc:531
gem5::CommMonitor::MonitorStats::readLatencyHist
statistics::Histogram readLatencyHist
Histogram of read request-to-response latencies.
Definition: comm_monitor.hh:309
gem5::statistics::DistBase::sample
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
Definition: statistics.hh:1325
gem5::Packet::SenderState::predecessor
SenderState * predecessor
Definition: packet.hh:459
gem5::CommMonitor::regProbePoints
void regProbePoints() override
Register probe points for this object.
Definition: comm_monitor.cc:74
gem5::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:92
gem5::CommMonitor::samplePeriodicEvent
EventFunctionWrapper samplePeriodicEvent
Periodic event called at the end of each simulation time bin.
Definition: comm_monitor.hh:399
gem5::statistics::pdf
const FlagsType pdf
Print the percent of the total that this entry represents.
Definition: info.hh:62
gem5::probing::PacketInfo::cmd
MemCmd cmd
Definition: mem.hh:60
gem5::CommMonitor::MonitorStats::writtenBytes
unsigned int writtenBytes
Histogram for write bandwidth per sample window.
Definition: comm_monitor.hh:300
stats.hh
gem5::CommMonitor::MonitorStats::totalReadBytes
statistics::Scalar totalReadBytes
Definition: comm_monitor.hh:293
gem5::CommMonitor::MonitorStats::timeOfLastReq
Tick timeOfLastReq
Definition: comm_monitor.hh:328
gem5::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:485
gem5::statistics::SparseHistogram::init
SparseHistogram & init(size_type size)
Set the parameters of this histogram.
Definition: statistics.hh:2521
gem5::Packet::isRead
bool isRead() const
Definition: packet.hh:582
gem5::CommMonitor::isSnooping
bool isSnooping() const
Definition: comm_monitor.cc:493
gem5::statistics::Distribution::init
Distribution & init(Counter min, Counter max, Counter bkt)
Set the parameters of this distribution.
Definition: statistics.hh:2110
gem5::CommMonitor::ppPktReq
probing::PacketUPtr ppPktReq
Successfully forwarded request packet.
Definition: comm_monitor.hh:423
gem5::CommMonitor::recvTimingSnoopResp
bool recvTimingSnoopResp(PacketPtr pkt)
Definition: comm_monitor.cc:481
gem5::CommMonitor::recvTimingReq
bool recvTimingReq(PacketPtr pkt)
Definition: comm_monitor.cc:385
gem5::SimObject::params
const Params & params() const
Definition: sim_object.hh:176
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:186
ADD_STAT
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Definition: group.hh:75
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:283
gem5::CommMonitor::MonitorStats::readBurstLengthHist
statistics::Histogram readBurstLengthHist
Histogram of read burst lengths.
Definition: comm_monitor.hh:279
gem5::CommMonitor::ppPktResp
probing::PacketUPtr ppPktResp
Successfully forwarded response packet.
Definition: comm_monitor.hh:426
gem5::CommMonitor::recvRangeChange
void recvRangeChange()
Definition: comm_monitor.cc:525
gem5::CommMonitor::MonitorStats::disableBandwidthHists
bool disableBandwidthHists
Disable flag for the bandwidth histograms.
Definition: comm_monitor.hh:285
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::ResponsePort::isSnooping
bool isSnooping() const
Find out if the peer request port is snooping or not.
Definition: port.hh:291
gem5::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:525
gem5::CommMonitor::MonitorStats::ittReqReq
statistics::Distribution ittReqReq
Definition: comm_monitor.hh:325
gem5::CommMonitor::startup
void startup() override
startup() is the final initialization call before simulation.
Definition: comm_monitor.cc:569
gem5::CommMonitor::MonitorStats::outstandingWritesHist
statistics::Histogram outstandingWritesHist
Histogram of outstanding write requests.
Definition: comm_monitor.hh:346
gem5::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:81
gem5::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:370
gem5::CommMonitor::MonitorStats::ittWriteWrite
statistics::Distribution ittWriteWrite
Definition: comm_monitor.hh:324
gem5::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:387
gem5::Port::isConnected
bool isConnected() const
Is this port currently connected to a peer?
Definition: port.hh:133
gem5::RequestPort::getAddrRanges
AddrRangeList getAddrRanges() const
Get the address ranges of the connected responder port.
Definition: port.cc:151
gem5::SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:146
gem5::CommMonitor::recvFunctional
void recvFunctional(PacketPtr pkt)
Definition: comm_monitor.cc:93
gem5::CommMonitor::MonitorStats::ittReadRead
statistics::Distribution ittReadRead
Inter transaction time (ITT) distributions.
Definition: comm_monitor.hh:323
gem5::Packet::needsResponse
bool needsResponse() const
Definition: packet.hh:597
gem5::statistics::SparseHistBase::sample
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
Definition: statistics.hh:2462
core.hh
gem5::statistics::Histogram::init
Histogram & init(size_type size)
Set the parameters of this histogram.
Definition: statistics.hh:2151
gem5::Packet::senderState
SenderState * senderState
This packet's sender state.
Definition: packet.hh:534
name
const std::string & name()
Definition: trace.cc:49
gem5::CommMonitor::MonitorStats::disableTransactionHists
bool disableTransactionHists
Disable flag for transaction histograms.
Definition: comm_monitor.hh:350
gem5::ResponsePort::sendRangeChange
void sendRangeChange() const
Called by the owner to send a range change.
Definition: port.hh:296
gem5::Packet::popSenderState
SenderState * popSenderState()
Pop the top of the state stack and return a pointer to it.
Definition: packet.cc:324
gem5::ProbePointArg
ProbePointArg generates a point for the class of Arg.
Definition: thermal_domain.hh:54
gem5::CommMonitor::MonitorStats::disableBurstLengthHists
bool disableBurstLengthHists
Disable flag for burst length histograms.
Definition: comm_monitor.hh:276
gem5::SimObject::getProbeManager
ProbeManager * getProbeManager()
Get the probe manager for this object.
Definition: sim_object.cc:120
gem5::CommMonitor::tryTiming
bool tryTiming(PacketPtr pkt)
Definition: comm_monitor.cc:519
gem5::CommMonitor::Params
CommMonitorParams Params
Parameters of communication monitor.
Definition: comm_monitor.hh:69
gem5::CommMonitor::MonitorStats::timeOfLastRead
Tick timeOfLastRead
Definition: comm_monitor.hh:326
gem5::Port
Ports are used to interface objects to each other.
Definition: port.hh:61
gem5::CommMonitor::MonitorStats::updateRespStats
void updateRespStats(const probing::PacketInfo &pkt, Tick latency, bool is_atomic)
Definition: comm_monitor.cc:326
gem5::CommMonitor::MonitorStats::timeOfLastWrite
Tick timeOfLastWrite
Definition: comm_monitor.hh:327
gem5::CommMonitor::MonitorStats::readTrans
unsigned int readTrans
Definition: comm_monitor.hh:354
gem5::simSeconds
statistics::Formula & simSeconds
Definition: stats.cc:45
gem5::statistics::Group
Statistics container.
Definition: group.hh:93
gem5::CommMonitor::recvReqRetry
void recvReqRetry()
Definition: comm_monitor.cc:507
gem5::CommMonitor::MonitorStats::disableOutstandingHists
bool disableOutstandingHists
Disable flag for outstanding histograms.
Definition: comm_monitor.hh:331
gem5::statistics::Group::stats
std::vector< Info * > stats
Definition: group.hh:221
gem5::probing::PacketInfo::size
uint32_t size
Definition: mem.hh:62
gem5::CommMonitor::MonitorStats::disableITTDists
bool disableITTDists
Disable flag for ITT distributions.
Definition: comm_monitor.hh:315
gem5::CommMonitor::CommMonitorSenderState::transmitTime
Tick transmitTime
Tick when request is transmitted.
Definition: comm_monitor.hh:111
gem5::statistics::ValueBase::value
Counter value()
Definition: statistics.hh:770
gem5::CommMonitor::cpuSidePort
MonitorResponsePort cpuSidePort
Instance of response port, i.e.
Definition: comm_monitor.hh:240
gem5::CommMonitor::MonitorStats::averageWriteBandwidth
statistics::Formula averageWriteBandwidth
Definition: comm_monitor.hh:303
gem5::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:326
trace.hh
gem5::statistics::DataWrap::flags
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
Definition: statistics.hh:355
std::list< AddrRange >
gem5::CommMonitor::samplePeriod
const double samplePeriod
Sample period in seconds.
Definition: comm_monitor.hh:409
gem5::probing::PacketInfo
A struct to hold on to the essential fields from a packet, so that the packet and underlying request ...
Definition: mem.hh:58
gem5::CommMonitor::recvFunctionalSnoop
void recvFunctionalSnoop(PacketPtr pkt)
Definition: comm_monitor.cc:99
gem5::CommMonitor::MonitorStats::averageReadBandwidth
statistics::Formula averageReadBandwidth
Definition: comm_monitor.hh:294
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::CommMonitor::MonitorStats::disableAddrDists
bool disableAddrDists
Disable flag for address distributions.
Definition: comm_monitor.hh:361
gem5::CommMonitor::MonitorStats::MonitorStats
MonitorStats(statistics::Group *parent, const CommMonitorParams &params)
Create the monitor stats and initialise all the members that are not statistics themselves,...
Definition: comm_monitor.cc:104
gem5::MemCmd::isRead
bool isRead() const
Definition: packet.hh:217
gem5::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:515
gem5::CommMonitor::recvRetrySnoopResp
void recvRetrySnoopResp()
Definition: comm_monitor.cc:487
gem5::Packet::isResponse
bool isResponse() const
Definition: packet.hh:587
gem5::CommMonitor::MonitorStats::writeBandwidthHist
statistics::Histogram writeBandwidthHist
Definition: comm_monitor.hh:301
gem5::simTicks
statistics::Value & simTicks
Definition: stats.cc:46
gem5::CommMonitor::init
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Definition: comm_monitor.cc:66
gem5::CommMonitor::samplePeriodTicks
const Tick samplePeriodTicks
Length of simulation time bin.
Definition: comm_monitor.hh:407
gem5::CommMonitor::MonitorStats::outstandingWriteReqs
unsigned int outstandingWriteReqs
Definition: comm_monitor.hh:347
gem5::CommMonitor::MonitorStats::writeLatencyHist
statistics::Histogram writeLatencyHist
Histogram of write request-to-response latencies.
Definition: comm_monitor.hh:312
panic
#define panic(...)
This implements a cprintf based panic() function.
Definition: logging.hh:177
gem5::sim_clock::as_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:53
gem5::CommMonitor::MonitorStats::writeTrans
unsigned int writeTrans
Definition: comm_monitor.hh:358
gem5::CommMonitor::MonitorStats::updateReqStats
void updateReqStats(const probing::PacketInfo &pkt, bool is_atomic, bool expects_response)
Definition: comm_monitor.cc:259
gem5::CommMonitor::memSidePort
MonitorRequestPort memSidePort
Instance of request port, facing the memory side.
Definition: comm_monitor.hh:179

Generated on Tue Sep 21 2021 12:25:31 for gem5 by doxygen 1.8.17