gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::statistics::Info Class Referenceabstract

#include <info.hh>

Inheritance diagram for gem5::statistics::Info:
DummyInfo TestInfo gem5::statistics::DistInfo gem5::statistics::ScalarInfo gem5::statistics::SparseHistInfo gem5::statistics::Vector2dInfo gem5::statistics::VectorDistInfo gem5::statistics::VectorInfo

Public Member Functions

 Info ()
 
virtual ~Info ()
 
void setName (const std::string &name, bool old_style=true)
 Set the name of this statistic.
 
void setSeparator (std::string _sep)
 
StorageParams const * getStorageParams () const
 Getter for the storage params.
 
void setStorageParams (const StorageParams *const params)
 Setter for the storage params.
 
virtual bool check () const =0
 Check that this stat has been set up properly and is ready for use.
 
bool baseCheck () const
 
virtual void enable ()
 Enable the stat for use.
 
virtual void prepare ()=0
 Prepare the stat for dumping.
 
virtual void reset ()=0
 Reset the stat to the default state.
 
virtual bool zero () const =0
 
virtual void visit (Output &visitor)=0
 Visitor entry for outputing statistics data.
 

Static Public Member Functions

static bool less (Info *stat1, Info *stat2)
 Checks if the first stat's name is alphabetically less than the second.
 

Public Attributes

std::string name
 The name of the stat.
 
const units::Baseunit = units::Unspecified::get()
 The unit of the stat.
 
std::string desc
 The description of the stat.
 
Flags flags
 The formatting flags.
 
int precision
 The display precision.
 
const Infoprereq
 A pointer to a prerequisite Stat.
 
int id
 

Static Public Attributes

static std::string separatorString = "::"
 The separator string used for vectors, dist, etc.
 
static int id_count = 0
 A unique stat ID for each stat in the simulator.
 

Private Attributes

std::unique_ptr< const StorageParamsstorageParams
 

Detailed Description

Definition at line 79 of file info.hh.

Constructor & Destructor Documentation

◆ Info()

gem5::statistics::Info::Info ( )

Definition at line 71 of file info.cc.

References gem5::debug::breakpoint(), gem5::statistics::debug_break_id, and id_count.

◆ ~Info()

gem5::statistics::Info::~Info ( )
virtual

Definition at line 79 of file info.cc.

Member Function Documentation

◆ baseCheck()

bool gem5::statistics::Info::baseCheck ( ) const

Definition at line 172 of file info.cc.

References gem5::statistics::display, flags, gem5::statistics::init, name, and panic.

Referenced by gem5::pybind_init_stats(), TEST(), TEST(), TEST(), and TEST().

◆ check()

◆ enable()

void gem5::statistics::Info::enable ( )
virtual

Enable the stat for use.

Reimplemented in gem5::statistics::Vector2dInfo, gem5::statistics::VectorDistInfo, and gem5::statistics::VectorInfo.

Definition at line 192 of file info.cc.

Referenced by gem5::pybind_init_stats().

◆ getStorageParams()

◆ less()

bool gem5::statistics::Info::less ( Info * stat1,
Info * stat2 )
static

Checks if the first stat's name is alphabetically less than the second.

This function breaks names up at periods and considers each subname separately.

Parameters
stat1The first stat.
stat2The second stat.
Returns
stat1's name is alphabetically before stat2's

Definition at line 146 of file info.cc.

References gem5::ArmISA::i, name, and gem5::tokenize().

Referenced by TEST(), and TEST().

◆ prepare()

◆ reset()

◆ setName()

void gem5::statistics::Info::setName ( const std::string & name,
bool old_style = true )

Set the name of this statistic.

Special handling must be done when creating an old-style statistic (i.e., stats without a parent group).

Parameters
nameThe new name.
old_styleWhether we are using the old style.

Definition at line 127 of file info.cc.

References name, gem5::statistics::nameMap(), gem5::MipsISA::p, panic, panic_if, and gem5::statistics::validateStatName().

Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().

◆ setSeparator()

void gem5::statistics::Info::setSeparator ( std::string _sep)
inline

Definition at line 119 of file info.hh.

References separatorString.

Referenced by TEST().

◆ setStorageParams()

void gem5::statistics::Info::setStorageParams ( const StorageParams *const params)

Setter for the storage params.

Definition at line 90 of file info.cc.

References storageParams.

Referenced by gem5::statistics::InfoAccess::setParams().

◆ visit()

◆ zero()

Member Data Documentation

◆ desc

◆ flags

◆ id

int gem5::statistics::Info::id

Definition at line 101 of file info.hh.

Referenced by gem5::pybind_init_stats(), and TEST().

◆ id_count

int gem5::statistics::Info::id_count = 0
static

A unique stat ID for each stat in the simulator.

Can be used externally for lookups as well as for debugging.

Definition at line 100 of file info.hh.

Referenced by Info().

◆ name

◆ precision

int gem5::statistics::Info::precision

◆ prereq

const Info* gem5::statistics::Info::prereq

A pointer to a prerequisite Stat.

Definition at line 95 of file info.hh.

Referenced by gem5::statistics::Text::noOutput().

◆ separatorString

std::string gem5::statistics::Info::separatorString = "::"
static

◆ storageParams

std::unique_ptr<const StorageParams> gem5::statistics::Info::storageParams
private

Definition at line 104 of file info.hh.

Referenced by getStorageParams(), and setStorageParams().

◆ unit


The documentation for this class was generated from the following files:

Generated on Tue Jun 18 2024 16:24:24 for gem5 by doxygen 1.11.0