Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] Difference between markers, tracepoints and trace_events
       [not found] <4F4224E4.6080108@elesoftrom.com.pl>
@ 2012-04-04  8:23 ` Piotr Romaniuk
  2012-04-10 13:58   ` Ettore Del Negro
  2012-04-10 15:28   ` Mathieu Desnoyers
  0 siblings, 2 replies; 3+ messages in thread
From: Piotr Romaniuk @ 2012-04-04  8:23 UTC (permalink / raw)


Hi,

I would like to use tracing of execution in my kernel driver.
I saw in LTTng documentation and source code that there are several methods:
1) markers,
2) tracepoints,
3) trace_events.
I saw that programming interface for usage each of these item is little 
different.
What is the difference between these methods? Are they equivalent from 
conceptual point of view?
I successfuly used markers and observed logged entries in LTTTV, but 
have no success with trace_events.

I use following versions:
- Linux kernel 2.6.33.2 (+ rt13 patch)
- lttng kernel patch 0.212
- lttctl 0.87
- ltttv 0.12.36

Regards,
Piotr Romaniuk




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

* [lttng-dev] Difference between markers, tracepoints and trace_events
  2012-04-04  8:23 ` [lttng-dev] Difference between markers, tracepoints and trace_events Piotr Romaniuk
@ 2012-04-10 13:58   ` Ettore Del Negro
  2012-04-10 15:28   ` Mathieu Desnoyers
  1 sibling, 0 replies; 3+ messages in thread
From: Ettore Del Negro @ 2012-04-10 13:58 UTC (permalink / raw)


On 4/4/2012 10:23 AM, Piotr Romaniuk wrote:
> I saw in LTTng documentation and source code that there are several
> methods:
> 1) markers,
> 2) tracepoints,
> 3) trace_events.
I'd like to know the answer too. Have you got any reply?

Regards,
Ettore


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 945 bytes
Desc: OpenPGP digital signature
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20120410/01e17ae9/attachment.pgp>


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

* [lttng-dev] Difference between markers, tracepoints and trace_events
  2012-04-04  8:23 ` [lttng-dev] Difference between markers, tracepoints and trace_events Piotr Romaniuk
  2012-04-10 13:58   ` Ettore Del Negro
@ 2012-04-10 15:28   ` Mathieu Desnoyers
  1 sibling, 0 replies; 3+ messages in thread
From: Mathieu Desnoyers @ 2012-04-10 15:28 UTC (permalink / raw)


* Piotr Romaniuk (piotr.romaniuk at elesoftrom.com.pl) wrote:
> Hi,
>
> I would like to use tracing of execution in my kernel driver.
> I saw in LTTng documentation and source code that there are several methods:
> 1) markers,

lttng 0.x instrumentation. Slow. Format string parsing at runtime. Easy
to add debug-style instrumentation.

> 2) tracepoints,

See Documentation/trace/tracepoint.txt of the Linux kernel. It is much
faster than markers. LTTng 0.x uses tracepoints in combination with
the marker infrastructure to have a faster way to write trace data to
buffers, but it's more painful to use.

> 3) trace_events.

Sits on top of tracepoints. It provides description of probe callbacks
that serializes data into the buffer that would otherwise need to be
done by hand if using tracepoints directly. See include/trace/events/*
and the comment at the bottom of include/linux/tracepoint.h.

The old lttng 0.x uses only the "tracepoints" that are declared from the
trace_event, without using the extra information from trace_event.

LTTng 2.0 uses TRACE_EVENT extensively.

> I saw that programming interface for usage each of these item is little  
> different.
> What is the difference between these methods? Are they equivalent from  
> conceptual point of view?
> I successfuly used markers and observed logged entries in LTTTV, but  
> have no success with trace_events.
>
> I use following versions:
> - Linux kernel 2.6.33.2 (+ rt13 patch)
> - lttng kernel patch 0.212

With this old kernel, the easiest way to add your own instrumentation
would be markers. But it's also much slower. In these old versions,
LTTng used markers as "description" of the payload, connecting
tracepoints to markers with probes.

In LTTng 2.0, markers are gone, leaving tracepoints and TRACE_EVENT. In
lttng 2.0 kernel tracer, we only use TRACE_EVENT to describe
instrumentation, which generates the probes.

Mathieu

> - lttctl 0.87
> - ltttv 0.12.36
>
> Regards,
> Piotr Romaniuk
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



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

end of thread, other threads:[~2012-04-10 15:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4F4224E4.6080108@elesoftrom.com.pl>
2012-04-04  8:23 ` [lttng-dev] Difference between markers, tracepoints and trace_events Piotr Romaniuk
2012-04-10 13:58   ` Ettore Del Negro
2012-04-10 15:28   ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox