From 2f8d118bd9fff7fd8dbca10d88291744ab91e3d7 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Thu, 30 Apr 2020 03:07:41 -0700 Subject: [PATCH] misc,base,stats: Tagged API methods in base/stats/group.hh Change-Id: I61693884d719025f3b1f385793c7a71de0937e79 Issue-on: https://gem5.atlassian.net/browse/GEM5-172 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28390 Tested-by: kokoro Reviewed-by: Bobby R. Bruce Maintainer: Bobby R. Bruce --- src/base/stats/group.hh | 21 +++++++++++++++++++++ src/doxygen/group_definitions.hh | 6 ++++++ 2 files changed, 27 insertions(+) diff --git a/src/base/stats/group.hh b/src/base/stats/group.hh index 4fd9e79fd..985bf61f6 100644 --- a/src/base/stats/group.hh +++ b/src/base/stats/group.hh @@ -83,9 +83,14 @@ class Info; class Group { public: + /** + * @ingroup api_stats + * @{ + */ Group() = delete; Group(const Group &) = delete; Group &operator=(const Group &) = delete; + /** @}*/ //end of api_stats /** * Construct a new statistics group. @@ -104,6 +109,8 @@ class Group * @param parent Parent group to associate this object to. * @param name Name of this group, can be NULL to merge this group * with the parent group. + * + * @ingroup api_stats */ Group(Group *parent, const char *name = nullptr); @@ -117,11 +124,15 @@ class Group * description. Stat names and descriptions should typically be * set from the constructor usingo from the constructor using the * ADD_STAT macro. + * + * @ingroup api_stats */ virtual void regStats(); /** * Callback to reset stats. + * + * @ingroup api_stats */ virtual void resetStats(); @@ -129,22 +140,30 @@ class Group * Callback before stats are dumped. This can be overridden by * objects that need to perform calculations in addition to the * capabiltiies implemented in the stat framework. + * + * @ingroup api_stats */ virtual void preDumpStats(); /** * Register a stat with this group. This method is normally called * automatically when a stat is instantiated. + * + * @ingroup api_stats */ void addStat(Stats::Info *info); /** * Get all child groups associated with this object. + * + * @ingroup api_stats */ const std::map &getStatGroups() const; /** * Get all stats associated with this object. + * + * @ingroup api_stats */ const std::vector &getStats() const; @@ -154,6 +173,8 @@ class Group * This method may only be called from a Group constructor or from * regStats. It's typically only called explicitly from Python * when setting up the SimObject hierarchy. + * + * @ingroup api_stats */ void addStatGroup(const char *name, Group *block); diff --git a/src/doxygen/group_definitions.hh b/src/doxygen/group_definitions.hh index c0599bb45..e6e39b7cc 100644 --- a/src/doxygen/group_definitions.hh +++ b/src/doxygen/group_definitions.hh @@ -15,3 +15,9 @@ * * These methods relate to the event queue interface. */ + +/** + * @defgroup api_stats The Stats API. + * + * These methods relate to the statistics I/O interface. + */ -- 2.30.2