gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 468 of file statistics.hh.

Constructor & Destructor Documentation

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

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

Definition at line 482 of file statistics.hh.

Member Function Documentation

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

Decrement the stat by the given value.

Parameters
valThe new value.

Definition at line 500 of file statistics.hh.

References data, and X86ISA::val.

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

Increment the stat by the given value.

Parameters
valThe new value.

Definition at line 495 of file statistics.hh.

References data, and X86ISA::val.

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

Prepare stat data for dumping or serialization.

Definition at line 514 of file statistics.hh.

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

Reset stat value to default.

Definition at line 518 of file statistics.hh.

References data.

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

References data.

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

The the stat to the given value.

Parameters
valThe new value.

Definition at line 490 of file statistics.hh.

References data, and X86ISA::val.

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

References data.

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

Definition at line 523 of file statistics.hh.

References data.

Member Data Documentation

Counter Stats::StatStor::data
private

The statistic value.

Definition at line 472 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 Fri Jun 9 2017 13:04:38 for gem5 by doxygen 1.8.6