Otawa  0.10
otawa::Monitor Class Reference

This class provide a unified interface to interact with external user. More...

#include <otawa/proc/Monitor.h>

Inheritance diagram for otawa::Monitor:
otawa::Processor 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

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

 Monitor (void)
 
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
 
void configure (const PropList &props)
 

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 Monitornull = __null_mon
 Monitor that output nothing. More...
 

Protected Member Functions

void setWorkspace (WorkSpace *workspace)
 Set the current workspace. More...
 

Protected Attributes

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

Static Protected Attributes

static const t::uint32 IS_VERBOSE = 0x01
 
static const t::uint32 CUSTOM_SHIFT = 16
 

Private Attributes

log_level_t log_level
 
WorkSpacews
 

Detailed Description

This class provide a unified interface to interact with external user.

It includes features for:

  • performing output,
  • log display and support,
  • current workspace.

It aims to provide to code processor and external analysis a way to perform IO in a clean and compatible way.

The configuration of a monitor is obtained from a property list and supports the following properties:

In addition, verbosity can be activatedby declaring 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::Monitor::Monitor ( void  )

Member Function Documentation

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

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(), otawa::Processor::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(), otawa::Processor::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::VarTextDecoder::processWorkSpace(), otawa::TextDecoder::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
inline
void otawa::Monitor::setWorkspace ( WorkSpace workspace)
inlineprotected

Set the current workspace.

Parameters
workspaceNew current workspace.
WorkSpace * otawa::Monitor::workspace ( void  )
inline

Get the current workspace.

Returns
Current workspace.

Member Data Documentation

const t::uint32 otawa::Monitor::CUSTOM_SHIFT = 16
staticprotected
t::uint32 otawa::Monitor::flags
protected

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 otawa::Processor::init(), otawa::Processor::invalidate(), otawa::Processor::prepare(), otawa::Processor::Processor(), otawa::Processor::provide(), otawa::Processor::require(), otawa::Processor::use(), and otawa::Processor::~Processor().

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

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(), otawa::Processor::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(), otawa::Processor::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::ipet::WCETComputation::processWorkSpace(), otawa::FixedTextDecoder::processWorkSpace(), otawa::dcache::CatConstraintBuilder::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::ilp::Output::setup(), otawa::BBRatioDisplayer::setup(), otawa::dcache::BlockBuilder::setup(), otawa::CFGBuilder::thisBB(), otawa::ipet::FlowFactLoader::transfer(), otawa::Virtualizer::virtualize(), otawa::Processor::warn(), and otawa::script::Script::work().

log_level_t otawa::Monitor::log_level
private
Monitor & otawa::Monitor::null = __null_mon
static

Monitor that output nothing.

WorkSpace* otawa::Monitor::ws
private

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