Otawa  0.10
otawa::Processor Class Reference

The processor class is implemented by all code processor. More...

#include <otawa/proc/Processor.h>

Inheritance diagram for otawa::Processor:
otawa::Monitor otawa::ACSBuilder otawa::ACSMayBuilder otawa::AlternativeProcessor otawa::ast::ASTLoader otawa::ast::FunProcessor otawa::branch::BranchBuilder otawa::CAT2OnlyConstraintBuilder otawa::cat::CATBuilder otawa::cat::CATConstraintBuilder otawa::ccg::Builder otawa::ccg::ConstraintBuilder otawa::CFGBuilder otawa::CFGCollector otawa::CFGProcessor otawa::clp::Analysis otawa::ContextTreeBuilder otawa::dcache::ACSBuilder otawa::dcache::ACSMayBuilder otawa::dcache::CATBuilder otawa::dcache::CatConstraintBuilder otawa::DeadCodeAnalysis otawa::display::ILPSystemDisplayer otawa::EdgeACSBuilder otawa::EdgeCAT2ConstraintBuilder otawa::FixedTextDecoder otawa::FlowFactLoader otawa::FunProcessor otawa::hard::Dumper otawa::ilp::Output otawa::ipet::ILPSystemGetter otawa::ipet::WCETComputation otawa::LBlockProcessor otawa::LinkedBlocksDetector otawa::LoopReductor otawa::LoopUnroller otawa::NoProcessor otawa::NullProcessor otawa::PCGBuilder otawa::PFGBuilder otawa::script::Script otawa::StackAnalysis otawa::StackAnalysis otawa::SubCFGBuilder otawa::TextDecoder otawa::VarTextDecoder otawa::Virtualizer

Classes

class  Deletor
 
class  Remover
 

Public Types

enum  log_level_t {
  LOG_NONE = 0, LOG_PROC = 1, LOG_FILE = 2, LOG_DEPS = LOG_FILE,
  LOG_FUN = 3, LOG_CFG = LOG_FUN, LOG_BLOCK = 4, LOG_BB = LOG_BLOCK,
  LOG_INST = 5
}
 
typedef enum
otawa::Monitor::log_level_t 
log_level_t
 

Public Member Functions

 Processor (void)
 Build a simple anonymous processor. More...
 
 Processor (AbstractRegistration &registration)
 For internal use only. More...
 
 Processor (String name, Version version)
 Build a new processor with name and version. More...
 
 Processor (String name, Version version, AbstractRegistration &registration)
 For internal use only. More...
 
virtual ~Processor (void)
 
elm::String name (void) const
 
elm::Version version (void) const
 
virtual void configure (const PropList &props)
 This method may be called for configuring a processor thanks to information passed in the property list. More...
 
void process (WorkSpace *ws, const PropList &props=PropList::EMPTY)
 Execute the code processor on the given framework. More...
 
 Processor (const PropList &props)
 Build a new processor. More...
 
 Processor (elm::String name, elm::Version version, const PropList &props)
 Build a new processor with name and version. More...
 
WorkSpaceworkspace (void)
 Get the current workspace. More...
 
bool isVerbose (void) const
 Test if the verbosity is activated. More...
 
bool logFor (log_level_t tested) const
 Test if the given log level is activated or not. More...
 
log_level_t logLevel (void) const
 

Public Attributes

elm::io::Output out
 Provide a stream to perform output for the user. More...
 
elm::io::Output log
 Provide a stream to perform log output. More...
 

Static Public Attributes

static MetaRegistration reg
 
static Identifier< PropList * > STATS
 This property identifiers is used to pass a property list to the processor that will be used to store statistics about the performed work. More...
 
static Identifier< bool > TIMED
 If the value of the associated property is true (default to false), time statistics will also be collected with other processor statistics. More...
 
static Identifier< bool > RECURSIVE
 
static Identifier< Progress * > PROGRESS
 Install. More...
 
static Identifier< bool > COLLECT_STATS
 This property allows to activate collection of statistics for the work of the current processor. More...
 
static Identifier
< elm::io::OutStream * > & 
OUTPUT = otawa::OUTPUT
 This property identifier is used for setting the output stream used by the processor to write results. More...
 
