gem5 v24.0.0.0
Loading...
Searching...
No Matches
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
 Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
 
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 Tue Jun 18 2024 16:24:08 for gem5 by doxygen 1.11.0