[lttng-dev] How to user perf probes and module tracepoints in lttng
Francis Deslauriers
francis.deslauriers at efficios.com
Wed Oct 11 21:49:38 UTC 2017
Hi,
2017-10-11 17:10 GMT-04:00 avkumar <anilzoom at gmail.com>:
>
> Perf probes:
> How can we add the dynamic trace points created by perf probe into lttng? When I add the perf probe as kprobe type I get missing tracepoint error, If I add the perf probe as tracepoint , Lttng does not complain but it does not collect any data when the tracepoint is hit.
>
> perf probe -l
> probe:tcp_gro (on tcp_gro_receive at net/ipv4/tcp_offload.c with addr len)
>
> lttng enable-event -k --probe=tcp_gro
First, you have to give your probe event a name.
Second, tcp_gro has to be a kernel symbol. According to the Perf
output above, the symbol name is `tcp_gro_receive` so the command you
want to run is:
lttng enable-event -k --probe=tcp_gro_receive EVENT_NAME
> Error: Missing event name(s).
>
> When I add it as a trace point
>
> lttng enable-event -k probe:tcp_gro
> Kernel event probe:tcp_gro created in channel channel0]
>
> it does not give any error but no data is collected
It's expected if you don't have a kernel tracepoint named
"probe:tcp_gro"(you probably don't) currently loaded in your kernel.
There is no error because there is no way for the kernel tracer if the
tracepoint is part of an not-yet-loaded kernel module or not.
"probe:tcp_gro" is a Perf specific description of the kprobe you
enabled. You can not directly reuse this description in the
lttng-enable-event command. To use the `lttng enable-event -k
TRACEPOINT`, try the `lttng list -k` command (with a lttng-sessiond
running as root) to list the currently available tracepoints.
>
>
>
> Module tracepoints:
> I created module tracepoints in the kernel and compiled the trace points. The header file is in the driver module directory. When I write the adaptation layer for lttng, it does not compile as it is not able to fien the header file. I have given fill path name to the header file and still it does not work.
Can you give us a bit more details. Could you send us a pastebin of
the error you get?
Thank you,
Francis
>
>
> Thanks
>
>
>
>
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
--
Francis Deslauriers
Software developer
EfficiOS inc.
More information about the lttng-dev
mailing list