42#include "params/MemFootprintProbe.hh"
51 totalCacheLinesInMem(
p.
system->memSize() /
p.
system->cacheLineSize()),
52 totalPagesInMem(
p.
system->memSize() /
p.page_size),
61 "MemFootprintProbe expects cache line size is power of 2.");
63 "MemFootprintProbe expects page size parameter is power of 2");
68 : statistics::
Group(parent),
69 ADD_STAT(cacheLine, statistics::units::Count::get(),
70 "Memory footprint at cache line granularity"),
71 ADD_STAT(cacheLineTotal, statistics::units::Count::get(),
72 "Total memory footprint at cache line granularity since "
74 ADD_STAT(page, statistics::units::Count::get(),
75 "Memory footprint at page granularity"),
76 ADD_STAT(pageTotal, statistics::units::Count::get(),
77 "Total memory footprint at page granularity since simulation "
80 using namespace statistics;
Base class for memory system probes accepting Packet instances.
bool isMemAddr(Addr addr) const
Check if a physical address is within a range of a memory that is part of the global address map.
Addr cacheLineSize() const
Get the cache line size of the system.
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
static constexpr std::enable_if_t< std::is_integral_v< T >, int > floorLog2(T x)
static constexpr bool isPowerOf2(const T &n)
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
BitfieldType< SegDescriptorLimit > limit
const FlagsType nonan
Don't print if this is NAN.
const FlagsType nozero
Don't print if this is zero.
void registerResetCallback(const std::function< void()> &callback)
Register a callback that should be called whenever statistics are reset.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
A struct to hold on to the essential fields from a packet, so that the packet and underlying request ...