gem5  v22.1.0.0
Classes | Public Member Functions | Private Attributes | List of all members
gem5::statistics::StatStor Class Reference

Templatized storage and interface for a simple scalar stat. More...

#include <storage.hh>

Classes

struct  Params
 

Public Member Functions

 StatStor (const StorageParams *const storage_params)
 Builds this storage element and calls the base constructor of the datatype. More...
 
void set (Counter val)
 The the stat to the given value. More...
 
void inc (Counter val)
 Increment the stat by the given value. More...
 
void dec (Counter val)
 Decrement the stat by the given value. More...
 
Counter value () const
 Return the value of this stat as its base type. More...
 
Result result () const
 Return the value of this stat as a result type. More...
 
void prepare (const StorageParams *const storage_params)
 Prepare stat data for dumping or serialization. More...
 
void reset (const StorageParams *const storage_params)
 Reset stat value to default. More...
 
bool zero () const
 

Private Attributes

Counter data
 The statistic value. More...
 

Detailed Description

Templatized storage and interface for a simple scalar stat.

Definition at line 57 of file storage.hh.

Constructor & Destructor Documentation

◆ StatStor()

gem5::statistics::StatStor::StatStor ( const StorageParams *const  storage_params)
inline

Builds this storage element and calls the base constructor of the datatype.

Definition at line 70 of file storage.hh.

Member Function Documentation

◆ dec()

void gem5::statistics::StatStor::dec ( Counter  val)
inline

Decrement the stat by the given value.

Parameters
valThe new value.

Definition at line 90 of file storage.hh.

References data, and gem5::X86ISA::val.

Referenced by TEST().

◆ inc()

void gem5::statistics::StatStor::inc ( Counter  val)
inline

Increment the stat by the given value.

Parameters
valThe new value.

Definition at line 84 of file storage.hh.

References data, and gem5::X86ISA::val.

Referenced by TEST().

◆ prepare()

void gem5::statistics::StatStor::prepare ( const StorageParams *const  storage_params)
inline

Prepare stat data for dumping or serialization.

Definition at line 107 of file storage.hh.

Referenced by TEST().

◆ reset()

void gem5::statistics::StatStor::reset ( const StorageParams *const  storage_params)
inline

Reset stat value to default.

Definition at line 112 of file storage.hh.

References data.

Referenced by TEST().

◆ result()

Result gem5::statistics::StatStor::result ( ) const
inline

Return the value of this stat as a result type.

Returns
The value of this stat.

Definition at line 102 of file storage.hh.

References data.

Referenced by TEST().

◆ set()

void gem5::statistics::StatStor::set ( Counter  val)
inline

The the stat to the given value.

Parameters
valThe new value.

Definition at line 78 of file storage.hh.

References data, and gem5::X86ISA::val.

Referenced by TEST().

◆ value()

Counter gem5::statistics::StatStor::value ( ) const
inline

Return the value of this stat as its base type.

Returns
The value of this stat.

Definition at line 96 of file storage.hh.

References data.

Referenced by TEST().

◆ zero()

bool gem5::statistics::StatStor::zero ( ) const
inline
Returns
true if zero value

Definition at line 117 of file storage.hh.

References data.

Referenced by TEST().

Member Data Documentation

◆ data

Counter gem5::statistics::StatStor::data
private

The statistic value.

Definition at line 61 of file storage.hh.

Referenced by dec(), inc(), reset(), result(), set(), value(), and zero().


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

Generated on Wed Dec 21 2022 10:24:27 for gem5 by doxygen 1.9.1