[lttng-dev] Viewing existing kernel tracepoints with LTTng

Amit Schreiber gnobal at outlook.com
Mon Dec 16 01:14:44 EST 2013


----------------------------------------
> Date: Sun, 15 Dec 2013 17:49:40 -0500
> From: francis.giraldeau at gmail.com
> To: gnobal at outlook.com
> CC: lttng-dev at lists.lttng.org
> Subject: Re: [lttng-dev] Viewing existing kernel tracepoints with LTTng
>
> Le 2013-12-15 09:39, Amit Schreiber a écrit :
>> Hi,
>>
>> I started integrating LTTng into my code, and thought that existing tracepoints (which are visible with perf) will be immediately visible to LTTng. I obviously misunderstood or am doing something wrong.
>>
>> What's the correct way to have existing perf tracepoints seen by LTTng?
>
> LTTng adds probes to existing tracepoints in the kernel. Under the hood,
> LTTng probe modules call tracepoint_probe_register() to add a callback
> when the tracepoint is enabled. You can thus hook to any tracepoint
> defined in the kernel, provided that the probe function have the right
> signature. In the case of LTTng, the probe writes an event in the ring
> buffer.
>
> To make things safer and add type checking at compile-time, LTTng
> defines the probe code with macros. In fact, all the module's probe code
> is generated. Each tracepoint in the kernel must also have an LTTng
> probe to be listed, and this is the proper way to do it. For the detail,
> refer to the "probe" directory of lttng-modules.
>
> Cheers,
>
> Francis
>

Thanks a lot, Francis. I appreciate the help and quick response.

Amit 		 	   		  


More information about the lttng-dev mailing list