static Identifier
< elm::io::OutStream * > & 
LOG = otawa::LOG
 This property identifier is used for setting the log stream used by the processor to write messages (information, warning, error). More...
 
static Identifier< bool > & VERBOSE = otawa::VERBOSE
 This property activates the verbose mode of the processor: information about the processor work will be displayed. More...
 
static Identifier< log_level_t > & LOG_LEVEL = otawa::LOG_LEVEL
 Property passed in the configuration property list of a processor to select the log level between LOG_PROC, LOG_CFG or LOG_BB. More...
 
static Identifier
< elm::system::time_t > 
RUNTIME
 This property identifier is used to store in the statistics of a processor the overall run time of the processor work. More...
 
static Monitornull = __null_mon
 Monitor that output nothing. More...
 

Protected Member Functions

bool isTimed (void) const
 Test if the timed mode is activated (recording of timings in the statistics). More...
 
bool recordsStats (void) const
 Test if the statictics mode is activated. More...
 
bool isAllocated (void) const
 
bool isPrepared (void) const
 
bool isCollectingStats (void) const
 
void require (const AbstractFeature &feature)
 Usually called from a processor constructor, this method records a required feature for the work of the current processor. More...
 
void provide (const AbstractFeature &feature)
 Usually called from a processor constructor, this method records a feature provided by the work of the current processor. More...
 
void invalidate (const AbstractFeature &feature)
 Usually called from a processor constructor, this method records a feature invalidated by the work of the current processor. More...
 
void use (const AbstractFeature &feature)
 Usually called from a processor constructor, this method records a feature as used by the work of the current processor. More...
 
void warn (const String &message)
 Display a warning. More...
 
WorkSpaceworkspace (void) const
 Get the current workspace. More...
 
Progressprogress (void)
 Get the current progress handler. More...
 
void recordStat (const AbstractFeature &feature, StatCollector *collector)
 Add a statistics collector to the current workspace collection. More...
 
void addCleaner (const AbstractFeature &feature, Cleaner *cleaner)
 Add a cleaner for the given feature. More...
 
template<class T >
void addRemover (const AbstractFeature &feature, const Ref< T, Identifier< T > > &ref)
 
template<class T >
void addDeletor (const AbstractFeature &feature, const Ref< T *, Identifier< T * > > &ref)
 
virtual void prepare (WorkSpace *ws)
 This method called to let the processor customize its requirements according to some generic feature. More...
 
virtual void processWorkSpace (WorkSpace *ws)
 Process the given framework. More...
 
virtual void setup (WorkSpace *ws)
 This method is called before an anlysis to let the processor do some initialization. More...
 
virtual void cleanup (WorkSpace *ws)
 This method is called after the end of the processor analysis to let it do some clean up. More...
 
virtual void collectStats (WorkSpace *ws)
 This method is invoked if the user has required to collect statistics about the processor. More...
 
virtual void processFrameWork (WorkSpace *fw)
 Process the given workspace. More...
 
template<class T >
T * track (const AbstractFeature &feature, T *object)
 
template<class T >
void track (const AbstractFeature &feature, const Ref< T *, Identifier< T * > > &ref)
 Track the release of an allocated object assigned to an identifier relatively to the given feature. More...
 
template<class T >
void track (const AbstractFeature &feature, const Ref< T *, const Identifier< T * > > &ref)
 Track the release of an allocated object assigned to an identifier relatively to the given feature. More...
 
virtual void requireDyn (WorkSpace *ws, const PropList &props)
 Method called after registration requirements to support dynamic requirements. More...
 
void setWorkspace (WorkSpace *workspace)
 Set the current workspace. More...
 

Protected Attributes

PropListstats
 
t::uint32 flags
 Contains various bit flags. More...
 

Static Protected Attributes

static const t::uint32 IS_TIMED = 0x01 << CUSTOM_SHIFT
 
static const t::uint32 IS_ALLOCATED = 0x04 << CUSTOM_SHIFT
 
static const t::uint32 IS_PREPARED = 0x08 << CUSTOM_SHIFT
 
static const t::uint32 IS_COLLECTING = 0x10 << CUSTOM_SHIFT
 
static const t::uint32 IS_VERBOSE = 0x01
 
static const t::uint32 CUSTOM_SHIFT = 16
 

Private Types

typedef Pair< const
AbstractFeature *, Cleaner * > 
clean_t
 
typedef elm::genstruct::SLList
< clean_t
clean_list_t
 

Private Member Functions

void init (const PropList &props)
 

Private Attributes

AbstractRegistration_reg
 
WorkSpacews
 
clean_list_t cleaners
 
Progress_progress
 

Friends

class FeatureRequirer
 

Detailed Description

The processor class is implemented by all code processor.

At this level, the argument can only be the full framework. Look at sub-classes for more accurate processors.

Configuration

Statistics The statistics are recorded in the property list passed by Processor::STATS.

Verbosity OTAWA provides two way to activate verbosity in code processors.

  • passing the Processor::VERBOSE to the processor property list
  • define the environment variable "OTAWA_VERBOSE"

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
LOG_NONE 
LOG_PROC 
LOG_FILE 
LOG_DEPS 
LOG_FUN 
LOG_CFG 
LOG_BLOCK 
LOG_BB 
LOG_INST 

Constructor & Destructor Documentation

otawa::Processor::Processor ( void  )

Build a simple anonymous processor.

References otawa::AbstractRegistration::_base, _reg, otawa::Monitor::flags, IS_ALLOCATED, and reg.

otawa::Processor::Processor ( AbstractRegistration registration)

For internal use only.

References _reg, and otawa::registration().

otawa::Processor::Processor ( String  name,
Version  version 
)
otawa::Processor::~Processor ( void  )
virtual
otawa::Processor::Processor ( const PropList props)

Build a new processor.

Parameters
Configurationproperties.
Deprecated:
Configuration must be passed at the process() call.

References otawa::AbstractRegistration::_base, _reg, otawa::Monitor::flags, init(), IS_ALLOCATED, and reg.

otawa::Processor::Processor ( elm::String  name,
elm::Version  version,
const PropList props 
)

Build a new processor with name and version.

Parameters
nameProcessor name.
versionProcessor version.
propsConfiguration properties.
Deprecated:
Configuration must be passed at the process() call.

References otawa::AbstractRegistration::_base, otawa::AbstractRegistration::_name, _reg, otawa::AbstractRegistration::_version, otawa::Monitor::flags, init(), IS_ALLOCATED, name(), reg, and version().

Member Function Documentation

void otawa::Processor::addCleaner ( const AbstractFeature feature,
Cleaner cleaner 
)
inlineprotected

Add a cleaner for the given feature.

A cleaner is an object with a virtual destructor that is called when the associated feature is removed: this let the processor to release and clean up the resources it allocated to implement the provided features.

Parameters
featureFeature the cleaner apply to.
cleanerCleaner to add.

Referenced by otawa::DelayedBuilder::cleanup(), otawa::StackAnalysis::cleanup(), otawa::Dominance::processCFG(), otawa::CFGCollector::processWorkSpace(), otawa::clp::Analysis::processWorkSpace(), and recordStat().

template<class T >
void otawa::Processor::addDeletor ( const AbstractFeature feature,
const Ref< T *, Identifier< T * > > &  ref 
)
inlineprotected
template<class T >
void otawa::Processor::addRemover ( const AbstractFeature feature,
const Ref< T, Identifier< T > > &  ref 
)
inlineprotected
void otawa::Processor::collectStats ( WorkSpace ws)
protectedvirtual

This method is invoked if the user has required to collect statistics about the processor.

In its default implementation, this method does nothing but it may be customized if the current implementation provides statistics. It is called after the main computation of the processor.

Statistics must be objects inheriting from the class StatCollector and recorded with method recordStat().

Parameters
wsCurrent workspace.

Reimplemented in otawa::dcache::CatConstraintBuilder, otawa::ipet::WCETComputation, and otawa::CAT2OnlyConstraintBuilder.

Referenced by process().

void otawa::Processor::configure ( const PropList props)
virtual

This method may be called for configuring a processor thanks to information passed in the property list.

Parameters
propsConfiguration information.

