Deleted Added
sdiff udiff text old ( 12555:4ecdaa830686 ) new ( 12557:16b682f1d8a2 )
full compact
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
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 ---