gem5  v20.1.0.0
Classes | Namespaces | Macros
group.hh File Reference
#include <map>
#include <vector>
#include <string>

Go to the source code of this file.

Classes

class  Stats::Group
 Statistics container. More...
 

Namespaces

 Stats
 

Macros

#define ADD_STAT(n, ...)   n(this, # n, __VA_ARGS__)
 Convenience macro to add a stat to a statistics group. More...
 

Macro Definition Documentation

◆ ADD_STAT

#define ADD_STAT (   n,
  ... 
)    n(this, # n, __VA_ARGS__)

Convenience macro to add a stat to a statistics group.

This macro is used to add a stat to a Stats::Group in the initilization list in the Group's constructor. The macro automatically assigns the stat to the current group and gives it the same name as in the class. For example:

struct MyStats : public Stats::Group
{
Stats::Scalar scalar0;
Stats::Scalar scalar1;
: ADD_STAT(scalar0, "Description of scalar0"),
scalar1(this, "scalar1", "Description of scalar1")
{
}
};

Definition at line 67 of file group.hh.

Stats::Group::Group
Group()=delete
Stats::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:2533
ADD_STAT
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Definition: group.hh:67
Stats::Group
Statistics container.
Definition: group.hh:83

Generated on Wed Sep 30 2020 14:02:18 for gem5 by doxygen 1.8.17