diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2019-09-24 10:41:17 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2019-09-26 10:05:03 +0000 |
commit | 7e52bf014adefe6be8ea0da53192bf77f6131c9b (patch) | |
tree | 4a10bd17bcdcc1091021964a1d1b8c3bdce72640 /src/python/pybind11 | |
parent | 4f52287500cca19325cc58e9cbef374526572e44 (diff) | |
download | gem5-7e52bf014adefe6be8ea0da53192bf77f6131c9b.tar.xz |
stats: Add a preDumpStats() callback to Stats::Group
Some objects need to know that we are about to dump stats to perform
prepare statistics. This is currently done by registering a callback
with the stat system. Expose this callback as a virtual method
in Stats::Group to make this pattern more convenient.
Change-Id: I5aa475b7d04c288e45f5f413ab7a1907b971dae5
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21139
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Diffstat (limited to 'src/python/pybind11')
-rw-r--r-- | src/python/pybind11/stats.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/python/pybind11/stats.cc b/src/python/pybind11/stats.cc index 190c78d52..b1f420978 100644 --- a/src/python/pybind11/stats.cc +++ b/src/python/pybind11/stats.cc @@ -127,6 +127,7 @@ pybind_init_stats(py::module &m_native) m, "Group") .def("regStats", &Stats::Group::regStats) .def("resetStats", &Stats::Group::resetStats) + .def("preDumpStats", &Stats::Group::preDumpStats) .def("getStats", &Stats::Group::getStats) .def("getStatGroups", &Stats::Group::getStatGroups) .def("addStatGroup", &Stats::Group::addStatGroup) |