gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 69 of file group.hh.

Referenced by BaseXBar::Layer< MasterPort, SlavePort >::Layer().


Generated on Fri Feb 28 2020 16:27:06 for gem5 by doxygen 1.8.13