Reimplemented in otawa::GraphBBTime< G >, otawa::GraphBBTime< ParExeGraph >, otawa::AccessedAddressFromStack, otawa::dcache::ACSBuilder, otawa::dcache::ACSMayBuilder, otawa::FlowFactLoader, otawa::script::Script, otawa::tsim::Delta, otawa::ipet::ConstraintLoader, otawa::EdgeACSBuilder, otawa::bpred::BPredProcessor, otawa::display::ILPSystemDisplayer, otawa::display::CFGOutput, otawa::ccg::ConstraintBuilder, otawa::Virtualizer, otawa::ipet::VarAssignment, otawa::EdgeCAT2Builder, otawa::ipet::BasicConstraintsBuilder, otawa::etime::StandardEventBuilder, otawa::dcache::BlockBuilder, otawa::ipet::ILPSystemGetter, otawa::CAT2Builder, otawa::cat::CATConstraintBuilder, otawa::clp::Analysis, otawa::branch::OnlyConsBuilder, otawa::ACSBuilder, otawa::BBRatioDisplayer, otawa::LinkedBlocksDetector, otawa::SubCFGBuilder, otawa::CFGProcessor, otawa::StackAnalysis, otawa::ACSMayBuilder, otawa::etime::EdgeTimeBuilder, otawa::CFGBuilder, otawa::dcache::CatConstraintBuilder, otawa::StackAnalysis, otawa::ipet::FlowFactConstraintBuilder, otawa::CFGSaver, otawa::CFGChecker, otawa::dcache::CATBuilder, otawa::ipet::TrivialBBTime, otawa::EdgeCAT2ConstraintBuilder, otawa::CFGCollector, otawa::CAT2OnlyConstraintBuilder, otawa::ilp::Output, otawa::CFGNormalizer, otawa::ipet::CachePenaltiesObjectFunctionBuilder, and otawa::TextDecoder.

References init().

Referenced by otawa::TextDecoder::configure(), otawa::ilp::Output::configure(), otawa::CAT2OnlyConstraintBuilder::configure(), otawa::CFGCollector::configure(), otawa::EdgeCAT2ConstraintBuilder::configure(), otawa::dcache::CATBuilder::configure(), otawa::ets::TrivialAstBlockTime::configure(), otawa::CFGBuilder::configure(), otawa::dcache::CatConstraintBuilder::configure(), otawa::StackAnalysis::configure(), otawa::ACSMayBuilder::configure(), otawa::SubCFGBuilder::configure(), otawa::CFGProcessor::configure(), otawa::LinkedBlocksDetector::configure(), otawa::ACSBuilder::configure(), otawa::cat::CATConstraintBuilder::configure(), otawa::clp::Analysis::configure(), otawa::DynProcessor::configure(), otawa::ipet::ILPSystemGetter::configure(), otawa::Virtualizer::configure(), otawa::ccg::ConstraintBuilder::configure(), otawa::display::ILPSystemDisplayer::configure(), otawa::EdgeACSBuilder::configure(), otawa::script::Script::configure(), otawa::FlowFactLoader::configure(), otawa::dcache::ACSMayBuilder::configure(), otawa::dcache::ACSBuilder::configure(), and process().

void otawa::Processor::invalidate ( const AbstractFeature feature)
protected

Usually called from a processor constructor, this method records a feature invalidated by the work of the current processor.

Parameters
featureInvalidated feature.

References _reg, otawa::AbstractRegistration::features, otawa::Monitor::flags, otawa::FeatureUsage::invalidate, IS_ALLOCATED, isAllocated(), and isPrepared().

Referenced by otawa::LoopReductor::LoopReductor().

bool otawa::Processor::isAllocated ( void  ) const
inlineprotected

References flags.

Referenced by invalidate(), provide(), require(), and use().

bool otawa::Processor::isCollectingStats ( void  ) const
inlineprotected

References flags.

Referenced by process(), and recordStat().

bool otawa::Processor::isPrepared ( void  ) const
inlineprotected

References flags.

Referenced by invalidate(), process(), provide(), require(), and use().

bool otawa::Processor::isTimed ( void  ) const
inlineprotected

Test if the timed mode is activated (recording of timings in the statistics).

Returns
True if timed mode is activated, false else.
Note
If statistics are not activated, this method returns ever false.

References flags.

Referenced by process().

bool otawa::Monitor::logFor ( log_level_t  tested) const
inlineinherited

Test if the given log level is activated or not.

Parameters
testedTested log level.
Returns
True if the log level is activated, false else.

