1/* 2 * Copyright (c) 2013,2016 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 --- 64 unchanged lines hidden (view full) --- 73} 74 75void 76BaseTags::insertBlock(PacketPtr pkt, CacheBlk *blk) 77{ 78 // Get address 79 Addr addr = pkt->getAddr(); 80 |
81 // If we're replacing a block that was previously valid update 82 // stats for it. This can't be done in findBlock() because a 83 // found block might not actually be replaced there if the 84 // coherence protocol says it can't be. 85 if (blk->isValid()) { 86 totalRefs += blk->refCount; 87 ++sampledRefs; 88 89 invalidate(blk); 90 blk->invalidate(); 91 } 92 93 // Previous block, if existed, has been removed, and now we have 94 // to insert the new one |
95 96 // Deal with what we are bringing in 97 MasterID master_id = pkt->req->masterId(); 98 assert(master_id < cache->system->maxMasters()); 99 occupancies[master_id]++; 100 101 // Insert block with tag, src master id and task id 102 blk->insert(extractTag(addr), pkt->isSecure(), master_id, 103 pkt->req->taskId()); 104 |
105 tagsInUse++; 106 if (!warmedUp && tagsInUse.value() >= warmupBound) { 107 warmedUp = true; 108 warmupCycle = curTick(); 109 } 110 |
111 // We only need to write into one tag and one data block. 112 tagAccesses += 1; 113 dataAccesses += 1; 114} 115 116void 117BaseTags::regStats() 118{ --- 87 unchanged lines hidden --- |