gem5 v23.0.0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Namespaces | Macros
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

namespace  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.
 
namespace  gem5::statistics
 

Macros

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

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 Mon Jul 10 2023 15:32:07 for gem5 by doxygen 1.9.7