|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.dms.kjc.rstream.TimerCode
public final class TimerCode
Process timers (dumping user and system ticks) in SIR.
This code is to allow process timers to be used in SIR code
before it is time to generate strings from the SIR code.
However, there are some hacks that should generate C or C++
code when put through our code generators, but which are not
amenable to symbolic execution of the SIR code.
For compatibility with the rstream backend this class uses
local variables (as opposed to fields) for the timers.
The constructor takes the name of the timer to be used.
timerCIncludes is C / C++ specific list of .h files that need to be included
timerDeclarations()
returns declarations necessary to use timer.
timerStart()
returns SIR statements to start timing with the timer.
timerEnd()
returns SIR statments to end timing with the timer.
timerPrint()
returns SIR statments to print the elapsed system
and user ticks.
Field Summary | |
---|---|
static String[] |
timerCIncludes
An array of strings for '#include's The caller is reponsible for prefixing with '#include " and for ignoring any strings that would be generated anyway |
Constructor Summary | |
---|---|
TimerCode(String timerName)
Constructor for timer code. |
Method Summary | |
---|---|
JVariableDeclarationStatement[] |
timerDeclarations()
Declartions needed for using timer code. |
JStatement[] |
timerEnd()
SIR code to get the end value of a proc timer. |
JStatement[] |
timerPrint()
SIR code to print value of a proc timer. |
JStatement[] |
timerStart()
SIR code to get the start value of a proc timer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] timerCIncludes
Constructor Detail |
---|
public TimerCode(String timerName)
timerName
- is the name of the timer (will have some suffices appended
to become names of some fields)Method Detail |
---|
public JVariableDeclarationStatement[] timerDeclarations()
public JStatement[] timerStart()
public JStatement[] timerEnd()
public JStatement[] timerPrint()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |