[lttng-dev] Can lttng support kernel function tracer
Francis Deslauriers
francis.deslauriers at mail.utoronto.ca
Mon Feb 16 11:53:00 EST 2015
Hi Zhenyu,
If I understandd your question correctly, I can think of two ways to
trace an arbitrary kernel function. First, you can hook the tracer on
a dynamic probe[1] using something like this:
"lttng enable-event customEventName -k --probe kernelFunctionName".
You can also hook the tracer on both entry and exit of a function
using "--function" instead of "--probe".
To list your kernel symbols use "cat /proc/kallsyms"
Second, you can create custom kernel tracepoints and compile them in
you kernel. Have a look at the online documentation [2].
Don't hesitate to explain further if this doesn't answer your question.
Cheers!
Francis
[1] http://git.lttng.org/?p=lttng-tools.git;a=blob;f=doc/quickstart.txt;h=018c27b2b939ef7cd075255fd01bcfd8b2b21b1e;hb=HEAD#l93
[2] http://lttng.org/docs/#doc-instrumenting-linux-kernel-itself
On Thu, Feb 12, 2015 at 7:49 PM, zhenyu.ren <zhenyu.ren at aliyun.com> wrote:
> Hi,
>
> It's well known that lttng can make use of kernel tracepoints to do block tracing ,system call tracing etc.Is it possible that lttng can produce anything like kernel function tracer does?
>
> Thanks
> zhenyu.ren
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
More information about the lttng-dev
mailing list