org.jikesrvm.tuningfork
Class TraceEngine

java.lang.Object
  extended by org.jikesrvm.tuningfork.TraceEngine

public final class TraceEngine
extends Object

TuningFork Trace Engine (roughly functionally equivalent to the Logger classes in the TuningFork JavaTraceGenerationLibrary).


Nested Class Summary
static class TraceEngine.State
           
 
Field Summary
private  EventTypeChunk activeEventTypeChunk
           
private  FeedletChunk activeFeedletChunk
           
private  HashSetRVM<Feedlet> activeFeedlets
           
private  PropertyTableChunk activePropertyTableChunk
           
private  EventChunkQueue availableEventChunks
           
static TraceEngine engine
           
private static int INITIAL_EVENT_CHUNKS
           
private static int IO_INTERVAL_MS
           
private  int nextFeedletId
           
private  OutputStream outputStream
           
private  TraceEngine.State state
           
private  EventChunkQueue unwrittenEventChunks
           
private  ChunkQueue unwrittenMetaChunks
           
 
Constructor Summary
private TraceEngine()
           
 
Method Summary
 void addProperty(String key, String value)
          Add a Property (key, value) pair to the Feed.
private  void createDaemonThreads()
           
 EventType defineEvent(String name, String description)
          Define an EventType
 EventType defineEvent(String name, String description, EventAttribute attribute)
          Define an EventType
 EventType defineEvent(String name, String description, EventAttribute[] attributes)
          Define an EventType
 void earlyStageBooting()
           
 void fullyBootedVM()
           
(package private)  EventChunk getEventChunk()
           
private  void internalDefineEvent(EventType et)
           
private  void ioThreadMainLoop()
           
 Feedlet makeFeedlet(String name, String description)
           
 void removeFeedlet(Feedlet feedlet)
           
 void returnFullEventChunk(EventChunk events)
           
private  void shutdownAllFeedlets()
           
private  void shutdownFeedlet(Feedlet feedlet)
           
private  void writeEventChunks()
           
private  void writeInitialProperites()
          Put some basic properties about this VM build & current execution into the feed.
private  void writeMetaChunks()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

engine

public static final TraceEngine engine

IO_INTERVAL_MS

private static final int IO_INTERVAL_MS
See Also:
Constant Field Values

INITIAL_EVENT_CHUNKS

private static final int INITIAL_EVENT_CHUNKS
See Also:
Constant Field Values

unwrittenMetaChunks

private final ChunkQueue unwrittenMetaChunks

unwrittenEventChunks

private final EventChunkQueue unwrittenEventChunks

availableEventChunks

private final EventChunkQueue availableEventChunks

activeFeedletChunk

private FeedletChunk activeFeedletChunk

activeEventTypeChunk

private EventTypeChunk activeEventTypeChunk

activePropertyTableChunk

private PropertyTableChunk activePropertyTableChunk

nextFeedletId

private int nextFeedletId

activeFeedlets

private final HashSetRVM<Feedlet> activeFeedlets

outputStream

private OutputStream outputStream

state

private TraceEngine.State state
Constructor Detail

TraceEngine

private TraceEngine()
Method Detail

earlyStageBooting

public void earlyStageBooting()

fullyBootedVM

public void fullyBootedVM()

writeInitialProperites

private void writeInitialProperites()
Put some basic properties about this VM build & current execution into the feed.


defineEvent

public EventType defineEvent(String name,
                             String description)
Define an EventType

Parameters:
name - The name to give the event
description - A human readable description of the event for display in the TuningFork UI.

defineEvent

public EventType defineEvent(String name,
                             String description,
                             EventAttribute attribute)
Define an EventType

Parameters:
name - The name to give the event
description - A human readable description of the event for display in the TuningFork UI.
attribute - Description of the event's single data value

defineEvent

public EventType defineEvent(String name,
                             String description,
                             EventAttribute[] attributes)
Define an EventType

Parameters:
name - The name to give the event
description - A human readable description of the event for display in the TuningFork UI.
attributes - Descriptions of the event's data values

internalDefineEvent

private void internalDefineEvent(EventType et)

addProperty

public void addProperty(String key,
                        String value)
Add a Property (key, value) pair to the Feed.

Parameters:
key - the key for the property
value - the value for the property

makeFeedlet

public Feedlet makeFeedlet(String name,
                           String description)

removeFeedlet

public void removeFeedlet(Feedlet feedlet)

shutdownAllFeedlets

private void shutdownAllFeedlets()

shutdownFeedlet

private void shutdownFeedlet(Feedlet feedlet)

createDaemonThreads

private void createDaemonThreads()

ioThreadMainLoop

private void ioThreadMainLoop()

writeMetaChunks

private void writeMetaChunks()

writeEventChunks

private void writeEventChunks()

getEventChunk

EventChunk getEventChunk()

returnFullEventChunk

public void returnFullEventChunk(EventChunk events)