gem5
v21.0.1.0
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
i
l
m
o
p
r
s
t
v
x
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
:
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
_
a
b
c
d
e
f
g
h
i
l
m
o
p
q
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
mem
cache
replacement_policies
second_chance_rp.hh
Go to the documentation of this file.
1
38
#ifndef __MEM_CACHE_REPLACEMENT_POLICIES_SECOND_CHANCE_RP_HH__
39
#define __MEM_CACHE_REPLACEMENT_POLICIES_SECOND_CHANCE_RP_HH__
40
41
#include "
mem/cache/replacement_policies/base.hh
"
42
#include "
mem/cache/replacement_policies/fifo_rp.hh
"
43
44
struct
SecondChanceRPParams;
45
46
namespace
ReplacementPolicy
{
47
48
class
SecondChance
:
public
FIFO
49
{
50
protected
:
52
struct
SecondChanceReplData
:
public
FIFOReplData
53
{
59
bool
hasSecondChance
;
60
64
SecondChanceReplData
() :
FIFOReplData
(),
hasSecondChance
(false) {}
65
};
66
72
void
useSecondChance
(
73
const
std::shared_ptr<SecondChanceReplData>& replacement_data)
const
;
74
75
public
:
76
typedef
SecondChanceRPParams
Params
;
77
SecondChance
(
const
Params
&
p
);
78
~SecondChance
() =
default
;
79
87
void
invalidate
(
const
std::shared_ptr<ReplacementData>& replacement_data)
88
const override
;
89
95
void
touch
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
96
override
;
97
105
void
reset
(
const
std::shared_ptr<ReplacementData>& replacement_data)
const
106
override
;
107
115
ReplaceableEntry
*
getVictim
(
const
ReplacementCandidates
& candidates)
const
116
override
;
117
123
std::shared_ptr<ReplacementData>
instantiateEntry
()
override
;
124
};
125
126
}
// namespace ReplacementPolicy
127
128
#endif // __MEM_CACHE_REPLACEMENT_POLICIES_SECOND_CHANCE_RP_HH__
ReplacementPolicy::SecondChance::Params
SecondChanceRPParams Params
Definition:
second_chance_rp.hh:76
ReplaceableEntry
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
Definition:
replaceable_entry.hh:57
ReplacementPolicy::FIFO::FIFOReplData
FIFO-specific implementation of replacement data.
Definition:
fifo_rp.hh:50
ReplacementPolicy::SecondChance::touch
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its re-insertion tick and second chance bit.
Definition:
second_chance_rp.cc:65
ReplacementPolicy::SecondChance::reset
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition:
second_chance_rp.cc:76
fifo_rp.hh
Copyright (c) 2018-2020 Inria All rights reserved.
std::vector
STL vector class.
Definition:
stl.hh:37
ReplacementPolicy::SecondChance::invalidate
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const override
Invalidate replacement data to set it as the next probable victim.
Definition:
second_chance_rp.cc:54
ReplacementPolicy::SecondChance::~SecondChance
~SecondChance()=default
ReplacementPolicy
Copyright (c) 2018-2020 Inria All rights reserved.
Definition:
stride.hh:64
ReplacementPolicy::FIFO
Definition:
fifo_rp.hh:46
ReplacementPolicy::Base::Params
BaseReplacementPolicyParams Params
Definition:
base.hh:51
ReplacementPolicy::SecondChance::instantiateEntry
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition:
second_chance_rp.cc:131
ReplacementPolicy::SecondChance::SecondChance
SecondChance(const Params &p)
Definition:
second_chance_rp.cc:37
base.hh
ReplacementPolicy::SecondChance::getVictim
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using insertion timestamps and second chance bit.
Definition:
second_chance_rp.cc:87
ReplacementPolicy::SecondChance::SecondChanceReplData::SecondChanceReplData
SecondChanceReplData()
Default constructor.
Definition:
second_chance_rp.hh:64
ReplacementPolicy::SecondChance::SecondChanceReplData
Second-Chance-specific implementation of replacement data.
Definition:
second_chance_rp.hh:52
ReplacementPolicy::SecondChance
Definition:
second_chance_rp.hh:48
MipsISA::p
Bitfield< 0 > p
Definition:
pra_constants.hh:323
ReplacementPolicy::SecondChance::useSecondChance
void useSecondChance(const std::shared_ptr< SecondChanceReplData > &replacement_data) const
Use replacement data's second chance.
Definition:
second_chance_rp.cc:43
ReplacementPolicy::SecondChance::SecondChanceReplData::hasSecondChance
bool hasSecondChance
This is different from isTouched because isTouched accounts only for insertion, while this bit is res...
Definition:
second_chance_rp.hh:59
Generated on Tue Jun 22 2021 15:28:29 for gem5 by
doxygen
1.8.17