gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Stats::Info Class Referenceabstract

#include <info.hh>

Inheritance diagram for Stats::Info:
Stats::DistInfo Stats::ScalarInfo Stats::SparseHistInfo Stats::Vector2dInfo Stats::VectorDistInfo Stats::VectorInfo Stats::InfoProxy< Stat, DistInfo > Stats::InfoProxy< Stat, ScalarInfo > Stats::ProxyInfo Stats::InfoProxy< Stat, SparseHistInfo > Stats::InfoProxy< Stat, Vector2dInfo > Stats::InfoProxy< Stat, VectorDistInfo > Stats::InfoProxy< Stat, VectorInfo > Stats::FormulaInfo

Public Member Functions

 Info ()
 
virtual ~Info ()
 
void setName (const std::string &name)
 Set the name of this statistic. More...
 
void setSeparator (std::string _sep)
 
virtual bool check () const =0
 Check that this stat has been set up properly and is ready for use. More...
 
bool baseCheck () const
 
virtual void enable ()
 Enable the stat for use. More...
 
virtual void prepare ()=0
 Prepare the stat for dumping. More...
 
virtual void reset ()=0
 Reset the stat to the default state. More...
 
virtual bool zero () const =0
 
virtual void visit (Output &visitor)=0
 Visitor entry for outputing statistics data. More...
 

Static Public Member Functions

static bool less (Info *stat1, Info *stat2)
 Checks if the first stat's name is alphabetically less than the second. More...
 

Public Attributes

std::string name
 The name of the stat. More...
 
std::string desc
 The description of the stat. More...
 
Flags flags
 The formatting flags. More...
 
int precision
 The display precision. More...
 
const Infoprereq
 A pointer to a prerequisite Stat. More...
 
int id
 
const StorageParamsstorageParams
 

Static Public Attributes

static std::string separatorString = "::"
 The separator string used for vectors, dist, etc. More...
 
static int id_count = 0
 A unique stat ID for each stat in the simulator. More...
 

Detailed Description

Definition at line 69 of file info.hh.

Constructor & Destructor Documentation

Stats::Info::Info ( )

Definition at line 128 of file statistics.cc.

References Debug::breakpoint(), Stats::debug_break_id, and id_count.

Stats::Info::~Info ( )
virtual

Definition at line 136 of file statistics.cc.

Member Function Documentation

bool Stats::Info::baseCheck ( ) const

Definition at line 219 of file statistics.cc.

References cprintf(), Stats::display, flags, Stats::init, name, and panic.

Referenced by pybind_init_stats().

virtual bool Stats::Info::check ( ) const
pure virtual
void Stats::Info::enable ( )
virtual

Enable the stat for use.

Reimplemented in Stats::Vector2dInfo, Stats::VectorDistInfo, and Stats::VectorInfo.

Definition at line 240 of file statistics.cc.

Referenced by pybind_init_stats().

bool Stats::Info::less ( Info stat1,
Info stat2 
)
static

Checks if the first stat's name is alphabetically less than the second.

This function breaks names up at periods and considers each subname separately.

Parameters
stat1The first stat.
stat2The second stat.
Returns
stat1's name is alphabetically before stat2's

Definition at line 193 of file statistics.cc.

References ArmISA::i, name, and tokenize().

virtual void Stats::Info::prepare ( )
pure virtual
virtual void Stats::Info::reset ( )
pure virtual
void Stats::Info::setName ( const std::string &  name)

Set the name of this statistic.

Definition at line 172 of file statistics.cc.

References name, Stats::nameMap(), MipsISA::p, panic, and Stats::validateStatName().

Referenced by Stats::DataWrap< SparseHistogram, SparseHistInfoProxy >::name().

void Stats::Info::setSeparator ( std::string  _sep)
inline

Definition at line 100 of file info.hh.

References separatorString.

virtual void Stats::Info::visit ( Output visitor)
pure virtual
virtual bool Stats::Info::zero ( ) const
pure virtual

Member Data Documentation

std::string Stats::Info::desc

The description of the stat.

Definition at line 77 of file info.hh.

Referenced by Stats::DistPrint::init(), Stats::SparseHistPrint::init(), pybind_init_stats(), and Stats::Text::visit().

Flags Stats::Info::flags
int Stats::Info::id

Definition at line 89 of file info.hh.

Referenced by pybind_init_stats().

int Stats::Info::id_count = 0
static

A unique stat ID for each stat in the simulator.

Can be used externally for lookups as well as for debugging.

Definition at line 88 of file info.hh.

Referenced by Info().

std::string Stats::Info::name
int Stats::Info::precision

The display precision.

Definition at line 81 of file info.hh.

Referenced by Stats::DistPrint::init(), Stats::SparseHistPrint::init(), and Stats::Text::visit().

const Info* Stats::Info::prereq

A pointer to a prerequisite Stat.

Definition at line 83 of file info.hh.

Referenced by Stats::Text::noOutput().

std::string Stats::Info::separatorString = "::"
static

The separator string used for vectors, dist, etc.

Definition at line 75 of file info.hh.

Referenced by Stats::DistPrint::init(), Stats::SparseHistPrint::init(), setSeparator(), and Stats::Text::visit().

const StorageParams* Stats::Info::storageParams

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

Generated on Fri Jun 9 2017 13:04:40 for gem5 by doxygen 1.8.6