base.cc (6658:f4de76601762) | base.cc (6665:874f2ee2f115) |
---|---|
1/* 2 * Copyright (c) 2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 31 unchanged lines hidden (view full) --- 40#include "config/the_isa.hh" 41#include "mem/cache/base.hh" 42#include "mem/cache/prefetch/base.hh" 43#include "mem/request.hh" 44 45BasePrefetcher::BasePrefetcher(const BaseCacheParams *p) 46 : size(p->prefetcher_size), pageStop(!p->prefetch_past_page), 47 serialSquash(p->prefetch_serial_squash), | 1/* 2 * Copyright (c) 2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 31 unchanged lines hidden (view full) --- 40#include "config/the_isa.hh" 41#include "mem/cache/base.hh" 42#include "mem/cache/prefetch/base.hh" 43#include "mem/request.hh" 44 45BasePrefetcher::BasePrefetcher(const BaseCacheParams *p) 46 : size(p->prefetcher_size), pageStop(!p->prefetch_past_page), 47 serialSquash(p->prefetch_serial_squash), |
48 cacheCheckPush(p->prefetch_cache_check_push), | |
49 onlyData(p->prefetch_data_accesses_only) 50{ 51} 52 53void 54BasePrefetcher::setCache(BaseCache *_cache) 55{ 56 cache = _cache; --- 81 unchanged lines hidden (view full) --- 138 return NULL; 139 } 140 141 PacketPtr pkt; 142 bool keep_trying = false; 143 do { 144 pkt = *pf.begin(); 145 pf.pop_front(); | 48 onlyData(p->prefetch_data_accesses_only) 49{ 50} 51 52void 53BasePrefetcher::setCache(BaseCache *_cache) 54{ 55 cache = _cache; --- 81 unchanged lines hidden (view full) --- 137 return NULL; 138 } 139 140 PacketPtr pkt; 141 bool keep_trying = false; 142 do { 143 pkt = *pf.begin(); 144 pf.pop_front(); |
146 if (!cacheCheckPush) { 147 keep_trying = cache->inCache(pkt->getAddr()); 148 } | |
149 150 if (keep_trying) { 151 DPRINTF(HWPrefetch, "addr 0x%x in cache, skipping\n", 152 pkt->getAddr()); 153 delete pkt->req; 154 delete pkt; 155 } 156 --- 64 unchanged lines hidden (view full) --- 221 Addr addr = *addrIter; 222 223 pfIdentified++; 224 225 DPRINTF(HWPrefetch, "Found a pf candidate addr: 0x%x, " 226 "inserting into prefetch queue with delay %d time %d\n", 227 addr, *delayIter, time); 228 | 145 146 if (keep_trying) { 147 DPRINTF(HWPrefetch, "addr 0x%x in cache, skipping\n", 148 pkt->getAddr()); 149 delete pkt->req; 150 delete pkt; 151 } 152 --- 64 unchanged lines hidden (view full) --- 217 Addr addr = *addrIter; 218 219 pfIdentified++; 220 221 DPRINTF(HWPrefetch, "Found a pf candidate addr: 0x%x, " 222 "inserting into prefetch queue with delay %d time %d\n", 223 addr, *delayIter, time); 224 |
229 // Check if it is already in the cache 230 if (cacheCheckPush && cache->inCache(addr)) { 231 DPRINTF(HWPrefetch, "Prefetch addr already in cache\n"); 232 continue; 233 } 234 235 // Check if it is already in the miss_queue 236 if (cache->inMissQueue(addr)) { 237 DPRINTF(HWPrefetch, "Prefetch addr already in miss queue\n"); 238 continue; 239 } 240 | |
241 // Check if it is already in the pf buffer 242 if (inPrefetch(addr) != pf.end()) { 243 pfBufferHit++; 244 DPRINTF(HWPrefetch, "Prefetch addr already in pf buffer\n"); 245 continue; 246 } 247 248 // create a prefetch memreq --- 45 unchanged lines hidden --- | 225 // Check if it is already in the pf buffer 226 if (inPrefetch(addr) != pf.end()) { 227 pfBufferHit++; 228 DPRINTF(HWPrefetch, "Prefetch addr already in pf buffer\n"); 229 continue; 230 } 231 232 // create a prefetch memreq --- 45 unchanged lines hidden --- |