gem5  v20.1.0.0
queued.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2015 ARM Limited
3  * All rights reserved
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions are
16  * met: redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer;
18  * redistributions in binary form must reproduce the above copyright
19  * notice, this list of conditions and the following disclaimer in the
20  * documentation and/or other materials provided with the distribution;
21  * neither the name of the copyright holders nor the names of its
22  * contributors may be used to endorse or promote products derived from
23  * this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  */
37 
39 
40 #include <cassert>
41 
42 #include "arch/generic/tlb.hh"
43 #include "base/logging.hh"
44 #include "base/trace.hh"
45 #include "debug/HWPrefetch.hh"
46 #include "mem/cache/base.hh"
47 #include "mem/request.hh"
48 #include "params/QueuedPrefetcher.hh"
49 
50 namespace Prefetcher {
51 
52 void
53 Queued::DeferredPacket::createPkt(Addr paddr, unsigned blk_size,
54  RequestorID requestor_id,
55  bool tag_prefetch,
56  Tick t) {
57  /* Create a prefetch memory request */
58  RequestPtr req = std::make_shared<Request>(paddr, blk_size,
59  0, requestor_id);
60 
61  if (pfInfo.isSecure()) {
62  req->setFlags(Request::SECURE);
63  }
65  pkt = new Packet(req, MemCmd::HardPFReq);
66  pkt->allocate();
67  if (tag_prefetch && pfInfo.hasPC()) {
68  // Tag prefetch packet with accessing pc
69  pkt->req->setPC(pfInfo.getPC());
70  }
71  tick = t;
72 }
73 
74 void
76 {
77  assert(translationRequest != nullptr);
78  if (!ongoingTranslation) {
79  ongoingTranslation = true;
80  // Prefetchers only operate in Timing mode
81  tlb->translateTiming(translationRequest, tc, this, BaseTLB::Read);
82  }
83 }
84 
85 void
87  const RequestPtr &req, ThreadContext *tc, BaseTLB::Mode mode)
88 {
89  assert(ongoingTranslation);
90  ongoingTranslation = false;
91  bool failed = (fault != NoFault);
92  owner->translationComplete(this, failed);
93 }
94 
95 Queued::Queued(const QueuedPrefetcherParams *p)
96  : Base(p), queueSize(p->queue_size),
98  p->max_prefetch_requests_with_pending_translation),
99  latency(p->latency), queueSquash(p->queue_squash),
100  queueFilter(p->queue_filter), cacheSnoop(p->cache_snoop),
101  tagPrefetch(p->tag_prefetch),
102  throttleControlPct(p->throttle_control_percentage), statsQueued(this)
103 {
104 }
105 
107 {
108  // Delete the queued prefetch packets
109  for (DeferredPacket &p : pfq) {
110  delete p.pkt;
111  }
112 }
113 
114 size_t
116 {
133  size_t max_pfs = total;
134  if (total > 0 && issuedPrefetches > 0) {
135  size_t throttle_pfs = (total * throttleControlPct) / 100;
136  size_t min_pfs = (total - throttle_pfs) == 0 ?
137  1 : (total - throttle_pfs);
138  max_pfs = min_pfs + (total - min_pfs) *
140  }
141  return max_pfs;
142 }
143 
144 void
145 Queued::notify(const PacketPtr &pkt, const PrefetchInfo &pfi)
146 {
147  Addr blk_addr = blockAddress(pfi.getAddr());
148  bool is_secure = pfi.isSecure();
149 
150  // Squash queued prefetches if demand miss to same line
151  if (queueSquash) {
152  auto itr = pfq.begin();
153  while (itr != pfq.end()) {
154  if (itr->pfInfo.getAddr() == blk_addr &&
155  itr->pfInfo.isSecure() == is_secure) {
156  delete itr->pkt;
157  itr = pfq.erase(itr);
158  } else {
159  ++itr;
160  }
161  }
162  }
163 
164  // Calculate prefetches given this access
165  std::vector<AddrPriority> addresses;
166  calculatePrefetch(pfi, addresses);
167 
168  // Get the maximu number of prefetches that we are allowed to generate
169  size_t max_pfs = getMaxPermittedPrefetches(addresses.size());
170 
171  // Queue up generated prefetches
172  size_t num_pfs = 0;
173  for (AddrPriority& addr_prio : addresses) {
174 
175  // Block align prefetch address
176  addr_prio.first = blockAddress(addr_prio.first);
177 
178  if (!samePage(addr_prio.first, pfi.getAddr())) {
179  statsQueued.pfSpanPage += 1;
180  }
181 
182  bool can_cross_page = (tlb != nullptr);
183  if (can_cross_page || samePage(addr_prio.first, pfi.getAddr())) {
184  PrefetchInfo new_pfi(pfi,addr_prio.first);
186  DPRINTF(HWPrefetch, "Found a pf candidate addr: %#x, "
187  "inserting into prefetch queue.\n", new_pfi.getAddr());
188  // Create and insert the request
189  insert(pkt, new_pfi, addr_prio.second);
190  num_pfs += 1;
191  if (num_pfs == max_pfs) {
192  break;
193  }
194  } else {
195  DPRINTF(HWPrefetch, "Ignoring page crossing prefetch.\n");
196  }
197  }
198 }
199 
200 PacketPtr
202 {
203  DPRINTF(HWPrefetch, "Requesting a prefetch to issue.\n");
204 
205  if (pfq.empty()) {
206  // If the queue is empty, attempt first to fill it with requests
207  // from the queue of missing translations
209  }
210 
211  if (pfq.empty()) {
212  DPRINTF(HWPrefetch, "No hardware prefetches available.\n");
213  return nullptr;
214  }
215 
216  PacketPtr pkt = pfq.front().pkt;
217  pfq.pop_front();
218 
220  issuedPrefetches += 1;
221  assert(pkt != nullptr);
222  DPRINTF(HWPrefetch, "Generating prefetch for %#x.\n", pkt->getAddr());
223 
225  return pkt;
226 }
228  : Stats::Group(parent),
229  ADD_STAT(pfIdentified, "number of prefetch candidates identified"),
230  ADD_STAT(pfBufferHit,
231  "number of redundant prefetches already in prefetch queue"),
232  ADD_STAT(pfInCache,
233  "number of redundant prefetches already in cache/mshr dropped"),
234  ADD_STAT(pfRemovedFull,
235  "number of prefetches dropped due to prefetch queue size"),
236  ADD_STAT(pfSpanPage, "number of prefetches that crossed the page")
237 {
238 }
239 
240 
241 void
243 {
244  unsigned count = 0;
245  iterator it = pfqMissingTranslation.begin();
246  while (it != pfqMissingTranslation.end() && count < max) {
247  DeferredPacket &dp = *it;
248  // Increase the iterator first because dp.startTranslation can end up
249  // calling finishTranslation, which will erase "it"
250  it++;
251  dp.startTranslation(tlb);
252  count += 1;
253  }
254 }
255 
256 void
258 {
259  auto it = pfqMissingTranslation.begin();
260  while (it != pfqMissingTranslation.end()) {
261  if (&(*it) == dp) {
262  break;
263  }
264  it++;
265  }
266  assert(it != pfqMissingTranslation.end());
267  if (!failed) {
268  DPRINTF(HWPrefetch, "%s Translation of vaddr %#x succeeded: "
269  "paddr %#x \n", tlb->name(),
270  it->translationRequest->getVaddr(),
271  it->translationRequest->getPaddr());
272  Addr target_paddr = it->translationRequest->getPaddr();
273  // check if this prefetch is already redundant
274  if (cacheSnoop && (inCache(target_paddr, it->pfInfo.isSecure()) ||
275  inMissQueue(target_paddr, it->pfInfo.isSecure()))) {
277  DPRINTF(HWPrefetch, "Dropping redundant in "
278  "cache/MSHR prefetch addr:%#x\n", target_paddr);
279  } else {
280  Tick pf_time = curTick() + clockPeriod() * latency;
281  it->createPkt(it->translationRequest->getPaddr(), blkSize,
282  requestorId, tagPrefetch, pf_time);
283  addToQueue(pfq, *it);
284  }
285  } else {
286  DPRINTF(HWPrefetch, "%s Translation of vaddr %#x failed, dropping "
287  "prefetch request %#x \n", tlb->name(),
288  it->translationRequest->getVaddr());
289  }
290  pfqMissingTranslation.erase(it);
291 }
292 
293 bool
295  const PrefetchInfo &pfi, int32_t priority)
296 {
297  bool found = false;
298  iterator it;
299  for (it = queue.begin(); it != queue.end() && !found; it++) {
300  found = it->pfInfo.sameAddr(pfi);
301  }
302 
303  /* If the address is already in the queue, update priority and leave */
304  if (it != queue.end()) {
306  if (it->priority < priority) {
307  /* Update priority value and position in the queue */
308  it->priority = priority;
309  iterator prev = it;
310  while (prev != queue.begin()) {
311  prev--;
312  /* If the packet has higher priority, swap */
313  if (*it > *prev) {
314  std::swap(*it, *prev);
315  it = prev;
316  }
317  }
318  DPRINTF(HWPrefetch, "Prefetch addr already in "
319  "prefetch queue, priority updated\n");
320  } else {
321  DPRINTF(HWPrefetch, "Prefetch addr already in "
322  "prefetch queue\n");
323  }
324  }
325  return found;
326 }
327 
330  PacketPtr pkt)
331 {
332  RequestPtr translation_req = std::make_shared<Request>(
333  addr, blkSize, pkt->req->getFlags(), requestorId, pfi.getPC(),
334  pkt->req->contextId());
335  translation_req->setFlags(Request::PREFETCH);
336  return translation_req;
337 }
338 
339 void
340 Queued::insert(const PacketPtr &pkt, PrefetchInfo &new_pfi,
341  int32_t priority)
342 {
343  if (queueFilter) {
344  if (alreadyInQueue(pfq, new_pfi, priority)) {
345  return;
346  }
347  if (alreadyInQueue(pfqMissingTranslation, new_pfi, priority)) {
348  return;
349  }
350  }
351 
352  /*
353  * Physical address computation
354  * if the prefetch is within the same page
355  * using VA: add the computed stride to the original PA
356  * using PA: no actions needed
357  * if we are page crossing
358  * using VA: Create a translaion request and enqueue the corresponding
359  * deferred packet to the queue of pending translations
360  * using PA: use the provided VA to obtain the target VA, then attempt to
361  * translate the resulting address
362  */
363 
364  Addr orig_addr = useVirtualAddresses ?
365  pkt->req->getVaddr() : pkt->req->getPaddr();
366  bool positive_stride = new_pfi.getAddr() >= orig_addr;
367  Addr stride = positive_stride ?
368  (new_pfi.getAddr() - orig_addr) : (orig_addr - new_pfi.getAddr());
369 
370  Addr target_paddr;
371  bool has_target_pa = false;
372  RequestPtr translation_req = nullptr;
373  if (samePage(orig_addr, new_pfi.getAddr())) {
374  if (useVirtualAddresses) {
375  // if we trained with virtual addresses,
376  // compute the target PA using the original PA and adding the
377  // prefetch stride (difference between target VA and original VA)
378  target_paddr = positive_stride ? (pkt->req->getPaddr() + stride) :
379  (pkt->req->getPaddr() - stride);
380  } else {
381  target_paddr = new_pfi.getAddr();
382  }
383  has_target_pa = true;
384  } else {
385  // Page crossing reference
386 
387  // ContextID is needed for translation
388  if (!pkt->req->hasContextId()) {
389  return;
390  }
391  if (useVirtualAddresses) {
392  has_target_pa = false;
393  translation_req = createPrefetchRequest(new_pfi.getAddr(), new_pfi,
394  pkt);
395  } else if (pkt->req->hasVaddr()) {
396  has_target_pa = false;
397  // Compute the target VA using req->getVaddr + stride
398  Addr target_vaddr = positive_stride ?
399  (pkt->req->getVaddr() + stride) :
400  (pkt->req->getVaddr() - stride);
401  translation_req = createPrefetchRequest(target_vaddr, new_pfi,
402  pkt);
403  } else {
404  // Using PA for training but the request does not have a VA,
405  // unable to process this page crossing prefetch.
406  return;
407  }
408  }
409  if (has_target_pa && cacheSnoop &&
410  (inCache(target_paddr, new_pfi.isSecure()) ||
411  inMissQueue(target_paddr, new_pfi.isSecure()))) {
413  DPRINTF(HWPrefetch, "Dropping redundant in "
414  "cache/MSHR prefetch addr:%#x\n", target_paddr);
415  return;
416  }
417 
418  /* Create the packet and find the spot to insert it */
419  DeferredPacket dpp(this, new_pfi, 0, priority);
420  if (has_target_pa) {
421  Tick pf_time = curTick() + clockPeriod() * latency;
422  dpp.createPkt(target_paddr, blkSize, requestorId, tagPrefetch,
423  pf_time);
424  DPRINTF(HWPrefetch, "Prefetch queued. "
425  "addr:%#x priority: %3d tick:%lld.\n",
426  new_pfi.getAddr(), priority, pf_time);
427  addToQueue(pfq, dpp);
428  } else {
429  // Add the translation request and try to resolve it later
430  dpp.setTranslationRequest(translation_req);
431  dpp.tc = cache->system->threads[translation_req->contextId()];
432  DPRINTF(HWPrefetch, "Prefetch queued with no translation. "
433  "addr:%#x priority: %3d\n", new_pfi.getAddr(), priority);
435  }
436 }
437 
438 void
440  DeferredPacket &dpp)
441 {
442  /* Verify prefetch buffer space for request */
443  if (queue.size() == queueSize) {
445  /* Lowest priority packet */
446  iterator it = queue.end();
447  panic_if (it == queue.begin(),
448  "Prefetch queue is both full and empty!");
449  --it;
450  /* Look for oldest in that level of priority */
451  panic_if (it == queue.begin(),
452  "Prefetch queue is full with 1 element!");
453  iterator prev = it;
454  bool cont = true;
455  /* While not at the head of the queue */
456  while (cont && prev != queue.begin()) {
457  prev--;
458  /* While at the same level of priority */
459  cont = prev->priority == it->priority;
460  if (cont)
461  /* update pointer */
462  it = prev;
463  }
464  DPRINTF(HWPrefetch, "Prefetch queue full, removing lowest priority "
465  "oldest packet, addr: %#x\n",it->pfInfo.getAddr());
466  delete it->pkt;
467  queue.erase(it);
468  }
469 
470  if (queue.size() == 0) {
471  queue.emplace_back(dpp);
472  } else {
473  iterator it = queue.end();
474  do {
475  --it;
476  } while (it != queue.begin() && dpp > *it);
477  /* If we reach the head, we have to see if the new element is new head
478  * or not */
479  if (it == queue.begin() && dpp <= *it)
480  it++;
481  queue.insert(it, dpp);
482  }
483 }
484 
485 } // namespace Prefetcher
Prefetcher::Queued::DeferredPacket
Definition: queued.hh:57
Prefetcher::Base::cache
BaseCache * cache
Pointr to the parent cache.
Definition: base.hh:259
Prefetcher::Base::StatGroup::pfIssued
Stats::Scalar pfIssued
Definition: base.hh:323
Prefetcher::Queued::QueuedStats::pfBufferHit
Stats::Scalar pfBufferHit
Definition: queued.hh:176
Prefetcher::Queued::QueuedStats::QueuedStats
QueuedStats(Stats::Group *parent)
Definition: queued.cc:227
base.hh
Prefetcher::Queued::pfqMissingTranslation
std::list< DeferredPacket > pfqMissingTranslation
Definition: queued.hh:137
BaseTLB::Read
@ Read
Definition: tlb.hh:57
Prefetcher::Base::useVirtualAddresses
const bool useVirtualAddresses
Use Virtual Addresses for prefetching.
Definition: base.hh:291
Packet::getAddr
Addr getAddr() const
Definition: packet.hh:754
MemCmd::HardPFReq
@ HardPFReq
Definition: packet.hh:94
BaseCache::system
System * system
System we are currently operating in.
Definition: base.hh:921
Prefetcher::Base::blkSize
unsigned blkSize
The block size of the parent cache.
Definition: base.hh:262
Prefetcher::Queued::insert
void insert(const PacketPtr &pkt, PrefetchInfo &new_pfi, int32_t priority)
Definition: queued.cc:340
Prefetcher::Base::PrefetchInfo::getPC
Addr getPC() const
Returns the program counter that generated this request.
Definition: base.hh:135
Prefetcher::Queued::createPrefetchRequest
RequestPtr createPrefetchRequest(Addr addr, PrefetchInfo const &pfi, PacketPtr pkt)
Definition: queued.cc:329
ArmISA::dp
Bitfield< 47, 44 > dp
Definition: miscregs_types.hh:91
Prefetcher::Queued::alreadyInQueue
bool alreadyInQueue(std::list< DeferredPacket > &queue, const PrefetchInfo &pfi, int32_t priority)
Checks whether the specified prefetch request is already in the specified queue.
Definition: queued.cc:294
tlb.hh
Prefetcher::Queued::DeferredPacket::tick
Tick tick
Time when this prefetch becomes ready.
Definition: queued.hh:63
BaseTLB::translateTiming
virtual void translateTiming(const RequestPtr &req, ThreadContext *tc, Translation *translation, Mode mode)=0
BaseTLB::Mode
Mode
Definition: tlb.hh:57
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
Prefetcher::Queued::translationComplete
void translationComplete(DeferredPacket *dp, bool failed)
Indicates that the translation of the address of the provided deferred packet has been successfully c...
Definition: queued.cc:257
RequestPtr
std::shared_ptr< Request > RequestPtr
Definition: request.hh:82
Packet::req
RequestPtr req
A pointer to the original request.
Definition: packet.hh:340
Prefetcher::Queued::Queued
Queued(const QueuedPrefetcherParams *p)
Definition: queued.cc:95
Prefetcher::Base::inCache
bool inCache(Addr addr, bool is_secure) const
Determine if address is in cache.
Definition: base.cc:145
std::vector
STL vector class.
Definition: stl.hh:37
X86ISA::count
count
Definition: misc.hh:703
Prefetcher::Queued::DeferredPacket::finish
void finish(const Fault &fault, const RequestPtr &req, ThreadContext *tc, BaseTLB::Mode mode) override
Definition: queued.cc:86
Prefetcher::Queued::tagPrefetch
const bool tagPrefetch
Tag prefetch with PC of generating access?
Definition: queued.hh:166
Prefetcher::Base::usefulPrefetches
uint64_t usefulPrefetches
Total prefetches that has been useful.
Definition: base.hh:329
request.hh
BaseTLB
Definition: tlb.hh:50
queued.hh
Prefetcher::Base
Definition: base.hh:65
Prefetcher::Queued::throttleControlPct
const unsigned int throttleControlPct
Percentage of requests that can be throttled.
Definition: queued.hh:169
Prefetcher::Queued::notify
void notify(const PacketPtr &pkt, const PrefetchInfo &pfi) override
Notify prefetcher of cache access (may be any access or just misses, depending on cache parameters....
Definition: queued.cc:145
Prefetcher::Base::prefetchStats
Prefetcher::Base::StatGroup prefetchStats
Prefetcher::Queued::DeferredPacket::tc
ThreadContext * tc
Definition: queued.hh:70
Prefetcher::Queued::~Queued
virtual ~Queued()
Definition: queued.cc:106
Prefetcher::Queued::QueuedStats::pfIdentified
Stats::Scalar pfIdentified
Definition: queued.hh:175
RequestorID
uint16_t RequestorID
Definition: request.hh:85
Prefetcher::Queued::latency
const Cycles latency
Cycles after generation when a prefetch can first be issued.
Definition: queued.hh:154
Prefetcher::Base::tlb
BaseTLB * tlb
Registered tlb for address translations.
Definition: base.hh:332
Request::SECURE
@ SECURE
The request targets the secure memory space.
Definition: request.hh:173
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
Prefetcher::Queued::queueFilter
const bool queueFilter
Filter prefetches if already queued.
Definition: queued.hh:160
DPRINTF
#define DPRINTF(x,...)
Definition: trace.hh:234
Request::PREFETCH
@ PREFETCH
The request is a prefetch.
Definition: request.hh:151
ADD_STAT
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Definition: group.hh:67
ContextSwitchTaskId::Prefetcher
@ Prefetcher
Definition: request.hh:73
Fault
std::shared_ptr< FaultBase > Fault
Definition: types.hh:240
ArmISA::mode
Bitfield< 4, 0 > mode
Definition: miscregs_types.hh:70
Prefetcher::Queued::getPacket
PacketPtr getPacket() override
Definition: queued.cc:201
Prefetcher::Queued::queueSize
const unsigned queueSize
Maximum size of the prefetch queue.
Definition: queued.hh:145
Prefetcher
Copyright (c) 2018 Metempsy Technology Consulting All rights reserved.
Definition: base.hh:78
Prefetcher::Queued::DeferredPacket::createPkt
void createPkt(Addr paddr, unsigned blk_size, RequestorID requestor_id, bool tag_prefetch, Tick t)
Create the associated memory packet.
Definition: queued.cc:53
Prefetcher::Queued::calculatePrefetch
virtual void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses)=0
std::pair
STL pair class.
Definition: stl.hh:58
Prefetcher::Queued::cacheSnoop
const bool cacheSnoop
Snoop the cache before generating prefetch (cheating basically)
Definition: queued.hh:163
NoFault
constexpr decltype(nullptr) NoFault
Definition: types.hh:245
ProbePoints::Packet
ProbePointArg< PacketInfo > Packet
Packet probe point.
Definition: mem.hh:103
Prefetcher::Queued::missingTranslationQueueSize
const unsigned missingTranslationQueueSize
Maximum size of the queue holding prefetch requests with missing address translations.
Definition: queued.hh:151
Prefetcher::Queued::QueuedStats::pfInCache
Stats::Scalar pfInCache
Definition: queued.hh:177
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
Clocked::clockPeriod
Tick clockPeriod() const
Definition: clocked_object.hh:214
Prefetcher::Queued::pfq
std::list< DeferredPacket > pfq
Definition: queued.hh:136
SimObject::name
virtual const std::string name() const
Definition: sim_object.hh:133
Prefetcher::Base::PrefetchInfo::isSecure
bool isSecure() const
Returns true if the address targets the secure memory space.
Definition: base.hh:126
panic_if
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Definition: logging.hh:197
System::threads
Threads threads
Definition: system.hh:309
Prefetcher::Base::issuedPrefetches
uint64_t issuedPrefetches
Total prefetches issued.
Definition: base.hh:327
Prefetcher::Queued::getMaxPermittedPrefetches
size_t getMaxPermittedPrefetches(size_t total) const
Returns the maxmimum number of prefetch requests that are allowed to be created from the number of pr...
Definition: queued.cc:115
Prefetcher::Base::requestorId
const RequestorID requestorId
Request id for prefetches.
Definition: base.hh:283
Prefetcher::Queued::iterator
std::list< DeferredPacket >::iterator iterator
Definition: queued.hh:140
ArmISA::t
Bitfield< 5 > t
Definition: miscregs_types.hh:67
Prefetcher::Queued::DeferredPacket::startTranslation
void startTranslation(BaseTLB *tlb)
Issues the translation request to the provided TLB.
Definition: queued.cc:75
Prefetcher::Queued::DeferredPacket::setTranslationRequest
void setTranslationRequest(const RequestPtr &req)
Sets the translation request needed to obtain the physical address of this request.
Definition: queued.hh:118
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
addr
ip6_addr_t addr
Definition: inet.hh:423
Prefetcher::Base::PrefetchInfo
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Definition: base.hh:90
ArmISA::stride
Bitfield< 21, 20 > stride
Definition: miscregs_types.hh:441
logging.hh
Prefetcher::Queued::DeferredPacket::pkt
PacketPtr pkt
The memory packet generated by this prefetch.
Definition: queued.hh:65
Stats
Definition: statistics.cc:61
trace.hh
Prefetcher::Queued::QueuedStats::pfSpanPage
Stats::Scalar pfSpanPage
Definition: queued.hh:179
Prefetcher::Queued::statsQueued
Prefetcher::Queued::QueuedStats statsQueued
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
Prefetcher::Base::blockAddress
Addr blockAddress(Addr a) const
Determine the address of the block in which a lays.
Definition: base.cc:169
std::list< DeferredPacket >
Prefetcher::Base::inMissQueue
bool inMissQueue(Addr addr, bool is_secure) const
Determine if address is in cache miss queue.
Definition: base.cc:151
Packet::allocate
void allocate()
Allocate memory for the packet.
Definition: packet.hh:1299
Prefetcher::Base::samePage
bool samePage(Addr a, Addr b) const
Determine if addresses are on the same page.
Definition: base.cc:163
Stats::total
const FlagsType total
Print the total.
Definition: info.hh:49
Prefetcher::Queued::DeferredPacket::pfInfo
PrefetchInfo pfInfo
Prefetch info corresponding to this packet.
Definition: queued.hh:61
Prefetcher::Base::PrefetchInfo::getAddr
Addr getAddr() const
Obtains the address value of this Prefetcher address.
Definition: base.hh:117
Prefetcher::Base::PrefetchInfo::hasPC
bool hasPC() const
Returns true if the associated program counter is valid.
Definition: base.hh:145
Prefetcher::Queued::addToQueue
void addToQueue(std::list< DeferredPacket > &queue, DeferredPacket &dpp)
Adds a DeferredPacket to the specified queue.
Definition: queued.cc:439
Prefetcher::Queued::QueuedStats::pfRemovedFull
Stats::Scalar pfRemovedFull
Definition: queued.hh:178
Prefetcher::Queued::processMissingTranslations
void processMissingTranslations(unsigned max)
Starts the translations of the queued prefetches with a missing translation.
Definition: queued.cc:242
curTick
Tick curTick()
The current simulated tick.
Definition: core.hh:45
Prefetcher::Queued::queueSquash
const bool queueSquash
Squash queued prefetch if demand access observed.
Definition: queued.hh:157

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