gem5  v20.0.0.3
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 491 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 505 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 523 of file statistics.hh.

References X86ISA::val.

◆ inc()

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

Increment the stat by the given value.

Parameters
valThe new value.

Definition at line 518 of file statistics.hh.

References X86ISA::val.

◆ prepare()

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

Prepare stat data for dumping or serialization.

Definition at line 537 of file statistics.hh.

◆ reset()

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

Reset stat value to default.

Definition at line 541 of file statistics.hh.

◆ 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 533 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 513 of file statistics.hh.

References 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 528 of file statistics.hh.

References data.

◆ zero()

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

Definition at line 546 of file statistics.hh.

Member Data Documentation

◆ data

Counter Stats::StatStor::data
private

The statistic value.

Definition at line 495 of file statistics.hh.


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

Generated on Fri Jul 3 2020 15:53:57 for gem5 by doxygen 1.8.13