Referenced by otawa::CFGBuilder::addCFG(), otawa::ipet::ConstraintLoader::addConstraint(), otawa::PFGBuilder::addFunction(), otawa::etime::EdgeTimeBuilder::applyWeightedSplit(), otawa::DelayedBuilder::buildBB(), otawa::CFGBuilder::buildCFG(), otawa::DelayedBuilder::buildEdges(), otawa::branch::BranchBuilder::categorize(), otawa::ipet::FlowFactLoader::cleanup(), otawa::dcache::CATBuilder::cleanup(), otawa::DelayedBuilder::cloneEdge(), otawa::ACSBuilder::configure(), otawa::CAT2Builder::configure(), otawa::etime::EdgeTimeBuilder::genForOneCost(), otawa::etime::StandardEventBuilder::handleVariableBranchPred(), init(), otawa::FlowFactLoader::load(), otawa::script::Script::makeConfig(), otawa::CFGBuilder::nextBB(), otawa::FlowFactLoader::onLoop(), otawa::FlowFactLoader::onMemoryAccess(), otawa::FlowFactLoader::onNoInline(), otawa::FlowFactLoader::onReturn(), otawa::FlowFactLoader::onSetInlining(), process(), otawa::branch::OnlyConsBuilder::processBB(), otawa::branch::CondNumber::processBB(), otawa::ipet::FlowFactConstraintBuilder::processBB(), otawa::dcache::CLPBlockBuilder::processBB(), otawa::etime::StandardEventBuilder::processBB(), otawa::dcache::BlockBuilder::processBB(), otawa::CFGCheckSummer::processCFG(), otawa::EdgeProcessor::processCFG(), otawa::CAT2Builder::processCFG(), otawa::display::CFGOutput::processCFG(), otawa::ipet::ConstraintLoader::processCFG(), otawa::ContextualProcessor::processCFG(), otawa::BBProcessor::processCFG(), otawa::etime::EdgeTimeBuilder::processEdge(), otawa::VarTextDecoder::processEntry(), otawa::dcache::CATBuilder::processLBlockSet(), otawa::ACSMayBuilder::processLBlockSet(), otawa::CAT2Builder::processLBlockSet(), otawa::dcache::ACSBuilder::processLBlockSet(), otawa::etime::EdgeTimeBuilder::processSequence(), otawa::TextDecoder::processWorkSpace(), otawa::VarTextDecoder::processWorkSpace(), otawa::LBlockProcessor::processWorkSpace(), otawa::ipet::WCETComputation::processWorkSpace(), otawa::FixedTextDecoder::processWorkSpace(), otawa::dcache::CatConstraintBuilder::processWorkSpace(), otawa::PFGBuilder::processWorkSpace(), otawa::StackAnalysis::processWorkSpace(), otawa::ipet::ILPSystemGetter::processWorkSpace(), otawa::branch::BranchBuilder::processWorkSpace(), otawa::CFGCollector::processWorkSpace(), otawa::CFGProcessor::processWorkSpace(), otawa::Virtualizer::processWorkSpace(), otawa::clp::Analysis::processWorkSpace(), otawa::script::Script::processWorkSpace(), otawa::ilp::Output::setup(), otawa::BBRatioDisplayer::setup(), otawa::dcache::BlockBuilder::setup(), otawa::CFGBuilder::thisBB(), otawa::ipet::FlowFactLoader::transfer(), otawa::Virtualizer::virtualize(), and otawa::script::Script::work().

log_level_t otawa::Monitor::logLevel ( void  ) const
inlineinherited
void otawa::Processor::prepare ( WorkSpace ws)
protectedvirtual

This method called to let the processor customize its requirements according to some generic feature.

When overload, the original method MUST be called at the end of the custom overriding implementation.

Parameters
wsCurrent workspace.

References otawa::Monitor::flags, and IS_PREPARED.

Referenced by process().

void otawa::Processor::processFrameWork ( WorkSpace fw)
protectedvirtual

Process the given workspace.

Parameters
fwWorkspace to process.
Deprecated:
Use processWorkSpace() instead.

Referenced by processWorkSpace().

void otawa::Processor::processWorkSpace ( WorkSpace fw)
protectedvirtual

Process the given framework.

Parameters
fwFramework to process.
Deprecated:
Use processWorkSpace() instead.

