44 #include "pybind11/pybind11.h"
45 #include "pybind11/stl.h"
52 namespace py = pybind11;
59 py::module
m = py::module::import(
"m5.stats");
66 py::module
m = py::module::import(
"m5.stats");
75 py::module
m = m_native.def_submodule(
"stats");
80 .def(
"registerPythonStatsHandlers",
92 py::class_<Stats::Output>(
m,
"Output")
98 py::class_<Stats::Info>(
m,
"Info")
102 .def_property_readonly(
"flags", [](
const Stats::Info &info) {
std::string name
The name of the stat.
void processDumpQueue()
Process all the callbacks in the dump callbacks queue.
virtual bool zero() const =0
virtual void enable()
Enable the stat for use.
list< Info * > & statsList()
virtual void prepare()=0
Prepare the stat for dumping.
Declaration of Statistics objects.
void registerPythonStatsHandlers()
Register py_...
virtual void reset()=0
Reset the stat to the default state.
Flags flags
The formatting flags.
void periodicStatDump(Tick period)
Schedule periodic statistics dumping.
virtual bool check() const =0
Check that this stat has been set up properly and is ready for use.
void processResetQueue()
Process all the callbacks in the reset callbacks queue.
void updateEvents()
Update the events after resuming from a checkpoint.
void schedStatEvent(bool dump, bool reset, Tick when, Tick repeat)
Schedule statistics dumping.
Output * initText(const string &filename, bool desc)
virtual bool valid() const =0
void pybind_init_stats(py::module &m_native)
virtual void visit(Output &visitor)=0
Visitor entry for outputing statistics data.
std::string desc
The description of the stat.