TPTP 4.6.0 Tracing and Profiling Tools Project
Internal API Specification

org.eclipse.tptp.trace.arm.internal.agent.trace
Class XmlTraceEvents

java.lang.Object
  extended by org.eclipse.tptp.trace.arm.internal.agent.trace.XmlTraceEvents
All Implemented Interfaces:
IXmlTraceEvents

public class XmlTraceEvents
extends java.lang.Object
implements IXmlTraceEvents

This class implements the XmlTraceEvents interface and produces the actual XML required by Hyades.

See Also:
IXmlTraceEvents

Field Summary
static java.lang.String AGENT_CREATE_ELEMENT
           
static java.lang.String AGENT_OPTION_ELEMENT
           
static java.lang.String CLASS_DEFINITION_ELEMENT
           
static java.lang.String METHOD_DEFINITION_ELEMENT
           
static java.lang.String METHOD_ENTRY_ELEMENT
           
static java.lang.String METHOD_EXIT_ELEMENT
           
static java.lang.String METHOD_INVOCATION_CONEXT_ELEMENT
           
static java.lang.String METHOD_INVOCATIONS_ELEMENT
           
static java.lang.String NODE_ELEMENT
           
static java.lang.String OBJECT_ALLOCATION_ELEMENT
           
static java.lang.String PARAMETER_ELEMENT
           
static java.lang.String PROCESS_CREATE_ELEMENT
           
static java.lang.String THREAD_START_ELEMENT
           
static java.lang.String TRACE_ELEMENT
          XML Trace Event Elements
static java.lang.String TRACE_START_ELEMENT
           
static java.lang.String TRACE_STOP_ELEMENT
           
 
Constructor Summary
XmlTraceEvents()
           
 
Method Summary
 java.lang.String AgentEntry(java.lang.String processUUIDRef, java.lang.String agentUUID, java.lang.String agentName, java.lang.String agentType, java.lang.String agentParameters, java.lang.String version, Timestamp time)
          Method AgentEntry.
 java.lang.String AgentOption(java.lang.String key, java.lang.String value)
          Method AgentOption.
 java.lang.String ClassDefinition(int classId, java.lang.String className, long threadIdRef, Timestamp time)
          Method ClassDefinition.
 java.lang.String ClassDefinition(int classId, java.lang.String className, java.lang.String sourceName, int objectIdRef, long threadIdRef, Timestamp time)
          Method ClassDefinition.
 java.lang.String ClassDefinition(int classId, java.lang.String className, java.lang.String sourceName, long threadIdRef, Timestamp time)
          Method ClassDefinition.
static java.lang.String CloseTraceFile()
           
static java.lang.String CreateXmlDescriptor(java.lang.String version)
           
 java.lang.String InvocationContext(java.lang.String nodeUUIDRef, java.lang.String processUUIDRef, java.lang.String agentUUIDRef, long threadIdRef, long ticket, long sequenceCounter)
          Method InvocationContext.
 java.lang.String MethodDefinition(int methodId, java.lang.String methodName, java.lang.String methodSignature, int classIdRef, long threadIdRef)
          Method MethodDefinition.
 java.lang.String MethodEntry(int methodIdRef, long ticket, long sequenceCounter, int stackDepth, int classIdRef, long threadIdRef, Timestamp time)
          Method MethodEntry.
 java.lang.String MethodEntryEnd()
           
 java.lang.String MethodExit(int methodIdRef, long ticket, long sequenceCounter, int stackDepth, int classIdRef, long threadIdRef, Timestamp time)
          Method MethodExit.
 java.lang.String MethodInvocations(int methodIdRef, Timestamp averageResponse, Timestamp minimumResponse, Timestamp maximumResponse, int count)
          Method MethodInvocations.
 java.lang.String NodeEntry(java.lang.String nodeUUID, java.lang.String hostName, java.lang.String ipAddress, int timeZone, Timestamp time)
          Method NodeEntry.
 java.lang.String ObjectAllocation(int objectId, int isArray, int size, int classIdRef, long threadIdRef, Timestamp time)
          Method ObjectAllocation.