Reimplemented in otawa::NoProcessor, otawa::GraphBBTime< G >, otawa::GraphBBTime< ParExeGraph >, otawa::dcache::ACSBuilder, otawa::dcache::ACSMayBuilder, otawa::FlowFactLoader, otawa::ContextTreeBuilder, otawa::script::Script, otawa::clp::Analysis, otawa::display::ILPSystemDisplayer, otawa::ccg::Builder, otawa::ast::ASTLoader, otawa::EdgeACSBuilder, otawa::Virtualizer, otawa::ExeGraphBBTime< G >, otawa::ExeGraphBBTime< LiExeGraph >, otawa::ExeGraphBBTime< ParamExeGraph >, otawa::ccg::ConstraintBuilder, otawa::CFGProcessor, otawa::CAT2ConstraintBuilder, otawa::cat::CATBuilder, otawa::ipet::BasicConstraintsBuilder, otawa::StackAnalysis, otawa::branch::BranchBuilder, otawa::CFGCollector, otawa::DelayedBuilder, otawa::SubCFGBuilder, otawa::ipet::ILPSystemGetter, otawa::cat::CATConstraintBuilder, otawa::CFGSaver, otawa::StackAnalysis, otawa::ACSBuilder, otawa::LoopReductor, otawa::LoopUnroller, otawa::ets::ACSComputation, otawa::LinkedBlocksDetector, otawa::ACSMayBuilder, otawa::PFGBuilder, otawa::CFGBuilder, otawa::dcache::CatConstraintBuilder, otawa::ast::FunProcessor, otawa::cfgio::Output, otawa::CAT2OnlyConstraintBuilder, otawa::dcache::CATBuilder, otawa::ilp::Output, otawa::ipet::WCETComputation, otawa::FixedTextDecoder, otawa::DeadCodeAnalysis, otawa::hard::Dumper, otawa::EdgeCAT2ConstraintBuilder, otawa::PCGBuilder, otawa::LBlockProcessor, otawa::TextDecoder, otawa::VarTextDecoder, and otawa::FunProcessor.

References _, processFrameWork(), and warn().

Referenced by process().

Progress & otawa::Processor::progress ( void  )
inlineprotected

Get the current progress handler.

Returns
Progress handler.
bool otawa::Processor::recordsStats ( void  ) const
inlineprotected

Test if the statictics mode is activated.

Returns
True if the statistics mode is activated, false else.

Referenced by init(), process(), and otawa::CFGProcessor::processWorkSpace().

void otawa::Processor::recordStat ( const AbstractFeature feature,
StatCollector collector 
)
protected

Add a statistics collector to the current workspace collection.

The statistics object is tracked and linked to the feature. In case of the feature invalidation, the statistics information instance is purged of the statistics collector.

Parameters
featureFeature to link the collector to.
collectorStatistics collector to add.

References otawa::StatInfo::add(), addCleaner(), isCollectingStats(), and workspace().

Referenced by otawa::CAT2OnlyConstraintBuilder::collectStats(), otawa::ipet::WCETComputation::collectStats(), and otawa::dcache::CatConstraintBuilder::collectStats().

void otawa::Processor::requireDyn ( WorkSpace ws,
const PropList props 
)
protectedvirtual

Method called after registration requirements to support dynamic requirements.

As a default, do nothing.

Parameters
wsCurrent workspace.
propsCurrent properties.
void otawa::Monitor::setWorkspace ( WorkSpace workspace)
inlineprotectedinherited

Set the current workspace.

Parameters
workspaceNew current workspace.
template<class T >
T* otawa::Processor::track ( const AbstractFeature feature,
T *  object 
)
inlineprotected
template<class T >
void otawa::Processor::track ( const AbstractFeature feature,
const Ref< T *, Identifier< T * > > &  ref 
)
inlineprotected

Track the release of an allocated object assigned to an identifier relatively to the given feature.

When the feature is deleted, the object is fried and the identifier is removed. It is used as below:

track(MY_FEATURE, MY_ID(props) = value);
Parameters
featureLinked feature.
refReference to the identifier to remove.
template<class T >
void otawa::Processor::track ( const AbstractFeature feature,
const Ref< T *, const Identifier< T * > > &  ref 
)
inlineprotected

Track the release of an allocated object assigned to an identifier relatively to the given feature.

When the feature is deleted, the object is fried and the identifier is removed. It is used as below:

track(MY_FEATURE, MY_ID(props) = value);
Parameters
featureLinked feature.
refReference to the identifier to remove.
void otawa::Processor::use ( const AbstractFeature feature)
protected

Usually called from a processor constructor, this method records a feature as used by the work of the current processor.

Parameters
featureUsed feature.

References _reg, otawa::AbstractRegistration::features, otawa::Monitor::flags, IS_ALLOCATED, isAllocated(), isPrepared(), and otawa::FeatureUsage::use.

elm::Version otawa::Processor::version ( void  ) const
inline
WorkSpace * otawa::Monitor::workspace ( void  )
inlineinherited

Get the current workspace.

Returns
Current workspace.

Friends And Related Function Documentation

friend class FeatureRequirer
friend

Member Data Documentation

Progress* otawa::Processor::_progress
private

Referenced by init().

AbstractRegistration* otawa::Processor::_reg
private
clean_list_t otawa::Processor::cleaners
private

Referenced by process().

Identifier< bool > otawa::Processor::COLLECT_STATS
static

This property allows to activate collection of statistics for the work of the current processor.

See also
StatInfo class.

Referenced by init().

const t::uint32 otawa::Monitor::CUSTOM_SHIFT = 16
staticprotectedinherited
t::uint32 otawa::Monitor::flags
protectedinherited

Contains various bit flags.

Bits from 0 to CUSTOM_SHIFT - 1 are private while bits from CUSTOM_SHIFT to 31 may be customized. To build a bit mask for custom bit i, the CUSTOM_SHIFT may be used as below:

static const t::uint32 MY_MASK = 1 << (i + CUSTOM_SHIFT);

Referenced by init(), invalidate(), prepare(), Processor(), provide(), require(), use(), and ~Processor().

const t::uint32 otawa::Processor::IS_ALLOCATED = 0x04 << CUSTOM_SHIFT
staticprotected
const t::uint32 otawa::Processor::IS_COLLECTING = 0x10 << CUSTOM_SHIFT
staticprotected

Referenced by init().

const t::uint32 otawa::Processor::IS_PREPARED = 0x08 << CUSTOM_SHIFT
staticprotected

Referenced by prepare().

const t::uint32 otawa::Processor::IS_TIMED = 0x01 << CUSTOM_SHIFT
staticprotected

Referenced by init().

const t::uint32 otawa::Monitor::IS_VERBOSE = 0x01
staticprotectedinherited
elm::io::Output otawa::Monitor::log
inherited

Provide a stream to perform log output.

Should be used only when verbosity is activated.

