All of lore.kernel.org
 help / color / mirror / Atom feed
* Lttng-java trace event formatting
@ 2016-03-15 17:28 Pinky Singh
  0 siblings, 0 replies; 2+ messages in thread
From: Pinky Singh @ 2016-03-15 17:28 UTC (permalink / raw)
  To: lttng-dev


[-- Attachment #1.1: Type: text/plain, Size: 821 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 4132 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Lttng-java trace event formatting
       [not found] <CAGXNG7dyo97-ngmJnG7t0v7kcspwAC+Q2k1Cud=Y3KT8jdzZUA@mail.gmail.com>
@ 2016-03-15 20:51 ` Alexandre Montplaisir
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Montplaisir @ 2016-03-15 20:51 UTC (permalink / raw)
  To: Pinky Singh, lttng-dev

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
>
>
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-15 20:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-15 17:28 Lttng-java trace event formatting Pinky Singh
     [not found] <CAGXNG7dyo97-ngmJnG7t0v7kcspwAC+Q2k1Cud=Y3KT8jdzZUA@mail.gmail.com>
2016-03-15 20:51 ` Alexandre Montplaisir

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.