Event Tracing
Principle
Event Tracing allows to record integer based events for debugging and monitoring purposes without affecting execution performance too heavily.
A record is an event type identified by an eventID
and can have a list of values.
It can be a single event or a period of time with a start and an end.
Events recorded are then redirected to the trace system implemented in the VEE Port.
The Trace feature relies on the implementation of natives defined in the file LLTRACE_impl.h
.
In order to enable the monitoring of events generated by the Core Engine, the implementation of functions defined in LLMJVM_MONITOR_impl.h
is also necessary.
Dependencies
LLTRACE_impl.h
implementations (see LLTRACE: Trace).LLMJVM_MONITOR_impl.h
implementations (see LLMJVM_MONITOR: Core Engine Monitoring).
Existing implementations
By default, when enabled, the Trace API displays a message in the standard output for every recordEvent(...)
and recordEventEnd(...)
method calls.
It does not print a timestamp when displaying the trace message because it can drastically affect execution performances. It only prints the ID of the recorded event followed by the values given in parameters.
A VEE Port can connect its own implementation by overriding the functions defined in the files LLTRACE_impl.h
and LLMJVM_MONITOR_impl.h
.
MicroEJ Corp. also provides an implementation that redirects the events to SystemView tool, the real-time recording and visualization tool from Segger. It is perfect for a finer understanding of the runtime behavior by showing events sequence and duration.
An implementation example for the NXP i.MX RT1170 development board VEE Port is available on Github.
Installation
To activate Event Tracing in your VEE Port, you need to follow these steps:
Enable and start the trace see here
Note
This feature is provided by the Core Engine, and does not require to import a Foundation Library Pack.
Use
See Java API Usage section in the Application Developer Guide to use the feature in Java at the Application level.
Events can also be generated in C using the API described in the file LLTRACE.h
. The functions documentation is available here.
Please contact our support team for more information about how to integrate this module.