base_set_assoc.hh (12555:4ecdaa830686) | base_set_assoc.hh (12557:16b682f1d8a2) |
---|---|
1/* 2 * Copyright (c) 2012-2014 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 --- 225 unchanged lines hidden (view full) --- 234 */ 235 void insertBlock(PacketPtr pkt, CacheBlk *blk) override 236 { 237 Addr addr = pkt->getAddr(); 238 MasterID master_id = pkt->req->masterId(); 239 uint32_t task_id = pkt->req->taskId(); 240 241 if (!blk->isTouched) { | 1/* 2 * Copyright (c) 2012-2014 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 --- 225 unchanged lines hidden (view full) --- 234 */ 235 void insertBlock(PacketPtr pkt, CacheBlk *blk) override 236 { 237 Addr addr = pkt->getAddr(); 238 MasterID master_id = pkt->req->masterId(); 239 uint32_t task_id = pkt->req->taskId(); 240 241 if (!blk->isTouched) { |
242 tagsInUse++; 243 blk->isTouched = true; | |
244 if (!warmedUp && tagsInUse.value() >= warmupBound) { 245 warmedUp = true; 246 warmupCycle = curTick(); 247 } 248 } 249 250 // If we're replacing a block that was previously valid update 251 // stats for it. This can't be done in findBlock() because a 252 // found block might not actually be replaced there if the 253 // coherence protocol says it can't be. 254 if (blk->isValid()) { 255 replacements[0]++; 256 totalRefs += blk->refCount; 257 ++sampledRefs; 258 259 invalidate(blk); 260 blk->invalidate(); 261 } 262 | 242 if (!warmedUp && tagsInUse.value() >= warmupBound) { 243 warmedUp = true; 244 warmupCycle = curTick(); 245 } 246 } 247 248 // If we're replacing a block that was previously valid update 249 // stats for it. This can't be done in findBlock() because a 250 // found block might not actually be replaced there if the 251 // coherence protocol says it can't be. 252 if (blk->isValid()) { 253 replacements[0]++; 254 totalRefs += blk->refCount; 255 ++sampledRefs; 256 257 invalidate(blk); 258 blk->invalidate(); 259 } 260 |
261 // Previous block, if existed, has been removed, and now we have 262 // to insert the new one and mark it as touched 263 tagsInUse++; |
|
263 blk->isTouched = true; 264 265 // Set tag for new block. Caller is responsible for setting status. 266 blk->tag = extractTag(addr); 267 268 // deal with what we are bringing in 269 assert(master_id < cache->system->maxMasters()); 270 occupancies[master_id]++; --- 95 unchanged lines hidden --- | 264 blk->isTouched = true; 265 266 // Set tag for new block. Caller is responsible for setting status. 267 blk->tag = extractTag(addr); 268 269 // deal with what we are bringing in 270 assert(master_id < cache->system->maxMasters()); 271 occupancies[master_id]++; --- 95 unchanged lines hidden --- |