Deleted Added
sdiff udiff text old ( 12691:8e1371fde4be ) new ( 12702:27cb33a96e0f )
full compact
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 "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()) {
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
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 ---