public class Tracer
extends java.lang.Object
ej.api#trace and provides
the same API as the Tracer class.
The aim is to be able to add events from the native world (in addition with the events added by the application and its libraries) like the application does with the foundation library API.
| Modifier and Type | Class and Description |
|---|---|
static interface |
Tracer.TracerService
Indirection for the implementation.
|
| Constructor and Description |
|---|
Tracer(java.lang.String name,
int nbEventTypes)
Creates a new tracer with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getGroupID()
Gets the group identifier.
|
static boolean |
isTraceStarted()
Tests whether the trace system is started or not.
|
void |
recordEvent(int eventId)
Records an event for this
Tracer. |
void |
recordEvent(int eventId,
int... values)
Records an event for this
Tracer. |
void |
recordEvent(int eventId,
int value1)
Records an event for this
Tracer. |
void |
recordEvent(int eventId,
int value1,
int value2)
Records an event for this
Tracer. |
void |
recordEvent(int eventId,
int value1,
int value2,
int value3)
Records an event for this
Tracer. |
void |
recordEvent(int eventId,
int value1,
int value2,
int value3,
int value4)
Records an event for this
Tracer. |
void |
recordEvent(int eventId,
int value1,
int value2,
int value3,
int value4,
int value5)
Records an event for this
Tracer. |
void |
recordEvent(int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6)
Records an event for this
Tracer. |
void |
recordEvent(int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7)
Records an event for this
Tracer. |
void |
recordEvent(int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7,
int value8)
Records an event for this
Tracer. |
void |
recordEvent(int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7,
int value8,
int value9)
Records an event for this
Tracer. |
void |
recordEvent(int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7,
int value8,
int value9,
int value10)
Records an event for this
Tracer. |
void |
recordEventEnd(int eventId)
Records the end of the execution of an event for this
Tracer. |
void |
recordEventEnd(int eventId,
int... values)
Records the end of the execution of an event for this
Tracer. |
void |
recordEventEnd(int eventId,
int value1)
Records the end of the execution of an event for this
Tracer. |
static void |
recordEventEndNative(int groupId,
int eventId)
Record the end of the execution of an event.
|
static void |
recordEventEndNative(int groupId,
int eventId,
int value1)
Record the end of the execution of an event with one custom value.
|
static void |
recordEventNative(int groupId,
int eventId)
Records an event.
|
static void |
recordEventNative(int groupId,
int eventId,
int value1)
Records an event with one custom value.
|
static void |
recordEventNative(int groupId,
int eventId,
int value1,
int value2)
Records an event with several custom values.
|
static void |
recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3)
Records an event with several custom values.
|
static void |
recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3,
int value4)
Records an event with several custom values.
|
static void |
recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3,
int value4,
int value5)
Records an event with several custom values.
|
static void |
recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6)
Records an event with several custom values.
|
static void |
recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7)
Records an event with several custom values.
|
static void |
recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7,
int value8)
Records an event with several custom values.
|
static void |
recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7,
int value8,
int value9)
Records an event with several custom values.
|
static void |
recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7,
int value8,
int value9,
int value10)
Records an event with several custom values.
|
static int |
registerGroup(byte[] groupNameBuffer,
int nbEventTypes)
Register a group and returns the native identifier that identifies it.
|
static void |
startTrace()
Starts to record the events.
|
static void |
stopTrace()
Stops to record the events.
|
public Tracer(java.lang.String name,
int nbEventTypes)
throws java.lang.InternalError
Tracer defines
nbEventTypes types of events. The event identifiers available
for this group are from 0 to nbEventTypes-1.name - name that identifies the group. Must not be nullnbEventTypes - maximum number of event types available for the groupjava.lang.InternalErrorpublic static void startTrace()
By default, the trace system is stopped.
public static void stopTrace()
recordEvent(int) methods will not record any events.
By default, the trace system is stopped.
public static boolean isTraceStarted()
true if the trace system is started, false
otherwise.public static int registerGroup(byte[] groupNameBuffer,
int nbEventTypes)
groupNameBuffer - name of the group. A null terminated stringnbEventTypes - maximum number of event ids for the registered grouppublic static void recordEventNative(int groupId,
int eventId)
groupId - identifier of the group of eventseventId - identifier of the eventpublic static void recordEventNative(int groupId,
int eventId,
int value1)
groupId - identifier of the group of eventseventId - identifier of the eventvalue1 - custom value for the eventpublic static void recordEventNative(int groupId,
int eventId,
int value1,
int value2)
groupId - identifier of the group of eventseventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventpublic static void recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3)
groupId - identifier of the group of eventseventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventpublic static void recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3,
int value4)
groupId - identifier of the group of eventseventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventvalue4 - custom value for the eventpublic static void recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3,
int value4,
int value5)
groupId - identifier of the group of eventseventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventvalue4 - custom value for the eventvalue5 - custom value for the eventpublic static void recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6)
groupId - identifier of the group of eventseventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventvalue4 - custom value for the eventvalue5 - custom value for the eventvalue6 - custom value for the eventpublic static void recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7)
groupId - identifier of the group of eventseventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventvalue4 - custom value for the eventvalue5 - custom value for the eventvalue6 - custom value for the eventvalue7 - custom value for the eventpublic static void recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7,
int value8)
groupId - identifier of the group of eventseventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventvalue4 - custom value for the eventvalue5 - custom value for the eventvalue6 - custom value for the eventvalue7 - custom value for the eventvalue8 - custom value for the eventpublic static void recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7,
int value8,
int value9)
groupId - identifier of the group of eventseventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventvalue4 - custom value for the eventvalue5 - custom value for the eventvalue6 - custom value for the eventvalue7 - custom value for the eventvalue8 - custom value for the eventvalue9 - custom value for the eventpublic static void recordEventNative(int groupId,
int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7,
int value8,
int value9,
int value10)
groupId - identifier of the group of eventseventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventvalue4 - custom value for the eventvalue5 - custom value for the eventvalue6 - custom value for the eventvalue7 - custom value for the eventvalue8 - custom value for the eventvalue9 - custom value for the eventvalue10 - custom value for the eventpublic static void recordEventEndNative(int groupId,
int eventId)
groupId - identifier of the group of eventseventId - identifier of the eventpublic static void recordEventEndNative(int groupId,
int eventId,
int value1)
groupId - identifier of the group of eventseventId - identifier of the eventvalue1 - custom value for the eventpublic int getGroupID()
Tracer
instance.public void recordEvent(int eventId)
Tracer. The given event identifier must be
valid for this Tracer (i.e. between 0 and nbEventTypes-1
included where nbEventTypes is the value given to the
Tracer(String, int) constructor).
The record is done only if the trace system is started (see
).startTrace()
eventId - identifier of the eventpublic void recordEvent(int eventId,
int value1)
Tracer. The given event identifier must be
valid for this Tracer (i.e. between 0 and nbEventTypes-1
included where nbEventTypes is the value given to the
Tracer(String, int) constructor).
The record is done only if the trace system is started (see
).startTrace()
eventId - identifier of the eventvalue1 - custom value for the eventpublic void recordEvent(int eventId,
int value1,
int value2)
Tracer. The given event identifier must be
valid for this Tracer (i.e. between 0 and nbEventTypes-1
included where nbEventTypes is the value given to the
Tracer(String, int) constructor).
The record is done only if the trace system is started (see
).startTrace()
eventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventpublic void recordEvent(int eventId,
int value1,
int value2,
int value3)
Tracer. The given event identifier must be
valid for this Tracer (i.e. between 0 and nbEventTypes-1
included where nbEventTypes is the value given to the
Tracer(String, int) constructor).
The record is done only if the trace system is started (see
).startTrace()
eventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventpublic void recordEvent(int eventId,
int value1,
int value2,
int value3,
int value4)
Tracer. The given event identifier must be
valid for this Tracer (i.e. between 0 and nbEventTypes-1
included where nbEventTypes is the value given to the
Tracer(String, int) constructor).
The record is done only if the trace system is started (see
).startTrace()
eventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventvalue4 - custom value for the eventpublic void recordEvent(int eventId,
int value1,
int value2,
int value3,
int value4,
int value5)
Tracer. The given event identifier must be
valid for this Tracer (i.e. between 0 and nbEventTypes-1
included where nbEventTypes is the value given to the
Tracer(String, int) constructor).
The record is done only if the trace system is started (see
).startTrace()
eventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventvalue4 - custom value for the eventvalue5 - custom value for the eventpublic void recordEvent(int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6)
Tracer. The given event identifier must be
valid for this Tracer (i.e. between 0 and nbEventTypes-1
included where nbEventTypes is the value given to the
Tracer(String, int) constructor).
The record is done only if the trace system is started (see
).startTrace()
eventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventvalue4 - custom value for the eventvalue5 - custom value for the eventvalue6 - custom value for the eventpublic void recordEvent(int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7)
Tracer. The given event identifier must be
valid for this Tracer (i.e. between 0 and nbEventTypes-1
included where nbEventTypes is the value given to the
Tracer(String, int) constructor).
The record is done only if the trace system is started (see
).startTrace()
eventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventvalue4 - custom value for the eventvalue5 - custom value for the eventvalue6 - custom value for the eventvalue7 - custom value for the eventpublic void recordEvent(int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7,
int value8)
Tracer. The given event identifier must be
valid for this Tracer (i.e. between 0 and nbEventTypes-1
included where nbEventTypes is the value given to the
Tracer(String, int) constructor).
The record is done only if the trace system is started (see
).startTrace()
eventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventvalue4 - custom value for the eventvalue5 - custom value for the eventvalue6 - custom value for the eventvalue7 - custom value for the eventvalue8 - custom value for the eventpublic void recordEvent(int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7,
int value8,
int value9)
Tracer. The given event identifier must be
valid for this Tracer (i.e. between 0 and nbEventTypes-1
included where nbEventTypes is the value given to the
Tracer(String, int) constructor).
The record is done only if the trace system is started (see
).startTrace()
eventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventvalue4 - custom value for the eventvalue5 - custom value for the eventvalue6 - custom value for the eventvalue7 - custom value for the eventvalue8 - custom value for the eventvalue9 - custom value for the eventpublic void recordEvent(int eventId,
int value1,
int value2,
int value3,
int value4,
int value5,
int value6,
int value7,
int value8,
int value9,
int value10)
Tracer. The given event identifier must be
valid for this Tracer (i.e. between 0 and nbEventTypes-1
included where nbEventTypes is the value given to the
Tracer(String, int) constructor).
The record is done only if the trace system is started (see
).startTrace()
eventId - identifier of the eventvalue1 - custom value for the eventvalue2 - custom value for the eventvalue3 - custom value for the eventvalue4 - custom value for the eventvalue5 - custom value for the eventvalue6 - custom value for the eventvalue7 - custom value for the eventvalue8 - custom value for the eventvalue9 - custom value for the eventvalue10 - custom value for the eventpublic void recordEvent(int eventId,
int... values)
Tracer. The given event identifier must be
valid for this Tracer (i.e. between 0 and nbEventTypes-1
included where nbEventTypes is the value given to the
Tracer(String, int) constructor).
The record is done only if the trace system is started (see
).startTrace()
eventId - the event identifiervalues - the event parameterspublic void recordEventEnd(int eventId)
Tracer. Call
this method to trace the duration of an event previously record with one of
the recordEvent(int) methods. This method should not be called for
event that has no duration.
For example, if you want to trace the execution of a method, you can call
recordEvent(int) at the beginning of the function and
recordEventEnd(int) at the end of the function.
The record is done only if the trace system is started (see
startTrace()).
eventId - identifier of the eventpublic void recordEventEnd(int eventId,
int value1)
Tracer. Call
this method to trace the duration of an event previously record with one of
the recordEvent(int) methods. This method should not be called for
event that has no duration.
For example, if you want to trace the execution of a method, you can call
recordEvent(int) at the beginning of the function and
recordEventEnd(int, int) at the end of the function.
The record is done only if the trace system is started (see
startTrace()).
eventId - identifier of the eventvalue1 - custom value for the event end.public void recordEventEnd(int eventId,
int... values)
Tracer. Call
this method to trace the duration of an event previously record with one of
the recordEvent(int) methods. This method should not be called for
event that has no duration.
For example, if you want to trace the execution of a method, you can call
recordEvent(int) at the beginning of the function and
recordEventEnd(int) at the end of the function.
The record is done only if the trace system is started (see
startTrace()).
eventId - the "end" event identifiervalues - the "end" event parameters