static java.lang.String OpenTraceFile()
           
 java.lang.String ParameterRecord(java.lang.String value)
           
 java.lang.String ProcessEntry(java.lang.String nodeUUIDRef, java.lang.String processUUID, java.lang.String processName, long pid, Timestamp time)
          Method ProcessEntry.
 java.lang.String RemoteMethodEntry(int methodIdRef, long ticket, long sequenceCounter, int stackDepth, int classIdRef, long threadIdRef, Timestamp time)
          Method RemoteMethodEntry.
 java.lang.String RemoteMethodEntryEnd()
          Method RemoteMethodEntryEnd.
 java.lang.String ThreadStart(long threadId, java.lang.String threadName, int objectIdRef, java.lang.String groupName, java.lang.String parentName, Timestamp time)
          Method ThreadStart.
 java.lang.String ThreadStart(long threadId, java.lang.String threadName, java.lang.String groupName, java.lang.String parentName, Timestamp time)
          Method ThreadStart.
 java.lang.String TraceStart(java.lang.String agentUUIDRef, java.lang.String traceId, Timestamp time)
          Method TraceStart.
 java.lang.String TraceStop(Timestamp time)
          Method TraceStop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACE_ELEMENT

public static final java.lang.String TRACE_ELEMENT
XML Trace Event Elements

See Also:
Constant Field Values

NODE_ELEMENT

public static final java.lang.String NODE_ELEMENT
See Also:
Constant Field Values

PARAMETER_ELEMENT

public static final java.lang.String PARAMETER_ELEMENT
See Also:
Constant Field Values

PROCESS_CREATE_ELEMENT

public static final java.lang.String PROCESS_CREATE_ELEMENT
See Also:
Constant Field Values

AGENT_CREATE_ELEMENT

public static final java.lang.String AGENT_CREATE_ELEMENT
See Also:
Constant Field Values

AGENT_OPTION_ELEMENT

public static final java.lang.String AGENT_OPTION_ELEMENT
See Also:
Constant Field Values

TRACE_START_ELEMENT

public static final java.lang.String TRACE_START_ELEMENT
See Also:
Constant Field Values

TRACE_STOP_ELEMENT

public static final java.lang.String TRACE_STOP_ELEMENT
See Also:
Constant Field Values

THREAD_START_ELEMENT

public static final java.lang.String THREAD_START_ELEMENT
See Also:
Constant Field Values

CLASS_DEFINITION_ELEMENT

public static final java.lang.String CLASS_DEFINITION_ELEMENT
See Also:
Constant Field Values

OBJECT_ALLOCATION_ELEMENT

public static final java.lang.String OBJECT_ALLOCATION_ELEMENT
See Also:
Constant Field Values

METHOD_DEFINITION_ELEMENT

public static final java.lang.String METHOD_DEFINITION_ELEMENT
See Also:
Constant Field Values

METHOD_ENTRY_ELEMENT

public static final java.lang.String METHOD_ENTRY_ELEMENT
See Also:
Constant Field Values

METHOD_EXIT_ELEMENT

public static final java.lang.String METHOD_EXIT_ELEMENT
See Also:
Constant Field Values

METHOD_INVOCATION_CONEXT_ELEMENT

public static final java.lang.String METHOD_INVOCATION_CONEXT_ELEMENT
See Also:
Constant Field Values

METHOD_INVOCATIONS_ELEMENT

public static final java.lang.String METHOD_INVOCATIONS_ELEMENT
See Also:
Constant Field Values
Constructor Detail

XmlTraceEvents

public XmlTraceEvents()
Method Detail

CreateXmlDescriptor

public static java.lang.String CreateXmlDescriptor(java.lang.String version)

OpenTraceFile

public static java.lang.String OpenTraceFile()

CloseTraceFile

public static java.lang.String CloseTraceFile()

NodeEntry

public java.lang.String NodeEntry(java.lang.String nodeUUID,
                                  java.lang.String hostName,
                                  java.lang.String ipAddress,
                                  int timeZone,
                                  Timestamp time)
