Otawa  0.10
BBRatioDisplayer.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * BBRatioDisplayer processor interface
4  *
5  * This file is part of OTAWA
6  * Copyright (c) 2008, IRIT UPS.
7  *
8  * OTAWA is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * OTAWA is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with OTAWA; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 #ifndef OTAWA_BBRATIODISPLAYER_H_
23 #define OTAWA_BBRATIODISPLAYER_H_
24 
25 #include <elm/system/Path.h>
26 #include <otawa/proc/BBProcessor.h>
27 
28 namespace elm { namespace io { class OutStream; } }
29 
30 namespace otawa {
31 
32 namespace ilp { class System; }
33 
34 // BBRatioDisplayer class
36 public:
37  static p::declare reg;
41 
42 protected:
43  virtual void configure(const PropList& props);
44  virtual void setup(WorkSpace *ws);
45  virtual void cleanup(WorkSpace *ws);
46  virtual void processCFG(WorkSpace *fw, CFG *cfg);
47  virtual void processBB(WorkSpace *fw, CFG *cfg, BasicBlock *bb);
48 private:
50  int wcet;
53  elm::system::Path path;
54  bool to_file;
56  bool line;
57 };
58 
59 } // otawa
60 
61 #endif /* OTAWA_BBRATIODISPLAYER_H_ */
62 
virtual void cleanup(WorkSpace *ws)
This method is called after the end of the processor analysis to let it do some clean up...
Definition: BBRatioDisplayer.cpp:178
This processor is dedicated to the basic block process thru proccessBB() method.
Definition: BBProcessor.h:72
static p::declare reg
Definition: BBRatioDisplayer.h:37
CFG * cfg(void) const
Get the current CFG.
Definition: CFGProcessor.h:56
bool to_file
Definition: BBRatioDisplayer.h:54
elm::system::Path path
Definition: BBRatioDisplayer.h:53
ilp::System * system
Definition: BBRatioDisplayer.h:51
Abstract class to represent the registered processors.
Definition: Registration.h:80
Class to declare simple a processor.
Definition: Registration.h:213
virtual void configure(const PropList &props)
Configure the current processor.
Definition: BBRatioDisplayer.cpp:76
int wcet
Definition: BBRatioDisplayer.h:50
WorkSpace * ws
Definition: Processor.h:185
dtd::Element bb(dtd::make("bb", _BB).attr(id).attr(address).attr(size))
Control Flow Graph representation.
Definition: CFG.h:42
elm::io::OutStream * stream
Definition: BBRatioDisplayer.h:55
virtual void setup(WorkSpace *ws)
This method is called before an anlysis to let the processor do some initialization.
Definition: BBRatioDisplayer.cpp:85
This class output statistics for each basic block in the WCET as a table in a textual form on the sta...
Definition: BBRatioDisplayer.h:35
bool line
Definition: BBRatioDisplayer.h:56
elm::io::Output out
Definition: BBRatioDisplayer.h:52
static Identifier< bool > TO_FILE
Configure the BBRatiodisplayer to perform its output to a file.
Definition: BBRatioDisplayer.h:39
virtual void processCFG(WorkSpace *fw, CFG *cfg)
See CFGProcessor::processCFG()
Definition: BBRatioDisplayer.cpp:120
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
static otawa::Identifier< int > SUM
Definition: BBRatioDisplayer.h:49
BBRatioDisplayer(AbstractRegistration &r=reg)
Build the processor.
Definition: BBRatioDisplayer.cpp:69
This is the minimal definition of a basic block.
Definition: BasicBlock.h:43
This a list of properties.
Definition: PropList.h:63
An ILP system is a colletion of ILP constraint that may maximize or minimize some object function...
Definition: System.h:42
static Identifier< elm::system::Path > PATH
Configure the BBRatioDisplayer to perform its output to the named file.
Definition: BBRatioDisplayer.h:40
virtual void processBB(WorkSpace *fw, CFG *cfg, BasicBlock *bb)
Perform the work of the given basic block.
Definition: BBRatioDisplayer.cpp:132