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 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++; |
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 --- |