gem5 v24.0.0.0
Loading...
Searching...
No Matches
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.
 
void set (Counter val)
 The the stat to the given value.
 
void inc (Counter val)
 Increment the stat by the given value.
 
void dec (Counter val)
 Decrement the stat by the given value.
 
Counter value () const
 Return the value of this stat as its base type.
 
Result result () const
 Return the value of this stat as a result type.
 
void prepare (const StorageParams *const storage_params)
 Prepare stat data for dumping or serialization.
 
void reset (const StorageParams *const storage_params)
 Reset stat value to default.
 
bool zero () const
 

Private Attributes

Counter data
 The statistic value.
 

Detailed Description

Templatized storage and interface for a simple scalar stat.

Definition at line 56 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 69 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 89 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 83 of file storage.hh.

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

Referenced by TEST(), and TEST().

◆ prepare()

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

Prepare stat data for dumping or serialization.

Definition at line 106 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 111 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 101 of file storage.hh.

References data.

Referenced by TEST(), and TEST().

◆ set()

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

The the stat to the given value.

Parameters
valThe new value.

Definition at line 77 of file storage.hh.

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

Referenced by TEST(), and 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 95 of file storage.hh.

References data.

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

◆ zero()

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

Definition at line 116 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 60 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 Tue Jun 18 2024 16:24:24 for gem5 by doxygen 1.11.0