base.cc (12691:8e1371fde4be) | base.cc (12702:27cb33a96e0f) |
---|---|
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 --- 34 unchanged lines hidden (view full) --- 43 44/** 45 * @file 46 * Definitions of BaseTags. 47 */ 48 49#include "mem/cache/tags/base.hh" 50 | 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 --- 34 unchanged lines hidden (view full) --- 43 44/** 45 * @file 46 * Definitions of BaseTags. 47 */ 48 49#include "mem/cache/tags/base.hh" 50 |
51#include "cpu/smt.hh" //maxThreadsPerCPU | |
52#include "mem/cache/base.hh" 53#include "sim/sim_exit.hh" 54 55BaseTags::BaseTags(const Params *p) 56 : ClockedObject(p), blkSize(p->block_size), blkMask(blkSize - 1), 57 size(p->size), 58 lookupLatency(p->tag_latency), 59 accessLatency(p->sequential_access ? --- 27 unchanged lines hidden (view full) --- 87 } 88 } 89 90 // If we're replacing a block that was previously valid update 91 // stats for it. This can't be done in findBlock() because a 92 // found block might not actually be replaced there if the 93 // coherence protocol says it can't be. 94 if (blk->isValid()) { | 51#include "mem/cache/base.hh" 52#include "sim/sim_exit.hh" 53 54BaseTags::BaseTags(const Params *p) 55 : ClockedObject(p), blkSize(p->block_size), blkMask(blkSize - 1), 56 size(p->size), 57 lookupLatency(p->tag_latency), 58 accessLatency(p->sequential_access ? --- 27 unchanged lines hidden (view full) --- 86 } 87 } 88 89 // If we're replacing a block that was previously valid update 90 // stats for it. This can't be done in findBlock() because a 91 // found block might not actually be replaced there if the 92 // coherence protocol says it can't be. 93 if (blk->isValid()) { |
95 replacements[0]++; | |
96 totalRefs += blk->refCount; 97 ++sampledRefs; 98 99 invalidate(blk); 100 blk->invalidate(); 101 } 102 103 // Previous block, if existed, has been removed, and now we have --- 16 unchanged lines hidden (view full) --- 120 121void 122BaseTags::regStats() 123{ 124 ClockedObject::regStats(); 125 126 using namespace Stats; 127 | 94 totalRefs += blk->refCount; 95 ++sampledRefs; 96 97 invalidate(blk); 98 blk->invalidate(); 99 } 100 101 // Previous block, if existed, has been removed, and now we have --- 16 unchanged lines hidden (view full) --- 118 119void 120BaseTags::regStats() 121{ 122 ClockedObject::regStats(); 123 124 using namespace Stats; 125 |
128 replacements 129 .init(maxThreadsPerCPU) 130 .name(name() + ".replacements") 131 .desc("number of replacements") 132 .flags(total) 133 ; 134 | |
135 tagsInUse 136 .name(name() + ".tagsinuse") 137 .desc("Cycle average of tags in use") 138 ; 139 140 totalRefs 141 .name(name() + ".total_refs") 142 .desc("Total number of references to valid blocks.") --- 75 unchanged lines hidden --- | 126 tagsInUse 127 .name(name() + ".tagsinuse") 128 .desc("Cycle average of tags in use") 129 ; 130 131 totalRefs 132 .name(name() + ".total_refs") 133 .desc("Total number of references to valid blocks.") --- 75 unchanged lines hidden --- |