Otawa
0.10
|
This class is an interface to get progress information about execution of a processor. More...
#include <otawa/proc/Progress.h>
Inherited by otawa::NullProgress.
Public Types | |
enum | mode_t { none, living, linear, fixpoint } |
Public Member Functions | |
virtual void | start (const Processor &processor, mode_t mode, int max=0)=0 |
This method is called when the processor is starting. More... | |
virtual void | stop (void)=0 |
Called at the end of the work. More... | |
virtual void | report (string info, int level)=0 |
Called each time to inform about the progression. More... | |
virtual void | restart (string info)=0 |
This method is only called in otawa::Processor::fixpoint mode at each step start. More... | |
Static Public Attributes | |
static Progress & | null = null_progress |
Progress handler that do nothing. More... | |
This class is an interface to get progress information about execution of a processor.
To use it, you have to overload its pure virtual members and to pass it to the processor configuration via otawa::Processor::PROGRESS property.
|
pure virtual |
Called each time to inform about the progression.
info | Info about the report. |
level | Current level. |
|
pure virtual |
This method is only called in otawa::Processor::fixpoint mode at each step start.
info | Current step information. |
This method is called when the processor is starting.
The mode parameter describe the way the processor is working.
A mode otawa::Progess::living can not produce statistics about progress. The report() is called regularly to inform that the processor is living. The max parameter is meaningless.
A mode otawa::Progress::linear says the report() method is called each a progress is performed until the end. max represents the number of stages before end.
A mode otawa::Progress::fixpoint informs the computation produces an undefined number of steps but each step is separated by a call to restart(). max represents the number of level before end.
processor | Current processor. |
mode | Current mode. |
max | Number of levels. |
|
pure virtual |
Called at the end of the work.