42 #include "params/StackDistProbe.hh"
47 lineSize(p->line_size),
48 disableLinearHists(p->disable_linear_hists),
49 disableLogHists(p->disable_log_hists),
52 fatal_if(p->system->cacheLineSize() > p->line_size,
53 "The stack distance probe must use a cache line size that is "
54 "larger or equal to the system's cahce line size.");
62 const StackDistProbeParams *
p(
63 dynamic_cast<const StackDistProbeParams *>(
params()));
66 using namespace Stats;
69 .
init(p->linear_hist_bins)
71 .
desc(
"Reads linear distribution")
75 .
init(p->log_hist_bins)
77 .
desc(
"Reads logarithmic distribution")
81 .
init(p->linear_hist_bins)
83 .
desc(
"Writes linear distribution")
87 .
init(p->log_hist_bins)
89 .
desc(
"Writes logarithmic distribution")
94 .
desc(
"Number of requests with infinite stack distance")
125 int sd_lg2 = sd == 0 ? 1 :
floorLog2(sd);
137 StackDistProbeParams::create()
const FlagsType pdf
Print the percent of the total that this entry represents.
const bool disableLogHists
std::pair< uint64_t, bool > calcStackDistAndUpdate(const Addr r_address, bool addNewNode=true)
Process the given address:
void regStats() override
Register statistics for this object.
const Params * params() const
Histogram & init(size_type size)
Set the parameters of this histogram.
Base class for memory system probes accepting Packet instances.
virtual void regStats()
Register statistics for this object.
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
Stats::Histogram readLinearHist
static constexpr uint64_t Infinity
A convenient way of refering to infinity.
T roundDown(const T &val, const U &align)
Stats::SparseHistogram readLogHist
Stats::Histogram writeLinearHist
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Derived & name(const std::string &name)
Set the name and marks this stat to print at the end of simulation.
int floorLog2(unsigned x)
virtual const std::string name() const
const bool disableLinearHists
SparseHistogram & init(size_type size)
Set the parameters of this histogram.
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
Derived & desc(const std::string &_desc)
Set the description and marks this stat to print at the end of simulation.
void handleRequest(const ProbePoints::PacketInfo &pkt_info) override
Callback to analyse intercepted Packets.
fatal_if(p->js_features.size() > 16,"Too many job slot feature registers specified (%i)\n", p->js_features.size())
Stats::SparseHistogram writeLogHist
const FlagsType nozero
Don't print if this is zero.
StackDistProbe(StackDistProbeParams *params)
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
A struct to hold on to the essential fields from a packet, so that the packet and underlying request ...