gem5  v22.1.0.0
Classes | Namespaces | Macros | Functions
group.hh File Reference
#include <map>
#include <string>
#include <vector>
#include "base/compiler.hh"
#include "base/stats/units.hh"

Go to the source code of this file.

Classes

class  gem5::statistics::Group
 Statistics container. More...
 

Namespaces

 gem5
 Reference material can be found at the JEDEC website: UFS standard http://www.jedec.org/standards-documents/results/jesd220 UFS HCI specification http://www.jedec.org/standards-documents/results/jesd223.
 
 gem5::statistics
 

Macros

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

Functions

 gem5::GEM5_DEPRECATED_NAMESPACE (Stats, statistics)
 

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 statistics::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 statistics::Group
{
statistics::Scalar scalar0;
statistics::Scalar scalar1;
Group()
: ADD_STAT(scalar0, "Description of scalar0"),
scalar1(this, "scalar1", statistics::units::Unspecified::get(),
"Description of scalar1")
{
}
};
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Definition: group.hh:75

Definition at line 75 of file group.hh.


Generated on Wed Dec 21 2022 10:22:53 for gem5 by doxygen 1.9.1