Referenced by otawa::CFGBuilder::addCFG(), otawa::ipet::ConstraintLoader::addConstraint(), otawa::PFGBuilder::addFunction(), otawa::ccg::LBlockBuilder::addLBlock(), otawa::LBlockBuilder::addLBlock(), otawa::etime::EdgeTimeBuilder::applyFloppySplit(), otawa::etime::EdgeTimeBuilder::applyStrictSplit(), otawa::etime::EdgeTimeBuilder::applyWeightedSplit(), otawa::DelayedBuilder::buildBB(), otawa::CFGBuilder::buildCFG(), otawa::branch::BranchBuilder::categorize(), otawa::ipet::FlowFactLoader::cleanup(), otawa::ipet::TrivialDataCacheManager::configure(), otawa::ACSBuilder::configure(), otawa::etime::EdgeTimeBuilder::displayConfs(), otawa::ipet::ConstraintLoader::error(), otawa::etime::EdgeTimeBuilder::genForOneCost(), otawa::ipet::ConstraintLoader::getBB(), otawa::VarTextDecoder::getInst(), otawa::ipet::ConstraintLoader::getVar(), otawa::etime::StandardEventBuilder::handleVariableBranchPred(), init(), ipet_error(), otawa::FlowFactLoader::load(), otawa::script::Script::makeConfig(), otawa::etime::EdgeTimeBuilder::makeSplit(), otawa::ipet::ConstraintLoader::newEdgeVar(), otawa::CFGBuilder::nextBB(), otawa::script::Script::onError(), otawa::FlowFactLoader::onLoop(), otawa::FlowFactLoader::onMemoryAccess(), otawa::FlowFactLoader::onNoInline(), otawa::FlowFactLoader::onReturn(), otawa::FlowFactLoader::onSetInlining(), otawa::script::Script::onWarning(), process(), otawa::branch::OnlyConsBuilder::processBB(), otawa::branch::CondNumber::processBB(), otawa::ipet::FlowFactConstraintBuilder::processBB(), otawa::dcache::CLPBlockBuilder::processBB(), otawa::etime::StandardEventBuilder::processBB(), otawa::dcache::BlockBuilder::processBB(), otawa::CFGCheckSummer::processCFG(), otawa::CAT2Builder::processCFG(), otawa::ipet::ConstraintLoader::processCFG(), otawa::ContextualProcessor::processCFG(), otawa::BBProcessor::processCFG(), otawa::etime::EdgeTimeBuilder::processEdge(), otawa::VarTextDecoder::processEntry(), otawa::dcache::CATBuilder::processLBlockSet(), otawa::ACSMayBuilder::processLBlockSet(), otawa::CAT2Builder::processLBlockSet(), otawa::dcache::ACSBuilder::processLBlockSet(), otawa::etime::EdgeTimeBuilder::processSequence(), otawa::TextDecoder::processWorkSpace(), otawa::VarTextDecoder::processWorkSpace(), otawa::LBlockProcessor::processWorkSpace(), otawa::FixedTextDecoder::processWorkSpace(), otawa::ipet::WCETComputation::processWorkSpace(), otawa::dcache::CatConstraintBuilder::processWorkSpace(), otawa::StackAnalysis::processWorkSpace(), otawa::ipet::ILPSystemGetter::processWorkSpace(), otawa::CFGCollector::processWorkSpace(), otawa::branch::BranchBuilder::processWorkSpace(), otawa::CFGProcessor::processWorkSpace(), otawa::Virtualizer::processWorkSpace(), otawa::clp::Analysis::processWorkSpace(), otawa::ilp::Output::setup(), otawa::BBRatioDisplayer::setup(), otawa::dcache::BlockBuilder::setup(), otawa::CFGBuilder::thisBB(), otawa::ipet::FlowFactLoader::transfer(), otawa::Virtualizer::virtualize(), warn(), and otawa::script::Script::work().

Identifier< elm::io::OutStream * > & otawa::Processor::LOG = otawa::LOG
static

This property identifier is used for setting the log stream used by the processor to write messages (information, warning, error).

Deprecated:

Referenced by init(), otawa::Manager::loadBin(), and otawa::LiExeGraphBBTime::processBB().

Identifier< Processor::log_level_t > & otawa::Processor::LOG_LEVEL = otawa::LOG_LEVEL
static

Property passed in the configuration property list of a processor to select the log level between LOG_PROC, LOG_CFG or LOG_BB.

Deprecated:

Referenced by otawa::Application::run().

Monitor & otawa::Monitor::null = __null_mon
staticinherited

Monitor that output nothing.

Identifier< elm::io::OutStream * > & otawa::Processor::OUTPUT = otawa::OUTPUT
static

This property identifier is used for setting the output stream used by the processor to write results.

Deprecated:

Referenced by init().

Identifier< Progress * > otawa::Processor::PROGRESS
static

Install.

Referenced by init().

Identifier<bool> otawa::Processor::RECURSIVE
static
MetaRegistration otawa::Processor::reg
static

Referenced by Processor().

Identifier< elm::system::time_t > otawa::Processor::RUNTIME
static

This property identifier is used to store in the statistics of a processor the overall run time of the processor work.

Referenced by process().

Identifier< PropList * > otawa::Processor::STATS
static

This property identifiers is used to pass a property list to the processor that will be used to store statistics about the performed work.

Implicitly, passing such a property activates the statistics recording facilities.

Referenced by init().

PropList* otawa::Processor::stats
protected
Identifier< bool > otawa::Processor::TIMED
static

If the value of the associated property is true (default to false), time statistics will also be collected with other processor statistics.

Passing such a property without PROC_STATS has no effects.

Referenced by init().

Identifier< bool > & otawa::Processor::VERBOSE = otawa::VERBOSE
static

This property activates the verbose mode of the processor: information about the processor work will be displayed.

Deprecated:

Referenced by otawa::Application::run(), and otawa::Manager::setVerbosity().

WorkSpace* otawa::Processor::ws
private

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