snoop_filter.cc (14122:11979370f6f8) | snoop_filter.cc (14123:3525a51d01ef) |
---|---|
1/* 2 * Copyright (c) 2013-2017,2019 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 --- 192 unchanged lines hidden (view full) --- 201 // If the snoop filter has no entry, simply return a NULL 202 // portlist, there is no point creating an entry only to remove it 203 // later 204 if (!is_hit) 205 return snoopDown(lookupLatency); 206 207 SnoopItem& sf_item = sf_it->second; 208 | 1/* 2 * Copyright (c) 2013-2017,2019 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 --- 192 unchanged lines hidden (view full) --- 201 // If the snoop filter has no entry, simply return a NULL 202 // portlist, there is no point creating an entry only to remove it 203 // later 204 if (!is_hit) 205 return snoopDown(lookupLatency); 206 207 SnoopItem& sf_item = sf_it->second; 208 |
209 DPRINTF(SnoopFilter, "%s: old SF value %x.%x\n", 210 __func__, sf_item.requested, sf_item.holder); 211 | |
212 SnoopMask interested = (sf_item.holder | sf_item.requested); 213 214 totSnoops++; 215 216 if (interested.count() == 1) 217 hitSingleSnoops++; 218 else 219 hitMultiSnoops++; --- 7 unchanged lines hidden (view full) --- 227 // caches down to the specified point of reference. 228 assert(cpkt->isWriteback() || cpkt->req->isUncacheable() || 229 (cpkt->isInvalidate() == cpkt->needsWritable()) || 230 cpkt->req->isCacheMaintenance()); 231 if (cpkt->isInvalidate() && sf_item.requested.none()) { 232 // Early clear of the holder, if no other request is currently going on 233 // @todo: This should possibly be updated even though we do not filter 234 // upward snoops | 209 SnoopMask interested = (sf_item.holder | sf_item.requested); 210 211 totSnoops++; 212 213 if (interested.count() == 1) 214 hitSingleSnoops++; 215 else 216 hitMultiSnoops++; --- 7 unchanged lines hidden (view full) --- 224 // caches down to the specified point of reference. 225 assert(cpkt->isWriteback() || cpkt->req->isUncacheable() || 226 (cpkt->isInvalidate() == cpkt->needsWritable()) || 227 cpkt->req->isCacheMaintenance()); 228 if (cpkt->isInvalidate() && sf_item.requested.none()) { 229 // Early clear of the holder, if no other request is currently going on 230 // @todo: This should possibly be updated even though we do not filter 231 // upward snoops |
232 DPRINTF(SnoopFilter, "%s: old SF value %x.%x\n", 233 __func__, sf_item.requested, sf_item.holder); |
|
235 sf_item.holder = 0; | 234 sf_item.holder = 0; |
235 DPRINTF(SnoopFilter, "%s: new SF value %x.%x\n", 236 __func__, sf_item.requested, sf_item.holder); 237 eraseIfNullEntry(sf_it); |
|
236 } 237 | 238 } 239 |
238 eraseIfNullEntry(sf_it); 239 DPRINTF(SnoopFilter, "%s: new SF value %x.%x interest: %x \n", 240 __func__, sf_item.requested, sf_item.holder, interested); 241 | |
242 return snoopSelected(maskToPortList(interested), lookupLatency); 243} 244 245void 246SnoopFilter::updateSnoopResponse(const Packet* cpkt, 247 const SlavePort& rsp_port, 248 const SlavePort& req_port) 249{ --- 65 unchanged lines hidden (view full) --- 315 } 316 auto sf_it = cachedLocations.find(line_addr); 317 bool is_hit = sf_it != cachedLocations.end(); 318 319 // Nothing to do if it is not a hit 320 if (!is_hit) 321 return; 322 | 240 return snoopSelected(maskToPortList(interested), lookupLatency); 241} 242 243void 244SnoopFilter::updateSnoopResponse(const Packet* cpkt, 245 const SlavePort& rsp_port, 246 const SlavePort& req_port) 247{ --- 65 unchanged lines hidden (view full) --- 313 } 314 auto sf_it = cachedLocations.find(line_addr); 315 bool is_hit = sf_it != cachedLocations.end(); 316 317 // Nothing to do if it is not a hit 318 if (!is_hit) 319 return; 320 |
323 SnoopItem& sf_item = sf_it->second; 324 325 DPRINTF(SnoopFilter, "%s: old SF value %x.%x\n", 326 __func__, sf_item.requested, sf_item.holder); 327 | |
328 // If the snoop response has no sharers the line is passed in 329 // Modified state, and we know that there are no other copies, or 330 // they will all be invalidated imminently 331 if (!cpkt->hasSharers()) { | 321 // If the snoop response has no sharers the line is passed in 322 // Modified state, and we know that there are no other copies, or 323 // they will all be invalidated imminently 324 if (!cpkt->hasSharers()) { |
325 SnoopItem& sf_item = sf_it->second; 326 327 DPRINTF(SnoopFilter, "%s: old SF value %x.%x\n", 328 __func__, sf_item.requested, sf_item.holder); |
|
332 sf_item.holder = 0; | 329 sf_item.holder = 0; |
333 } 334 DPRINTF(SnoopFilter, "%s: new SF value %x.%x\n", 335 __func__, sf_item.requested, sf_item.holder); 336 eraseIfNullEntry(sf_it); | 330 DPRINTF(SnoopFilter, "%s: new SF value %x.%x\n", 331 __func__, sf_item.requested, sf_item.holder); |
337 | 332 |
333 eraseIfNullEntry(sf_it); 334 } |
|
338} 339 340void 341SnoopFilter::updateResponse(const Packet* cpkt, const SlavePort& slave_port) 342{ 343 DPRINTF(SnoopFilter, "%s: src %s packet %s\n", 344 __func__, slave_port.name(), cpkt->print()); 345 --- 86 unchanged lines hidden --- | 335} 336 337void 338SnoopFilter::updateResponse(const Packet* cpkt, const SlavePort& slave_port) 339{ 340 DPRINTF(SnoopFilter, "%s: src %s packet %s\n", 341 __func__, slave_port.name(), cpkt->print()); 342 --- 86 unchanged lines hidden --- |