[lttng-dev] Out of Tree Kernel Module
Philippe Proulx
eeppeliteloop at gmail.com
Wed Jan 21 16:23:21 EST 2015
On Wed, Jan 21, 2015 at 3:55 PM, Jonathan Haws
<Jonathan.Haws at sdl.usu.edu> wrote:
> I am developing an out-of-tree kernel module and would like to
> instrument it for tracing. I understand I will need to create an LTTng
> probe in the modules source tree, however when I try to build my module,
> I get errors stating that a header file for the subsystem doesn't exist
> in the source tree.
>
> Here is my trace event file:
>
> #undef TRACE_SYSTEM
> #define TRACE_SYSTEM sigma
>
> #if !defined(_TRACE_SIGMA_H) || defined(TRACE_HEADER_MULTI_READ)
> #define _TRACE_SIGMA_H
>
> #include <linux/tracepoint.h>
>
> TRACE_EVENT(
> sigma_exarioctl,
> TP_PROTO(int cmd, int pin, int value),
> TP_ARGS(cmd, pin, value),
>
> /* LTTng doesn't need those */
> TP_STRUCT__entry(),
> TP_fast_assign(),
> TP_printk("", 0)
> );
>
> #endif
>
> /* this part must be outside protection */
> #include <trace/define_trace.h>
>
>
> When I include that in my module, I do this:
>
> #define CREATE_TRACE_POINTS
> #include "exartrace.h"
>
>
> However, when I build, I get the error:
> <KERNELDIR>/include/trace/define_trace.h:83:43: fatal error:
> trace/events/sigma.h: No such file or directory
> #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
>
Jonathan,
Did you try the procedure described here?
<http://lttng.org/docs/#doc-instrumenting-out-of-tree-linux-kernel>
Phil
>
> Any thoughts on what I am doing wrong?
>
> Thanks!
> Jon
> _______________________________________________
> 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