Otawa  0.10
otawa::cache::CategoryStats Class Reference

This class is used to store statistics about the categories about cache accesses. More...

#include <otawa/cache/categories.h>

Public Member Functions

 CategoryStats (void)
 
void reset (void)
 Reset the statistics. More...
 
void add (category_t cat)
 
void addLinked (void)
 Add a new linked l-block to the statistics. More...
 
int get (category_t cat) const
 Get the counter of a category. More...
 
int total (void) const
 Get the total count of categories. More...
 
int linked (void) const
 Get the count of linked statistics. More...
 

Private Attributes

int counts [NOT_CLASSIFIED+1]
 
int _total
 
int _linked
 

Detailed Description

This class is used to store statistics about the categories about cache accesses.

It it provided by cache category builders.

See also
CATBuilder, CAT2Builder

Constructor & Destructor Documentation

CategoryStats::CategoryStats ( void  )

References reset().

Member Function Documentation

void otawa::cache::CategoryStats::add ( category_t  cat)
inline
void CategoryStats::addLinked ( void  )
inline

Add a new linked l-block to the statistics.

Referenced by otawa::LinkedBlocksDetector::recordBlocks().

int CategoryStats::get ( category_t  cat) const
inline

Get the counter of a category.

Parameters
catCategory to get counter for.
Returns
Category count.

References otawa::NOT_CLASSIFIED.

Referenced by otawa::cache::operator<<().

int CategoryStats::linked ( void  ) const
inline

Get the count of linked statistics.

Returns
Linked l-block statistics.

Referenced by otawa::cache::operator<<().

void CategoryStats::reset ( void  )

Reset the statistics.

References _linked, _total, counts, and otawa::cache::NOT_CLASSIFIED.

Referenced by CategoryStats(), and otawa::CAT2Builder::configure().

int CategoryStats::total ( void  ) const
inline

Get the total count of categories.

Returns
Category total count.

Referenced by otawa::cache::operator<<().

Member Data Documentation

int otawa::cache::CategoryStats::_linked
private

Referenced by reset().

int otawa::cache::CategoryStats::_total
private

Referenced by reset().

int otawa::cache::CategoryStats::counts[NOT_CLASSIFIED+1]
private

Referenced by reset().


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