public final class EventLogger extends Object implements HjEventLogger, ActivityListeners.ActivityListener
HjEventLogger.EventType
Modifier | Constructor and Description |
---|---|
protected |
EventLogger() |
Modifier and Type | Method and Description |
---|---|
void |
dumpEventLog(PrintStream printStream)
Dumps the events tracked by the runtime.
|
void |
dumpEventLog(URL url,
File javaFile)
Send the eventLog to an HJ-Viz server running at URL.
|
long |
eventCount()
Return the number of events logged.
|
Map<HjEventLogger.EventType,Long> |
eventFrequencies()
Return the frequency of each type of event logged.
|
<T> void |
onActivityDependenciesReady(HabaneroActivity activity,
List<HjFuture<T>> dependencies)
Callback for the event when all the activities dependencies are ready.
|
void |
onActivityDoWork(HabaneroActivity activity,
long workUnits) |
void |
onActivityEnd(HabaneroActivity activity,
FinishState finishState,
Throwable throwable)
Callback for when the event ends execution.
|
void |
onActivityResume(HabaneroActivity activity)
Callback for when the event execution is resumed.
|
void |
onActivitySpawn(HabaneroActivity parentActivity,
HabaneroActivity childActivity)
Callback for when the event ends execution.
|
void |
onActivityStart(HabaneroActivity activity)
Callback for when the event starts execution.
|
void |
onActivitySuspend(HabaneroActivity activity)
Callback for when the event execution is suspended.
|
void |
onActorMsgProcessed(Actor actor,
HabaneroActivity activity,
String message) |
void |
onActorMsgReceived(Actor actor,
HabaneroActivity activity,
String message,
long parentId) |
void |
onActorMsgSent(Actor actor,
HabaneroActivity activity,
String message) |
void |
onDDFStore(HabaneroActivity activity,
int futureId) |
void |
onFinishScopeStart(HabaneroActivity activity,
FinishState finishState) |
void |
onFutureRestore(HabaneroActivity activity,
int futureId) |
void |
onFutureStore(HabaneroActivity activity,
long futureActivityId) |
void |
onIsolationEnd(HabaneroActivity activity,
int[] lockIds,
int[] lockModes) |
void |
onIsolationStart(HabaneroActivity activity,
int[] lockIds,
int[] lockModes) |
void |
onPhaserActivityDropped(HabaneroActivity activity,
InternalPhaser phaser,
int phase) |
void |
onPhaserFinishDropped(HabaneroActivity activity,
InternalPhaser phaser,
int phase) |
void |
onPhaserReady(HabaneroActivity activity,
List<HjPhaserPair> phaserList)
Callback for the event when phasers are created
|
void |
onPhaserSignal(HabaneroActivity activity,
InternalPhaser phaser) |
void |
onPhaserWait(HabaneroActivity activity,
InternalPhaser phaser) |
void |
onPostFinishScopeEnd(HabaneroActivity activity,
FinishState finishState) |
void |
onPreFinishScopeEnd(HabaneroActivity activity,
FinishState finishState) |
void |
setActivityLabel(String label)
Label an activity with some string.
|
void |
updateActivityFromCompanion(HabaneroActivity activity,
CompanionMetrics companionMetrics) |
void |
updateCompanionFromActivity(HabaneroActivity activity,
CompanionMetrics companionMetrics) |
public void dumpEventLog(PrintStream printStream)
dumpEventLog
in interface HjEventLogger
printStream
- The stream to use while dumping the events.public void dumpEventLog(URL url, File javaFile)
dumpEventLog
in interface HjEventLogger
url
- the URL to the HJ-Viz serverjavaFile
- File representing path to the Java source codepublic long eventCount()
eventCount
in interface HjEventLogger
public Map<HjEventLogger.EventType,Long> eventFrequencies()
eventFrequencies
in interface HjEventLogger
public void setActivityLabel(String label)
setActivityLabel
in interface HjEventLogger
label
- String to label an activitypublic void onActivityStart(HabaneroActivity activity)
ActivityListeners.ActivityListener
onActivityStart
in interface ActivityListeners.ActivityListener
activity
- The activity being started.public void onActivitySuspend(HabaneroActivity activity)
ActivityListeners.ActivityListener
onActivitySuspend
in interface ActivityListeners.ActivityListener
activity
- The activity being suspended.public void onActivityResume(HabaneroActivity activity)
ActivityListeners.ActivityListener
onActivityResume
in interface ActivityListeners.ActivityListener
activity
- The activity being resumed.public void onActivityEnd(HabaneroActivity activity, FinishState finishState, Throwable throwable)
ActivityListeners.ActivityListener
onActivityEnd
in interface ActivityListeners.ActivityListener
activity
- The activity that is ending.finishState
- The root finish state associated with the activitypublic void onActivitySpawn(HabaneroActivity parentActivity, HabaneroActivity childActivity)
ActivityListeners.ActivityListener
onActivitySpawn
in interface ActivityListeners.ActivityListener
parentActivity
- The parent activity.childActivity
- The child activity that was spawned.public <T> void onActivityDependenciesReady(HabaneroActivity activity, List<HjFuture<T>> dependencies)
ActivityListeners.ActivityListener
onActivityDependenciesReady
in interface ActivityListeners.ActivityListener
activity
- The activity that is ready to execute.dependencies
- The dependencies of the activitypublic void onPhaserReady(HabaneroActivity activity, List<HjPhaserPair> phaserList)
ActivityListeners.ActivityListener
onPhaserReady
in interface ActivityListeners.ActivityListener
activity
- The activity that is ready to execute.phaserList
- The a list of phasers of HjPhaserPair typepublic void onFinishScopeStart(HabaneroActivity activity, FinishState finishState)
onFinishScopeStart
in interface ActivityListeners.ActivityListener
activity
- The activity running the finish scopefinishState
- The finish state associated with the activitypublic void onPreFinishScopeEnd(HabaneroActivity activity, FinishState finishState)
onPreFinishScopeEnd
in interface ActivityListeners.ActivityListener
activity
- The activity that ran the finish scopefinishState
- The finish state associated with the activitypublic void onPostFinishScopeEnd(HabaneroActivity activity, FinishState finishState)
onPostFinishScopeEnd
in interface ActivityListeners.ActivityListener
activity
- The activity that ran the finish scopefinishState
- The finish state associated with the activitypublic void updateCompanionFromActivity(HabaneroActivity activity, CompanionMetrics companionMetrics)
updateCompanionFromActivity
in interface ActivityListeners.ActivityListener
public void updateActivityFromCompanion(HabaneroActivity activity, CompanionMetrics companionMetrics)
updateActivityFromCompanion
in interface ActivityListeners.ActivityListener
public void onIsolationStart(HabaneroActivity activity, int[] lockIds, int[] lockModes)
public void onIsolationEnd(HabaneroActivity activity, int[] lockIds, int[] lockModes)
public void onFutureStore(HabaneroActivity activity, long futureActivityId)
public void onPhaserSignal(HabaneroActivity activity, InternalPhaser phaser)
public void onPhaserWait(HabaneroActivity activity, InternalPhaser phaser)
public void onPhaserActivityDropped(HabaneroActivity activity, InternalPhaser phaser, int phase)
public void onPhaserFinishDropped(HabaneroActivity activity, InternalPhaser phaser, int phase)
public void onFutureRestore(HabaneroActivity activity, int futureId)
public void onDDFStore(HabaneroActivity activity, int futureId)
public void onActorMsgSent(Actor actor, HabaneroActivity activity, String message)
public void onActorMsgReceived(Actor actor, HabaneroActivity activity, String message, long parentId)
public void onActorMsgProcessed(Actor actor, HabaneroActivity activity, String message)
public void onActivityDoWork(HabaneroActivity activity, long workUnits)
Copyright © 2015 Rice University - Department of Computer Science. All rights reserved.