gem5
v24.0.0.0
Loading...
Searching...
No Matches
mem
cache
replacement_policies
lfu_rp.hh
Go to the documentation of this file.
1
37
#ifndef __MEM_CACHE_REPLACEMENT_POLICIES_LFU_RP_HH__
38
#define __MEM_CACHE_REPLACEMENT_POLICIES_LFU_RP_HH__
39
40
#include "
mem/cache/replacement_policies/base.hh
"
41
42
namespace
gem5
43
{
44
45
struct
LFURPParams;
46
47
namespace
replacement_policy
48
{
49
50
class
LFU
:
public
Base
51
{
52
protected
:
54
struct
LFUReplData
:
ReplacementData
55
{
57
unsigned
refCount
;
58
62
LFUReplData
() :
refCount
(0) {}
63
};
64
65
public
:
66
typedef
LFURPParams
Params
;
67
LFU
(
const
Params
&
p
);
68
~LFU
() =
default
;
69
76
void
invalidate
(
const
std::shared_ptr<ReplacementData>& replacement_data)
77
override
;
78
85
void
touch
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
86
override
;
87
94
void
reset
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
95
override
;
96
103
ReplaceableEntry
*
getVictim
(
const
ReplacementCandidates
& candidates)
const
104
override
;
105
111
std::shared_ptr<ReplacementData>
instantiateEntry
()
override
;
112
};
113
114
}
// namespace replacement_policy
115
}
// namespace gem5
116
117
#endif
// __MEM_CACHE_REPLACEMENT_POLICIES_LFU_RP_HH__
gem5::ReplaceableEntry
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
Definition
replaceable_entry.hh:63
gem5::replacement_policy::Base
A common base class of cache replacement policy objects.
Definition
base.hh:55
gem5::replacement_policy::LFU
Definition
lfu_rp.hh:51
gem5::replacement_policy::LFU::LFU
LFU(const Params &p)
Definition
lfu_rp.cc:42
gem5::replacement_policy::LFU::~LFU
~LFU()=default
gem5::replacement_policy::LFU::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition
lfu_rp.cc:90
gem5::replacement_policy::LFU::invalidate
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) override
Invalidate replacement data to set it as the next probable victim.
Definition
lfu_rp.cc:48
gem5::replacement_policy::LFU::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition
lfu_rp.cc:55
gem5::replacement_policy::LFU::Params
LFURPParams Params
Definition
lfu_rp.hh:66
gem5::replacement_policy::LFU::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using reference frequency.
Definition
lfu_rp.cc:69
std::vector
STL vector class.
Definition
stl.hh:37
base.hh
gem5::MipsISA::p
Bitfield< 0 > p
Definition
pra_constants.hh:326
gem5::statistics::reset
void reset()
Definition
statistics.cc:309
gem5
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition
binary32.hh:36
gem5::replacement_policy::LFU::LFUReplData
LFU-specific implementation of replacement data.
Definition
lfu_rp.hh:55
gem5::replacement_policy::LFU::LFUReplData::refCount
unsigned refCount
Number of references to this entry since it was reset.
Definition
lfu_rp.hh:57
gem5::replacement_policy::LFU::LFUReplData::LFUReplData
LFUReplData()
Default constructor.
Definition
lfu_rp.hh:62
gem5::replacement_policy::ReplacementData
The replacement data needed by replacement policies.
Definition
replaceable_entry.hh:48
Generated on Tue Jun 18 2024 16:24:05 for gem5 by
doxygen
1.11.0