59 #ifndef __BASE_STATISTICS_HH__
60 #define __BASE_STATISTICS_HH__
98 template <
class Stat,
class Base>
113 visitor.
visit(*
static_cast<Base *
>(
this));
115 bool zero()
const {
return s.zero(); }
118 template <
class Stat>
129 template <
class Stat>
151 this->
s.result(rvec);
158 template <
class Stat>
165 template <
class Stat>
174 template <
class Stat>
217 bool zero()
const {
return true; }
227 template <
class Derived,
template <
class>
class InfoProxyType>
231 typedef InfoProxyType<Derived>
Info;
234 Derived &
self() {
return *
static_cast<Derived *
>(
this); }
275 std::string common_message =
"Legacy stat is a stat that does not "
276 "belong to any statistics::Group. Legacy stat is deprecated.";
277 if (parent ==
nullptr &&
name !=
nullptr)
279 else if (parent ==
nullptr)
280 warn_once(
"One of the stats is a legacy stat. " + common_message);
296 const std::string &
name()
const {
return this->
info()->name; }
307 this->
info()->setSeparator(_sep);
312 return this->
info()->separatorString;
323 this->
info()->unit = _unit;
336 this->
info()->desc = _desc;
348 this->
info()->precision = _precision;
360 this->
info()->flags.set(_flags);
370 template <
class Stat>
374 this->
info()->prereq = prereq.info();
379 template <
class Derived,
template <
class>
class InfoProxyType>
383 typedef InfoProxyType<Derived>
Info;
387 const char *
desc =
nullptr)
404 Derived &
self = this->
self();
405 Info *
info =
self.info();
408 if (subn.size() <=
index)
409 subn.resize(
index + 1);
431 if (subd.size() <=
index)
432 subd.resize(
index + 1);
441 Derived &
self = this->
self();
444 size_t size =
self.size();
446 self.
data(
i)->prepare(
info->getStorageParams());
452 Derived &
self = this->
self();
455 size_t size =
self.size();
457 self.
data(
i)->reset(
info->getStorageParams());
461 template <
class Derived,
template <
class>
class InfoProxyType>
465 typedef InfoProxyType<Derived>
Info;
480 Derived &
self = this->
self();
483 info->y_subnames.resize(
self.y);
492 Derived &
self = this->
self();
495 assert(
index <
self.y);
496 info->y_subnames.resize(
self.y);
504 return this->
info()->y_subnames[
i];
519 template <
class Derived,
class Stor>
539 return reinterpret_cast<Storage *
>(storage);
551 return reinterpret_cast<const Storage *
>(storage);
564 const char *
desc =
nullptr)
593 template <
typename U>
601 template <
typename U>
609 template <
typename U>
660 template <
class T,
class Enabled=
void>
681 typename
std::enable_if_t<std::is_constructible_v<std::function<Result()>,
698 template <
class T,
class V>
713 template <
class Derived>
764 template <
class T,
class V>
795 template <
class Stat>
872 template <
typename U>
884 template <
typename U>
896 template <
typename U>
921 template <
class Derived,
class Stor>
955 fatal_if(
s <= 0,
"Storage size must be positive");
1008 if (
data(
i)->zero())
1042 Derived &
self = this->
self();
1056 return Proxy(this->
self(), index);
1060 template <
class Stat>
1071 typename Stat::Storage *
1078 const typename Stat::Storage *
1136 template <
class Derived,
class Stor>
1176 fatal_if((_x <= 0) || (_y <= 0),
"Storage sizes must be positive");
1179 Derived &
self = this->
self();
1201 return Proxy(this->
self(), offset,
y);
1214 return data(0)->zero();
1273 template <
class Derived,
class Stor>
1293 return reinterpret_cast<Storage *
>(storage);
1303 return reinterpret_cast<const Storage *
>(storage);
1327 template <
typename U>
1354 data()->reset(this->
info()->getStorageParams());
1363 template <
class Stat>
1366 template <
class Derived,
class Stor>
1396 fatal_if(
s <= 0,
"Storage size must be positive");
1424 return Proxy(this->
self(), index);
1437 if (!
data(
i)->zero())
1447 info->data.resize(
size);
1459 template <
class Stat>
1488 template <
typename U>
1504 return data()->zero();
1545 virtual std::string
str()
const = 0;
1579 template <
class Stat>
1601 return proxy.result();
1674 std::string tmp =
"(";
1688 static std::string
str() {
return "+"; }
1694 static std::string
str() {
return "-"; }
1700 static std::string
str() {
return "*"; }
1706 static std::string
str() {
return "/"; }
1712 static std::string
str() {
return "%"; }
1718 static std::string
str() {
return "-"; }
1784 assert(lvec.size() > 0 && rvec.size() > 0);
1786 if (lvec.size() == 1 && rvec.size() == 1) {
1789 }
else if (lvec.size() == 1) {
1794 }
else if (rvec.size() == 1) {
1799 }
else if (rvec.size() == lvec.size()) {
1820 assert(lvec.size() > 0 && rvec.size() > 0);
1821 assert(lvec.size() == rvec.size() ||
1822 lvec.size() == 1 || rvec.size() == 1);
1825 if (lvec.size() == rvec.size() && lvec.size() > 1) {
1830 return op(lsum, rsum);
1848 }
else if (
rs == 1) {
1851 assert(ls ==
rs &&
"Node vector sizes are not equal");
1937 parent, nullptr, units::Unspecified::get(), nullptr)
1943 parent,
name, units::Unspecified::get(),
desc)
1948 const char *
desc =
nullptr)
1965 parent, nullptr, units::Unspecified::get(), nullptr)
1971 parent,
name, units::Unspecified::get(),
desc)
1976 const char *
desc =
nullptr)
1986 :
ValueBase<
Value>(parent, nullptr, units::Unspecified::get(), nullptr)
1996 const char *
desc =
nullptr)
2011 parent, nullptr, units::Unspecified::get(), nullptr)
2017 parent,
name, units::Unspecified::get(),
desc)
2022 const char *
desc =
nullptr)
2037 parent, nullptr, units::Unspecified::get(), nullptr)
2043 parent,
name, units::Unspecified::get(),
desc)
2048 const char *
desc =
nullptr)
2063 parent, nullptr, units::Unspecified::get(), nullptr)
2069 parent,
name, units::Unspecified::get(),
desc)
2074 const char *
desc =
nullptr)
2089 parent, nullptr, units::Unspecified::get(), nullptr)
2095 parent,
name, units::Unspecified::get(),
desc)
2100 const char *
desc =
nullptr)
2118 return this->
self();
2131 parent, nullptr, units::Unspecified::get(), nullptr)
2136 const char *
desc =
nullptr)
2138 parent,
name, units::Unspecified::get(),
desc)
2143 const char *
desc =
nullptr)
2159 return this->
self();
2175 parent, nullptr, units::Unspecified::get(), nullptr)
2183 const char *
desc =
nullptr)
2185 parent,
name, units::Unspecified::get(),
desc)
2193 const char *
desc =
nullptr)
2214 parent, nullptr, units::Unspecified::get(), nullptr)
2222 const char *
desc =
nullptr)
2224 parent,
name, units::Unspecified::get(),
desc)
2232 const char *
desc =
nullptr)
2250 units::Unspecified::get(), nullptr)
2255 const char *
desc =
nullptr)
2257 parent,
name, units::Unspecified::get(),
desc)
2263 const char *
desc =
nullptr)
2283 return this->
self();
2297 units::Unspecified::get(), nullptr)
2302 const char *
desc =
nullptr)
2304 units::Unspecified::get(),
desc)
2310 const char *
desc =
nullptr)
2327 return this->
self();
2341 nullptr, units::Unspecified::get(), nullptr)
2346 const char *
desc =
nullptr)
2348 units::Unspecified::get(),
desc)
2354 const char *
desc =
nullptr)
2371 return this->
self();
2375 template <
class Stat>
2390 this->
s.result(vec);
2396 std::string
str()
const {
return this->
s.str(); }
2399 template <
class Stat>
2410 template <
class Derived,
class Stor>
2464 template <
typename U>
2491 data()->reset(this->
info()->getStorageParams());
2500 units::Unspecified::get(), nullptr)
2505 const char *
desc =
nullptr)
2507 units::Unspecified::get(),
desc)
2512 const char *
desc =
nullptr)
2529 return this->
self();
2551 const char *
desc =
nullptr);
2554 const char *
desc =
nullptr);
2569 template<
typename T>
2628 std::string
str()
const;
2726 template <
class Stat>
2848 return Temp(std::make_shared<
BinaryNode<std::multiplies<Result> > >(
l,
r));
2860 return Temp(std::make_shared<
UnaryNode<std::negate<Result> > >(
l));
2863 template <
typename T>
2870 template <
typename T>
2880 return Temp(std::make_shared<
SumNode<std::plus<Result> > >(
val));
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Calculates the per tick mean and variance of the samples.
AverageDeviation(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
AverageDeviation(Group *parent=nullptr)
Construct and initialize this distribution.
AverageDeviation(Group *parent, const char *name, const char *desc=nullptr)
A vector of Average stats.
AverageVector(Group *parent, const char *name, const char *desc=nullptr)
AverageVector(Group *parent=nullptr)
AverageVector(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
A stat that calculates the per tick average of a value.
Average(Group *parent, const char *name, const char *desc=nullptr)
Average(Group *parent=nullptr)
Average(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
Templatized storage for distribution that calculates per tick mean and variance.
Templatized storage and interface to a per-tick average stat.
Result total() const override
Return the total of the result vector.
std::string str() const override
size_type size() const override
Return the number of nodes in the subtree starting at this node.
BinaryNode(NodePtr &a, NodePtr &b)
const VResult & result() const override
Return the result vector of this subtree.
size_type size() const
Return the number of nodes in the subtree starting at this node.
const VResult & result() const
Return the result vector of this subtree.
Result total() const
Return the total of the result vector.
const VResult & result() const
Return the result vector of this subtree.
Result total() const
Return the total of the result vector.
size_type size() const
Return the number of nodes in the subtree starting at this node.
ConstVectorNode(const T &s)
std::string ysubname(off_type i) const
InfoProxyType< Derived > Info
DataWrapVec2d(Group *parent, const char *name, const units::Base *unit, const char *desc)
Derived & ysubnames(const char **names)
Derived & ysubname(off_type index, const std::string &subname)
Derived & subname(off_type index, const std::string &name)
Set the subfield name for the given index, and marks this stat to print at the end of simulation.
InfoProxyType< Derived > Info
DataWrapVec(Group *parent=nullptr, const char *name=nullptr, const units::Base *unit=units::Unspecified::get(), const char *desc=nullptr)
Derived & subdesc(off_type index, const std::string &desc)
Set the subfield description for the given index and marks this stat to print at the end of simulatio...
InfoProxyType< Derived > Info
const Info * info() const
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
DataWrap(Group *parent, const char *name, const units::Base *unit, const char *desc)
Derived & name(const std::string &name)
Set the name and marks this stat to print at the end of simulation.
Derived & unit(const units::Base *_unit)
Set the unit of the stat.
Derived & desc(const std::string &_desc)
Set the description and marks this stat to print at the end of simulation.
const std::string & setSeparator() const
const std::string & name() const
DataWrap & operator=(const DataWrap &)=delete
DataWrap(const DataWrap &)=delete
Derived & prereq(const Stat &prereq)
Set the prerequisite stat and marks this stat to print at the end of simulation.
Derived & setSeparator(const std::string &_sep)
Set the character(s) used between the name and vector number on vectors, dist, etc.
Derived & precision(int _precision)
Set the precision and marks this stat to print at the end of simulation.
Implementation of a distribution stat.
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
DistInfoProxy< Derived > Info
size_type size() const
Return the number of entries in this stat.
void reset()
Reset stat value to default.
void add(DistBase &d)
Add the argument distribution to the this distribution.
bool zero() const
Return true if no samples have been added.
Storage * data()
Retrieve the storage.
GEM5_ALIGNED(8) char storage[sizeof(Storage)]
The storage for this stat.
DistBase(Group *parent, const char *name, const units::Base *unit, const char *desc)
const Storage * data() const
Retrieve a const pointer to the storage.
DistInfoProxy(Stat &stat)
DistData data
Local storage for the entry values, used for printing.
void reset()
Proxy has no state.
const Stat::Storage * data() const
DistProxy(const DistProxy &sp)
DistProxy(Stat &s, off_type i)
void sample(const U &v, int n=1)
const DistProxy & operator=(const DistProxy &sp)
Templatized storage and interface for a distribution stat.
A simple distribution stat.
Distribution(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
Distribution(Group *parent, const char *name, const char *desc=nullptr)
Distribution & init(Counter min, Counter max, Counter bkt)
Set the parameters of this distribution.
Distribution(Group *parent=nullptr)
FunctorProxy(const T &func)
std::function< Result()> functor
Templatized storage and interface for a histogram stat.
Histogram(Group *parent, const char *name, const char *desc=nullptr)
Histogram & init(size_type size)
Set the parameters of this histogram.
Histogram(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
Histogram(Group *parent=nullptr)
void setInit()
Save Storage class parameters if any.
bool check() const
Check that this stat has been set up properly and is ready for use.
void setParams(const StorageParams *params)
Save Storage class parameters if any.
Info * info()
Grab the information class for this statistic.
bool newStyleStats() const
Check if the info is new style stats.
void setInfo(Group *parent, Info *info)
Set up an info class for this statistic.
void reset()
Reset the stat to the default state.
void visit(Output &visitor)
StorageParams const * getStorageParams() const
Getter for the storage params.
std::string name
The name of the stat.
A proxy similar to the FunctorProxy, but allows calling a method of a bound object,...
V(T::* MethodPointer)() const
MethodProxy(T *obj, MethodPointer meth)
Base class for formula statistic node.
virtual std::string str() const =0
virtual Result total() const =0
Return the total of the result vector.
virtual size_type size() const =0
Return the number of nodes in the subtree starting at this node.
virtual const VResult & result() const =0
Return the result vector of this subtree.
void reset()
Reset the stat to the default state.
void prepare()
Prepare the stat for dumping.
bool check() const
Check that this stat has been set up properly and is ready for use.
void visit(Output &visitor)
Visitor entry for outputing statistics data.
Templatized storage and interface for a distribution that calculates mean and variance.
Implementation of a scalar stat.
void operator+=(const U &v)
Increment the stat by the given value.
void operator--(int)
Decrement the stat by 1.
size_type size() const
Return the number of elements, always 1 for a scalar.
GEM5_ALIGNED(8) char storage[sizeof(Storage)]
The storage of this stat.
ScalarBase(Group *parent=nullptr, const char *name=nullptr, const units::Base *unit=units::Unspecified::get(), const char *desc=nullptr)
Counter value() const
Return the current value of this stat as its base type.
void operator=(const U &v)
Set the data value to the given value.
Storage * data()
Retrieve the storage.
void operator--()
Decrement the stat by 1.
void operator++(int)
Increment the stat by 1.
void operator++()
Increment the stat by 1.
void operator-=(const U &v)
Decrement the stat by the given value.
const Storage * data() const
Retrieve a const pointer to the storage.
ScalarInfoProxy(Stat &stat)
virtual Result total() const =0
virtual Result result() const =0
virtual Counter value() const =0
const VResult & result() const
Return the result vector of this subtree.
size_type size() const
Return the number of nodes in the subtree starting at this node.
const ScalarProxy< Stat > proxy
ScalarProxyNode(const ScalarProxy< Stat > &p)
Result total() const
Return the total of the result vector.
A proxy class to access the stat at a given index in a VectorBase stat.
void operator=(const U &v)
Set the data value to the given value.
void operator+=(const U &v)
Increment the stat by the given value.
const ScalarProxy & operator=(const ScalarProxy &sp)
Set this proxy equal to the provided one.
ScalarProxy(Stat &s, off_type i)
Create and initialize this proxy, do not register it with the database.
off_type index
The index to access in the parent VectorBase.
ScalarProxy(const ScalarProxy &sp)
Create a copy of the provided ScalarProxy.
Stat & stat
Pointer to the parent Vector.
void operator--()
Decrement the stat by 1.
void operator--(int)
Decrement the stat by 1.
void operator-=(const U &v)
Decrement the stat by the given value.
Result result() const
Return the current value of this statas a result type.
void operator++(int)
Increment the stat by 1.
Counter value() const
Return the current value of this stat as its base type.
size_type size() const
Return the number of elements, always 1 for a scalar.
void operator++()
Increment the stat by 1.
size_type size() const
Return the number of nodes in the subtree starting at this node.
Result total() const
Return the total of the result vector.
const VResult & result() const
Return the result vector of this subtree.
ScalarStatNode(const ScalarInfo *d)
This is a simple scalar statistic, like a counter.
Scalar(Group *parent, const char *name, const char *desc=nullptr)
Scalar(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
Scalar(Group *parent=nullptr)
Implementation of a sparse histogram stat.
SparseHistBase(Group *parent, const char *name, const units::Base *unit, const char *desc)
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
void reset()
Reset stat value to default.
const Storage * data() const
Retrieve a const pointer to the storage.
bool zero() const
Return true if no samples have been added.
SparseHistInfoProxy< Derived > Info
size_type size() const
Return the number of entries in this stat.
char storage[sizeof(Storage)]
The storage for this stat.
Storage * data()
Retrieve the storage.
SparseHistInfoProxy(Stat &stat)
SparseHistData data
Local storage for the entry values, used for printing.
Templatized storage and interface for a sparse histogram stat.
SparseHistogram(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
SparseHistogram(Group *parent=nullptr)
SparseHistogram(Group *parent, const char *name, const char *desc=nullptr)
SparseHistogram & init(size_type size)
Set the parameters of this histogram.
Calculates the mean and variance of all the samples.
StandardDeviation(Group *parent=nullptr)
Construct and initialize this distribution.
StandardDeviation(Group *parent, const char *name, const char *desc=nullptr)
StandardDeviation(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
Templatized storage and interface for a simple scalar stat.
size_type size() const
Return the number of nodes in the subtree starting at this node.
Result total() const
Return the total of the result vector.
const VResult & result() const
Return the result vector of this subtree.
Helper class to construct formula node trees.
NodePtr getNodePtr() const
Makde gcc < 4.6.3 happy and explicitly get the underlying node.
Temp(signed long value)
Create a ConstNode.
Temp(const NodePtr &n)
Copy the given pointer to this class.
Temp(float value)
Create a ConstNode.
Temp(signed int value)
Create a ConstNode.
Temp(const Vector &s)
Create a new VectorStatNode.
Temp(const Scalar &s)
Create a new ScalarStatNode.
Temp(unsigned int value)
Create a ConstNode.
Temp(double value)
Create a ConstNode.
Temp(signed long long value)
Create a ConstNode.
Temp(unsigned short value)
Create a ConstNode.
Temp(const Average &s)
Create a new ScalarStatNode.
Temp(signed short value)
Create a ConstNode.
Temp(unsigned long long value)
Create a ConstNode.
Temp(signed char value)
Create a ConstNode.
Temp(unsigned long value)
Create a ConstNode.
Temp(unsigned char value)
Create a ConstNode.
Temp(const Value &s)
Create a new ScalarStatNode.
Temp(const ScalarProxy< Stat > &p)
Create a new ScalarProxyNode.
NodePtr node
Pointer to a Node object.
Temp(const AverageVector &s)
const VResult & result() const
Return the result vector of this subtree.
Result total() const
Return the total of the result vector.
size_type size() const
Return the number of nodes in the subtree starting at this node.
Derived & functor(T &func)
Derived & functor(const T &func)
Derived & scalar(T &value)
ValueBase(Group *parent, const char *name, const units::Base *unit, const char *desc)
Derived & method(T *obj, V(T::*method)() const)
Extended functor that calls the specified method of the provided object.
Value(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
Value(Group *parent=nullptr)
Value(Group *parent, const char *name, const char *desc=nullptr)
Vector2dBase(Group *parent, const char *name, const units::Base *unit, const char *desc)
const Storage * data(off_type index) const
Storage * data(off_type index)
Result total() const
Return a total of all entries in this vector.
void reset()
Reset stat value to default.
std::vector< Storage * > storage
VectorProxy< Derived > Proxy
Derived & init(size_type _x, size_type _y)
Vector2dInfoProxy< Derived > Info
Proxy operator[](off_type index)
Vector2dInfoProxy(Stat &stat)
VCounter cvec
Local storage for the entry values, used for printing.
A 2-Dimensional vecto of scalar stats.
Vector2d(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
Vector2d(Group *parent=nullptr)
Vector2d(Group *parent, const char *name, const char *desc=nullptr)
This is a vector of AverageDeviation stats.
VectorAverageDeviation & init(size_type size)
Initialize storage for this distribution.
VectorAverageDeviation(Group *parent, const char *name, const char *desc=nullptr)
VectorAverageDeviation(Group *parent=nullptr)
VectorAverageDeviation(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
Implementation of a vector of stats.
const Storage * data(off_type index) const
Retrieve a const pointer to the storage.
Storage * data(off_type index)
Retrieve the storage.
void value(VCounter &vec) const
ScalarProxy< Derived > Proxy
Proxy type.
std::vector< Storage * > storage
The storage of this stat.
Derived & init(size_type size)
Set this vector to have the given size.
Proxy operator[](off_type index)
Return a reference (ScalarProxy) to the stat at the given index.
void result(VResult &vec) const
Copy the values to a local vector and return a reference to it.
VectorBase(Group *parent, const char *name, const units::Base *unit, const char *desc)
Result total() const
Return a total of all entries in this vector.
DistProxy< Derived > Proxy
const Storage * data(off_type index) const
Proxy operator[](off_type index)
std::vector< Storage * > storage
VectorDistInfoProxy< Derived > Info
VectorDistBase(Group *parent, const char *name, const units::Base *unit, const char *desc)
Storage * data(off_type index)
VectorDistInfoProxy(Stat &stat)
std::vector< DistData > data
A vector of distributions.
VectorDistribution & init(size_type size, Counter min, Counter max, Counter bkt)
Initialize storage and parameters for this distribution.
VectorDistribution(Group *parent=nullptr)
VectorDistribution(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
VectorDistribution(Group *parent, const char *name, const char *desc=nullptr)
const VResult & result() const
VectorInfoProxy(Stat &stat)
virtual Result total() const =0
virtual size_type size() const =0
virtual const VResult & result() const =0
const VectorProxy & operator=(const VectorProxy &sp)
VectorProxy(Stat &s, off_type o, size_type l)
const VResult & result() const
const Stat::Storage * data(off_type index) const
VectorProxy(const VectorProxy &sp)
ScalarProxy< Stat > operator[](off_type index)
Stat::Storage * data(off_type index)
This is a vector of StandardDeviation stats.
VectorStandardDeviation(Group *parent, const char *name, const char *desc=nullptr)
VectorStandardDeviation(Group *parent=nullptr)
VectorStandardDeviation(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
VectorStandardDeviation & init(size_type size)
Initialize storage for this distribution.
size_type size() const
Return the number of nodes in the subtree starting at this node.
VectorStatNode(const VectorInfo *d)
Result total() const
Return the total of the result vector.
const VResult & result() const
Return the result vector of this subtree.
A vector of scalar stats.
Vector(Group *parent, const char *name, const char *desc=nullptr)
Vector(Group *parent, const char *name, const units::Base *unit, const char *desc=nullptr)
Vector(Group *parent=nullptr)
The Base class is the parent class of all unit classes.
static Unspecified * get()
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
void addStat(statistics::Info *info)
Register a stat with this group.
constexpr RegId o(int index)
static const char *const names[NumModes]
void registerHandlers(Handler reset_handler, Handler dump_handler)
Temp operator/(Temp l, Temp r)
std::shared_ptr< Node > NodePtr
Shared pointer to a function Node.
void registerDumpCallback(const std::function< void()> &callback)
Register a callback that should be called whenever statistics are about to be dumped.
Temp operator-(Temp l, Temp r)
std::map< const void *, Info * > MapType
Temp constantVector(T val)
void processResetQueue()
Process all the callbacks in the reset callbacks queue.
void(* Handler)()
Register reset and dump handlers.
double Counter
All counters are of 64-bit values.
const Info * resolve(const std::string &name)
void registerResetCallback(const std::function< void()> &callback)
Register a callback that should be called whenever statistics are reset.
Temp operator+(Temp l, Temp r)
const FlagsType display
Print this stat.
std::list< Info * > & statsList()
void processDumpQueue()
Process all the callbacks in the dump callbacks queue.
void dump()
Dump all statistics data to the registered outputs.
double Result
All results are doubles.
Temp operator*(Temp l, Temp r)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
std::string csprintf(const char *format, const Args &...args)
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
const std::string to_string(sc_enc enc)
Overload hash function for BasicBlockRange type.
The parameters for a distribution stat.
The parameters for a distribution stat.
virtual void visit(const ScalarInfo &info)=0
The parameters for a sparse histogram stat.
const std::string & name()