[lttng-dev] Lttng-java trace event formatting
Alexandre Montplaisir
alexmonthy at voxpopuli.im
Tue Mar 15 20:51:40 UTC 2016
Hi,
The Java agent library does not allow users to change the tracepoint
signature. Defining a tracepoint requires writing a C macro and
compiling it, so it cannot be done as easily as it is for a native program.
You could however modify the Java agent code, both on the Java side and
in the native JNI library, to get the signature you are looking for. And
then compile and run your Java application against the new library.
Cheers,
Alexandre
On 2016-03-15 01:28 PM, Pinky Singh wrote:
> Hi,
>
> I'm using lttng for tracing events in java linux platform.
>
> By default event trace is in format:
>
> [21:28:29.026447729] (+0.006778441)
> user
> lttng_jul:sys_event: { cpu_id = 10 }, { vtid = 8569, vpid = 8567 }, {
> msg = "Obtained reader lock for file",
> logger_name = "test.FileLock",
> class_name = "FileLock",
> method_name = "acquire",
> long_millis = 1458057509025,
> int_loglevel = 500,
> int_threadid = 1 }
>
> how can I change/modify it in following format?
>
> [21:28:29.026447729] (+0.006778441)
> user
> lttng_jul:sys_event: { cpu_id = 10 }, { vtid = 8569, vpid = 8567 }, {
> taskNameField = "test.FileLock",
> eventNameField = "Obtained reader lock for file",
> idField = "FileLock",
> dataField = "acquire" }
>
> In c++ we can give tracepoint arguments to control the fields but in Java
> how can I format it?
> Regards,
> Pinky
>
>
More information about the lttng-dev
mailing list