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

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

#include <statistics.hh>

Classes

struct  Params
 

Public Member Functions

 StatStor (Info *info)
 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 (Info *info)
 Prepare stat data for dumping or serialization. More...
 
void reset (Info *info)
 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 489 of file statistics.hh.

Constructor & Destructor Documentation

◆ StatStor()

Stats::StatStor::StatStor ( Info info)
inline

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

Definition at line 503 of file statistics.hh.

Member Function Documentation

◆ dec()

void Stats::StatStor::dec ( Counter  val)
inline

Decrement the stat by the given value.

Parameters
valThe new value.

Definition at line 521 of file statistics.hh.

References data, and X86ISA::val.

◆ inc()

void Stats::StatStor::inc ( Counter  val)
inline

Increment the stat by the given value.

Parameters
valThe new value.

Definition at line 516 of file statistics.hh.

References data, and X86ISA::val.

◆ prepare()

void Stats::StatStor::prepare ( Info info)
inline

Prepare stat data for dumping or serialization.

Definition at line 535 of file statistics.hh.

◆ reset()

void Stats::StatStor::reset ( Info info)
inline

Reset stat value to default.

Definition at line 539 of file statistics.hh.

References data.

◆ result()

Result Stats::StatStor::result ( ) const
inline

Return the value of this stat as a result type.

Returns
The value of this stat.

Definition at line 531 of file statistics.hh.

References data.

◆ set()

void Stats::StatStor::set ( Counter  val)
inline

The the stat to the given value.

Parameters
valThe new value.

Definition at line 511 of file statistics.hh.

References data, and X86ISA::val.

◆ value()

Counter Stats::StatStor::value ( ) const
inline

Return the value of this stat as its base type.

Returns
The value of this stat.

Definition at line 526 of file statistics.hh.

References data.

◆ zero()

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

Definition at line 544 of file statistics.hh.

References data.

Member Data Documentation

◆ data

Counter Stats::StatStor::data
private

The statistic value.

Definition at line 493 of file statistics.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 Sep 30 2020 14:03:12 for gem5 by doxygen 1.8.17