|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object DPJRuntime.Instrument
public class Instrument
Instrument
is the support class for DPJ instrumentation.
When a DPJ program is compiled with the -instrument
flag,
the compiler generates calls to the methods of this class at
appropriate points in the code.
Constructor Summary | |
---|---|
Instrument()
|
Method Summary | |
---|---|
static double |
amdahlBound()
Returns the best speedup we could achieve under Amdahl's law, assuming perfect speedup of the parallel parts. |
static double |
averageWidth()
Returns the average width of the parallelism graph, i.e., the average number of tasks active at every point of the program. |
static void |
cobeginSeparator()
Called between statements in a cobegin statement. |
static void |
end()
Called at the end of the computation. |
static void |
enterCobegin()
Called upon entry to a cobegin statement. |
static void |
enterFinish()
Called upon entry to a finish statement. |
static void |
enterForeach(int numIters)
Called upon entry to a foreach statement. |
static void |
enterForeachIter()
Called upon entry to a foreach iteration |
static void |
enterSpawn()
Called upon entry to a spawn statement. |
static void |
exitCobegin()
Called upon exit from a cobegin statement. |
static void |
exitFinish()
Called upon exit from a finish statement. |
static void |
exitForeach()
Called upon exit from a foreach statement. |
static void |
exitForeachIter()
Called upon exit from a foreach iteration |
static void |
exitSpawn()
Called upon exit from a spawn statement. |
static long |
getParallelTime()
Returns the measured parallel time of the computation. |
static long |
getSerialTime()
Returns the measured serial time of the computation. |
static java.util.Map<java.lang.Long,java.lang.Integer> |
getTasksMap()
Returns a map representing the program task graph. |
static double |
idealSpeedup()
Returns the ideal speedup, computed as the serial time divided by the parallel time. |
static void |
printTaskIntervals(java.lang.String filepath)
Prints the start and end point of each task to the given file. |
static void |
printTasksMap(java.lang.String filepath)
Prints a string representation of the task map to the given file. |
static void |
start()
Starts the timing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Instrument() [unknown]
Method Detail |
---|
public static void start() writes Root : *
public static void enterForeach(int numIters) writes Root : *
foreach
statement.
numIters
- The number of iterations in the foreach
public static void enterForeachIter() writes Root : *
foreach
iteration
public static void exitForeachIter() writes Root : *
foreach
iteration
public static void exitForeach() writes Root : *
foreach
statement.
public static void enterCobegin() writes Root : *
cobegin
statement.
public static void cobeginSeparator() writes Root : *
cobegin
statement.
public static void exitCobegin() writes Root : *
cobegin
statement.
public static void enterFinish() writes Root : *
finish
statement.
public static void exitFinish() writes Root : *
finish
statement.
public static void enterSpawn() writes Root : *
spawn
statement.
public static void exitSpawn() writes Root : *
spawn
statement.
public static void end() writes Root : *
public static java.util.Map<java.lang.Long,java.lang.Integer> getTasksMap() writes Root : *
public static void printTasksMap(java.lang.String filepath) writes Root : * throws java.io.IOException
filepath
- Pathname of file to print to
java.io.IOException
public static void printTaskIntervals(java.lang.String filepath) writes Root : * throws java.io.IOException
filepath
- Pathname of file to print to
java.io.IOException
public static double averageWidth() writes Root : *
public static double idealSpeedup() writes Root : *
public static long getSerialTime() writes Root : *
cobegin
or foreach
construct, the serial time
is the sum of the times of the individual tasks.
public static long getParallelTime() writes Root : *
cobegin
or foreach
construct, the parallel
time is the maximum of the times of the indiviudal tasks.
public static double amdahlBound() writes Root : *
cobegin
and foreach
. It is not accurate for programs
that use spawn
and finish
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |