#include <map>
#include <string>
#include <vector>
#include "base/compiler.hh"
#include "base/stats/units.hh"
Go to the source code of this file.
|
namespace | gem5 |
| Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
|
|
namespace | gem5::statistics |
|
|
#define | ADD_STAT(n, ...) n(this, #n, __VA_ARGS__) |
| Convenience macro to add a stat to a statistics group.
|
|
◆ 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 at line 75 of file group.hh.