gem5
v21.1.0.2
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
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
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
q
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
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
a
b
c
e
f
g
h
i
l
m
n
o
p
s
t
v
Variables
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
v
w
Typedefs
a
b
c
d
h
i
m
p
s
t
u
w
Enumerations
b
h
i
o
p
Enumerator
h
i
o
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
mem
probes
mem_footprint.hh
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016 Google Inc.
3
* All rights reserved.
4
*
5
* The license below extends only to copyright in the software and
6
* shall not be construed as granting a license to any other
7
* intellectual property including but not limited to intellectual
8
* property relating to a hardware implementation of the
9
* functionality of the software licensed hereunder. You may use the
10
* software subject to the license terms below provided that you
11
* ensure that this notice is replicated unmodified and in its
12
* entirety in all distributions of the software, modified or
13
* unmodified, in source code or in binary form.
14
*
15
* Redistribution and use in source and binary forms, with or without
16
* modification, are permitted provided that the following conditions are
17
* met: redistributions of source code must retain the above copyright
18
* notice, this list of conditions and the following disclaimer;
19
* redistributions in binary form must reproduce the above copyright
20
* notice, this list of conditions and the following disclaimer in the
21
* documentation and/or other materials provided with the distribution;
22
* neither the name of the copyright holders nor the names of its
23
* contributors may be used to endorse or promote products derived from
24
* this software without specific prior written permission.
25
*
26
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
29
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
30
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
*/
38
39
#ifndef __MEM_PROBES_MEM_FOOTPRINT_HH__
40
#define __MEM_PROBES_MEM_FOOTPRINT_HH__
41
42
#include <unordered_set>
43
44
#include "
base/callback.hh
"
45
#include "
mem/packet.hh
"
46
#include "
mem/probes/base.hh
"
47
#include "
sim/stats.hh
"
48
#include "
sim/system.hh
"
49
50
namespace
gem5
51
{
52
53
struct
MemFootprintProbeParams;
54
57
class
MemFootprintProbe
:
public
BaseMemProbe
58
{
59
public
:
60
typedef
std::unordered_set<Addr>
AddrSet
;
61
62
MemFootprintProbe
(
const
MemFootprintProbeParams &
p
);
63
// Fix footprint tracking state on stat reset
64
void
statReset
();
65
66
protected
:
68
const
uint8_t
cacheLineSizeLg2
;
70
const
uint8_t
pageSizeLg2
;
71
const
uint64_t
totalCacheLinesInMem
;
72
const
uint64_t
totalPagesInMem
;
73
74
void
insertAddr
(
Addr
addr
,
AddrSet
*set, uint64_t
limit
);
75
void
handleRequest
(
const
probing::PacketInfo
&pkt_info)
override
;
76
77
struct
MemFootprintProbeStats
:
public
statistics::Group
78
{
79
MemFootprintProbeStats
(
MemFootprintProbe
*parent);
80
82
statistics::Scalar
cacheLine
;
84
statistics::Scalar
cacheLineTotal
;
86
statistics::Scalar
page
;
88
statistics::Scalar
pageTotal
;
89
};
90
91
// Addr set to track unique cache lines accessed
92
AddrSet
cacheLines
;
93
// Addr set to track unique cache lines accessed since simulation begin
94
AddrSet
cacheLinesAll
;
95
// Addr set to track unique pages accessed
96
AddrSet
pages
;
97
// Addr set to track unique pages accessed since simulation begin
98
AddrSet
pagesAll
;
99
System
*
system
;
100
101
MemFootprintProbeStats
stats
;
102
};
103
104
}
// namespace gem5
105
106
#endif //__MEM_PROBES_MEM_FOOTPRINT_HH__
gem5::statistics::Scalar
This is a simple scalar statistic, like a counter.
Definition:
statistics.hh:1927
gem5::MemFootprintProbe::pageSizeLg2
const uint8_t pageSizeLg2
Page size for footprint measurement (log2)
Definition:
mem_footprint.hh:70
gem5::MemFootprintProbe::insertAddr
void insertAddr(Addr addr, AddrSet *set, uint64_t limit)
Definition:
mem_footprint.cc:91
gem5::MemFootprintProbe::system
System * system
Definition:
mem_footprint.hh:99
system.hh
gem5::MemFootprintProbe::handleRequest
void handleRequest(const probing::PacketInfo &pkt_info) override
Callback to analyse intercepted Packets.
Definition:
mem_footprint.cc:98
gem5::MemFootprintProbe::statReset
void statReset()
Definition:
mem_footprint.cc:120
gem5::MemFootprintProbe::stats
MemFootprintProbeStats stats
Definition:
mem_footprint.hh:101
base.hh
gem5::MemFootprintProbe::MemFootprintProbeStats::cacheLineTotal
statistics::Scalar cacheLineTotal
Footprint at cache line size granularity, since simulation begin.
Definition:
mem_footprint.hh:84
gem5::MemFootprintProbe::AddrSet
std::unordered_set< Addr > AddrSet
Definition:
mem_footprint.hh:60
gem5::X86ISA::limit
BitfieldType< SegDescriptorLimit > limit
Definition:
misc.hh:930
gem5::BaseMemProbe
Base class for memory system probes accepting Packet instances.
Definition:
base.hh:64
gem5::MemFootprintProbe::MemFootprintProbeStats::cacheLine
statistics::Scalar cacheLine
Footprint at cache line size granularity.
Definition:
mem_footprint.hh:82
gem5::MemFootprintProbe::MemFootprintProbeStats::MemFootprintProbeStats
MemFootprintProbeStats(MemFootprintProbe *parent)
Definition:
mem_footprint.cc:66
packet.hh
stats.hh
gem5::MemFootprintProbe
Probe to track footprint of accessed memory Two granularity of footprint measurement i....
Definition:
mem_footprint.hh:57
gem5::MemFootprintProbe::pagesAll
AddrSet pagesAll
Definition:
mem_footprint.hh:98
gem5::System
Definition:
system.hh:77
gem5::MemFootprintProbe::cacheLinesAll
AddrSet cacheLinesAll
Definition:
mem_footprint.hh:94
gem5::MipsISA::p
Bitfield< 0 > p
Definition:
pra_constants.hh:326
gem5::MemFootprintProbe::cacheLineSizeLg2
const uint8_t cacheLineSizeLg2
Cache Line size for footprint measurement (log2)
Definition:
mem_footprint.hh:68
gem5::MemFootprintProbe::MemFootprintProbeStats::page
statistics::Scalar page
Footprint at page granularity.
Definition:
mem_footprint.hh:86
gem5::MemFootprintProbe::pages
AddrSet pages
Definition:
mem_footprint.hh:96
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition:
types.hh:147
gem5::MemFootprintProbe::totalPagesInMem
const uint64_t totalPagesInMem
Definition:
mem_footprint.hh:72
gem5::MemFootprintProbe::MemFootprintProbeStats::pageTotal
statistics::Scalar pageTotal
Footprint at page granularity, since simulation begin.
Definition:
mem_footprint.hh:88
gem5::statistics::Group
Statistics container.
Definition:
group.hh:93
gem5::MemFootprintProbe::MemFootprintProbeStats
Definition:
mem_footprint.hh:77
gem5::probing::PacketInfo
A struct to hold on to the essential fields from a packet, so that the packet and underlying request ...
Definition:
mem.hh:58
gem5::MemFootprintProbe::totalCacheLinesInMem
const uint64_t totalCacheLinesInMem
Definition:
mem_footprint.hh:71
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition:
decoder.cc:40
gem5::MemFootprintProbe::MemFootprintProbe
MemFootprintProbe(const MemFootprintProbeParams &p)
Definition:
mem_footprint.cc:47
callback.hh
gem5::MemFootprintProbe::cacheLines
AddrSet cacheLines
Definition:
mem_footprint.hh:92
gem5::X86ISA::addr
Bitfield< 3 > addr
Definition:
types.hh:84
Generated on Tue Sep 21 2021 12:25:34 for gem5 by
doxygen
1.8.17