Description copied from interface: IXmlTraceEvents
Method NodeEntry.

Specified by:
NodeEntry in interface IXmlTraceEvents
Parameters:
nodeUUID - is an ID that represents the node.
hostName - is the fully qualified host name that the agent resides on.
ipAddress - is the IP address that the agent resides on.
timeZone - is the time zone that the host is located in.
time - is the time since EPOCH.
Returns:

ProcessEntry

public java.lang.String ProcessEntry(java.lang.String nodeUUIDRef,
                                     java.lang.String processUUID,
                                     java.lang.String processName,
                                     long pid,
                                     Timestamp time)
Description copied from interface: IXmlTraceEvents
Method ProcessEntry.

Specified by:
ProcessEntry in interface IXmlTraceEvents
Parameters:
nodeUUIDRef - is the node ID that this process is associated with.
processUUID - is an ID that represents the process on the referenced node.
processName - is the name of the process.
pid - is the process identification number.
time - is the time since EPOCH.
Returns:

AgentEntry

public java.lang.String AgentEntry(java.lang.String processUUIDRef,
                                   java.lang.String agentUUID,
                                   java.lang.String agentName,
                                   java.lang.String agentType,
                                   java.lang.String agentParameters,
                                   java.lang.String version,
                                   Timestamp time)
Description copied from interface: IXmlTraceEvents
Method AgentEntry.

Specified by:
AgentEntry in interface IXmlTraceEvents
Parameters:
processUUIDRef - is the process ID that this agent is associated with.
agentUUID - is an ID that represents the agent in the referenced process.
agentName - is the name of the Agent.
agentType - is the type of the Agent.
agentParameters - encompases a list of special PI Agent parameters.
version - number of the Agent.
time - is the time since EPOCH.
Returns:

AgentOption

public java.lang.String AgentOption(java.lang.String key,
                                    java.lang.String value)
Description copied from interface: IXmlTraceEvents
Method AgentOption.

Specified by:
AgentOption in interface IXmlTraceEvents
Parameters:
key - an identifier for the agent option.
value - is the value for this specific option.
Returns:

TraceStart

public java.lang.String TraceStart(java.lang.String agentUUIDRef,
                                   java.lang.String traceId,
                                   Timestamp time)
Description copied from interface: IXmlTraceEvents
Method TraceStart.

Specified by:
TraceStart in interface IXmlTraceEvents
Parameters:
agentUUIDRef - is the agent ID that this trace is associated with.
traceId - is an ID that identifies this trace from a series of traces.
time - is the time since EPOCH.
Returns:

TraceStop

public java.lang.String TraceStop(Timestamp time)
Description copied from interface: IXmlTraceEvents
Method TraceStop

Specified by:
TraceStop in interface IXmlTraceEvents
Returns:

ThreadStart

public java.lang.String ThreadStart(long threadId,
                                    java.lang.String threadName,
                                    java.lang.String groupName,
                                    java.lang.String parentName,
                                    Timestamp time)
Description copied from interface: IXmlTraceEvents
Method ThreadStart.

Specified by:
ThreadStart in interface IXmlTraceEvents
Parameters:
threadId - is the thread ID of the current thread that classes, objects, and methods involved in a transcation can belong to.
threadName - is the name of the thread.
groupName - is the group name that this thread belongs to.
parentName - is the name of the parent thread.
time - is the time since EPOCH.
Returns:

ThreadStart

public java.lang.String ThreadStart(long threadId,
                                    java.lang.String threadName,
                                    int objectIdRef,
                                    java.lang.String groupName,
                                    java.lang.String parentName,
                                    Timestamp time)
Description copied from interface: IXmlTraceEvents
Method ThreadStart.

Specified by:
ThreadStart in interface IXmlTraceEvents
Parameters:
threadId - is the thread ID of the current thread that classes, objects, and methods involved in a transcation can belong to.
threadName - is the name of the thread.
objectIdRef - is the ID of the object that represents this thread.
groupName - is the group name that this thread belongs to.
parentName - is the name of the parent thread.
time - is the time since EPOCH.
Returns:

ClassDefinition

public java.lang.String ClassDefinition(int classId,
                                        java.lang.String className,
                                        long threadIdRef,
                                        Timestamp time)
Description copied from interface: IXmlTraceEvents
Method ClassDefinition.

Specified by:
ClassDefinition in interface IXmlTraceEvents
Parameters:
classId - is the class ID of the current class.
className - is the name of the current class.
threadIdRef - is the thread ID that this class is referenced from.
time - is the time since EPOCH.
Returns:

ClassDefinition

public java.lang.String ClassDefinition(int classId,
                                        java.lang.String className,
                                        java.lang.String sourceName,
                                        long threadIdRef,
                                        Timestamp time)
Description copied from interface: IXmlTraceEvents
Method ClassDefinition.

Specified by:
ClassDefinition in interface IXmlTraceEvents
Parameters:
classId - is the class ID of the current class.
className - is the name of the current class.
sourceName - is a parameter collected by JVMPI and is the name of the source for this class.
threadIdRef - is the thread ID that this class is referenced from.
time - is the time since EPOCH.
Returns:

ClassDefinition

public java.lang.String ClassDefinition(int classId,
                                        java.lang.String className,
                                        java.lang.String sourceName,
                                        int objectIdRef,
                                        long threadIdRef,
                                        Timestamp time)
Description copied from interface: IXmlTraceEvents
Method ClassDefinition.

Specified by:
ClassDefinition in interface IXmlTraceEvents
Parameters:
classId - is the class ID of the current class.
className - is the name of the current class.
sourceName - is a parameter collected by JVMPI and is the name of the source for this class.
objectIdRef - is the ID of the object that represents this class.
threadIdRef - is the thread ID that this class is referenced from.
time - is the time since EPOCH.
Returns:

ObjectAllocation

public java.lang.String ObjectAllocation(int objectId,
                                         int isArray,
                                         int size,
                                         int classIdRef,
                                         long threadIdRef,
                                         Timestamp time)
Description copied from interface: IXmlTraceEvents
Method ObjectAllocation.

Specified by:
ObjectAllocation in interface IXmlTraceEvents
Parameters:
objectId - is the object ID of the current object.
isArray - is true (1) if the object is an array of objects; otherwise false (0).
size - is the size of the object.
classIdRef - is the class ID that this object references.
threadIdRef - is the thread ID that this class is referenced from.
time - is the time since EPOCH.
Returns:

MethodDefinition

public java.lang.String MethodDefinition(int methodId,
                                         java.lang.String methodName,
                                         java.lang.String methodSignature,
                                         int classIdRef,
                                         long threadIdRef)
Description copied from interface: IXmlTraceEvents
Method MethodDefinition.

Specified by:
MethodDefinition in interface IXmlTraceEvents
Parameters:
methodId - is an ID that will represent this method and any entry and exits of this method.
methodName - is the name of the method.
methodSignature - is the method signature.
classIdRef - is the class ID that this method references.
threadIdRef - is the thread ID that this method is referenced from.
Returns:

MethodEntry

public java.lang.String MethodEntry(int methodIdRef,
                                    long ticket,
                                    long sequenceCounter,
                                    int stackDepth,
                                    int classIdRef,
                                    long threadIdRef,
                                    Timestamp time)
Description copied from interface: IXmlTraceEvents
Method MethodEntry.

Specified by:
MethodEntry in interface IXmlTraceEvents
Parameters:
methodIdRef - is the method ID that this method entry is associated with.
ticket - is an integer "token" that is used to correlate method calls between the client and the server.
sequenceCounter - is a sequenecd counter that identifies the number of events (method executions) taken on the current object.
stackDepth - is a number that identifies the level (or depth) of nested calls made at the time this method was invoked.
classIdRef - is the class ID that this method references.
threadIdRef - is the thread ID that this method is referenced from.
time - is the time since EPOCH.
Returns:

MethodExit

public java.lang.String MethodExit(int methodIdRef,
                                   long ticket,
                                   long sequenceCounter,
                                   int stackDepth,
                                   int classIdRef,
                                   long threadIdRef,
                                   Timestamp time)
Description copied from interface: IXmlTraceEvents
Method MethodExit.

Specified by:
MethodExit in interface IXmlTraceEvents
Parameters:
methodIdRef - is the method ID that this method entry is associated with.
ticket - is an integer "token" that is used to correlate method calls between the client and the server.
sequenceCounter - is a sequenecd counter that identifies the number of events (method executions) taken on the current object.
stackDepth - is a number that identifies the level (or depth) of nested calls made at the time this method was invoked.
classIdRef - is the class ID that this method references.
threadIdRef - is the thread ID that this method is referenced from.
time - is the time since EPOCH.
Returns:

RemoteMethodEntry

public java.lang.String RemoteMethodEntry(int methodIdRef,
                                          long ticket,
                                          long sequenceCounter,
                                          int stackDepth,
                                          int classIdRef,
                                          long threadIdRef,
                                          Timestamp time)
Description copied from interface: IXmlTraceEvents
Method RemoteMethodEntry. This method is to be used when a remote method is being invoked to allow the creation of the following XML structure:

Specified by:
RemoteMethodEntry in interface IXmlTraceEvents
Parameters:
methodIdRef - is the method ID that this method entry is associated with.
ticket - is an integer "token" that is used to correlate method calls between the client and the server.
sequenceCounter - is a sequenecd counter that identifies the number of events (method executions) taken on the current object.
stackDepth - is a number that identifies the level (or depth) of nested calls made at the time this method was invoked.
classIdRef - is the class ID that this method references.
threadIdRef - is the thread ID that this method is referenced from.
time - is the time since EPOCH.
Returns:

RemoteMethodEntryEnd

public java.lang.String RemoteMethodEntryEnd()
Description copied from interface: IXmlTraceEvents
Method RemoteMethodEntryEnd. This method is to be used when a remote method is being invoked to allow the creation of the following XML structure:

Specified by:
RemoteMethodEntryEnd in interface IXmlTraceEvents
Returns:

MethodEntryEnd

public java.lang.String MethodEntryEnd()

ParameterRecord

public java.lang.String ParameterRecord(java.lang.String value)

InvocationContext

public java.lang.String InvocationContext(java.lang.String nodeUUIDRef,
                                          java.lang.String processUUIDRef,
                                          java.lang.String agentUUIDRef,
                                          long threadIdRef,
                                          long ticket,
                                          long sequenceCounter)
Description copied from interface: IXmlTraceEvents
Method InvocationContext. This method is to be used when a remote method is being invoked to allow the creation of the following XML structure:

Specified by:
InvocationContext in interface IXmlTraceEvents
Parameters:
nodeUUIDRef - is the node ID that this method invocation is associated with.
processUUIDRef - is the process ID that this method invocation is associated with.
agentUUIDRef - is the agent ID that this method invocation is associated with.
threadIdRef - is the thread ID that this method invocation is associated with.
ticket - is an integer "token" that is used to correlate method calls between the client and the server.
sequenceCounter - is a sequenecd counter that identifies the number of events (method executions) taken on the current object.
Returns:

MethodInvocations

public java.lang.String MethodInvocations(int methodIdRef,
                                          Timestamp averageResponse,
                                          Timestamp minimumResponse,
                                          Timestamp maximumResponse,
                                          int count)
Description copied from interface: IXmlTraceEvents
Method MethodInvocations. This method is to be used when created trace events for aggregate record information. In combination with the ClassDefinition and MethodDefinition methods.

Specified by:
MethodInvocations in interface IXmlTraceEvents
Parameters:
methodIdRef - is the method ID that this method entry is associated with.
averageResponse - is the average time taken to execute during the aggregation time period.
minimumResponse - is the minimum time taken to execute during the aggregation time period.
maximumResponse - is the maximum time taken to execute during the aggregation time period.
count - is the total number of times that this transaction was invoked.
Returns:

TPTP 4.6.0 Tracing and Profiling Tools Project
Internal API Specification