;
occupancies
- .init(cache->numCpus())
+ .init(cache->numCpus() + 1)
.name(name + ".occ_blocks")
.desc("Average occupied blocks per context")
.flags(nozero | nonan)
if (blk->contextSrc != -1) {
occupancies[blk->contextSrc % cache->numCpus()]--;
blk->contextSrc = -1;
+ } else {
+ occupancies[cache->numCpus()]--;
}
DPRINTF(CacheRepl, "set %x: selecting blk %x for replacement\n",
// deal with what we are bringing in
if (context_src != -1) {
occupancies[context_src % cache->numCpus()]++;
- blk->contextSrc = context_src;
+ } else {
+ occupancies[cache->numCpus()]++;
}
+ blk->contextSrc = context_src;
unsigned set = extractSet(addr);
sets[set].moveToHead(blk);
if (blk->contextSrc != -1) {
occupancies[blk->contextSrc % cache->numCpus()]--;
blk->contextSrc = -1;
+ } else {
+ occupancies[cache->numCpus()]--;
}
}
}