Otawa  0.10
otawa::StatCollector Class Referenceabstract

A statistics collector allows to access statistics produced by an analysis. More...

#include <otawa/stats/StatCollector.h>

Inheritance diagram for otawa::StatCollector:
otawa::BBStatCollector

Classes

class  Collector
 This interface class must be implemented by any program that wants to collect statistics for the current statistics information. More...
 

Public Member Functions

virtual ~StatCollector (void)
 
virtual cstring name (void) const =0
 Name of the statistics (for human user, in english). More...
 
virtual cstring unit (void) const =0
 Name of statistics unit (for human user, in english). More...
 
virtual bool isEnum (void) const =0
 Test if the statistics concerns enumerated value. More...
 
virtual const cstring valueName (int value)=0
 Get the name of an enumerated value (for human user, in english). More...
 
virtual int total (void)=0
 
virtual void collect (Collector &collector)=0
 Called to collect the statistics. More...
 
virtual int mergeContext (int v1, int v2)=0
 This function allows to merge statistics of a same block in different contexts. More...
 
virtual int mergeAgreg (int v1, int v2)=0
 This function allows to merge statistics when different blocks are aggregated. More...
 

Detailed Description

A statistics collector allows to access statistics produced by an analysis.

Any specialized statistics provider must implements this class and store an instance in the StatInfo workspace instance. This allows generic processing of statistics by user interface applications.

Constructor & Destructor Documentation

otawa::StatCollector::~StatCollector ( void  )
virtual

Member Function Documentation

void otawa::StatCollector::collect ( Collector collector)
pure virtual

Called to collect the statistics.

Parameters
collectorCollector of statistics.

Implemented in otawa::BBStatCollector.

bool otawa::StatCollector::isEnum ( void  ) const
pure virtual

Test if the statistics concerns enumerated value.

If this method returns true, method valueName() can be called to collect names of enumerated values. The number of enumerated values is given by the total method.

Returns
True if the statistics are enumerated values.
int otawa::StatCollector::mergeAgreg ( int  v1,
int  v2 
)
pure virtual

This function allows to merge statistics when different blocks are aggregated.

int otawa::StatCollector::mergeContext ( int  v1,
int  v2 
)
pure virtual

This function allows to merge statistics of a same block in different contexts.

cstring otawa::StatCollector::name ( void  ) const
pure virtual

Name of the statistics (for human user, in english).

virtual int otawa::StatCollector::total ( void  )
pure virtual

Implemented in otawa::BBStatCollector.

cstring otawa::StatCollector::unit ( void  ) const
pure virtual

Name of statistics unit (for human user, in english).

const cstring otawa::StatCollector::valueName ( int  value)
pure virtual

Get the name of an enumerated value (for human user, in english).

May only be called if isEnum() returns true.

Parameters
valueEnumerated value.
Returns
Name of the enumerated value.

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