[lttng-dev] Use lttng for my own module which already has trace events
Francis Giraldeau
francis.giraldeau at gmail.com
Tue Oct 8 09:10:26 EDT 2013
Le 2013-10-08 08:42, Michael Lausch a écrit :
> On Tue, 2013-10-08 at 13:25 +0200, Woegerer, Paul wrote:
>> On 10/08/2013 01:03 PM, Michael Lausch wrote:
>>> Hi,
>>>
>>> I've developed a kernel module which defines TRACE_EVENTS. These events
>>> are shown in /sys/kernel/debug/tracing/events and i can read them
>>> from /sys/kernel/debug/tracing/trace if they are enabled.
>>>
>>> But i want to use these events in lttng.
>>> # lttng list -k
>>> does not show them.
>>
>> You need to add an lttng probe in lttng-modules to expose your ftrace
>> events as lttng kernel events.
>
> I did this, but this has some maintenance problems. I'd like not to
> change or add something to the lttng-module source. I'd like to compile
> the lttng tracepoints, depending on some config variable int he same
> step as the kernel module.
>
> If that's not possible, maintenannce of the module get's a little bit
> harder.
I do maintain an "addons" module branch for experimental purposes. When
the utility of the tracepoints are demonstrated, then it becomes easier
to push them upstream. Your contributions are welcome.
https://github.com/giraldeau/lttng-modules
BTW, if the kernel has CONFIG_MODULE_SIG=y (from Ubuntu with kernel
3.8), then it won't load tracepoints defined in modules. The addons
branch has the necessary steps to create a x509 certificate and load the
key, such that the tracepoints are visible. It doesn't seems you are
affected by this, but still good to know ;-)
Cheers,
Francis
More information about the lttng-dev
mailing list