[lttng-dev] newbie and kernel trace

Stéphane ANCELOT sancelot at free.fr
Fri May 17 10:58:58 EDT 2013


Hi,

I am trying to reimplement LTTNG 2. in xenomai api.

the main problem is that I do not sea any of my new events available in 
lttng 2.


my kernel compiles fine and  here is what I done to set it up :

file include/trace/events/pod.h :

#undef TRACE_SYSTEM
#define TRACE_SYSTEM xenotrace

#if !defined(_XENOTRACE_H) || defined(TRACE_HEADER_MULTI_READ)

#define _XENOTRACE_H

#include <linux/tracepoint.h>


TRACE_EVENT(    xn_nucleus_thread_init,
                 TP_PROTO(struct xnthread *thread,char 
*thread_name,xnflags_t flags,const char *class,int prio),
                 TP_ARGS(thread,thread_name,flags,class,prio),

                 TP_STRUCT__entry(
                  __field(struct xnthread *,thread)
                  __array(char ,thread_name,      XNOBJECT_NAME_LEN   )
                  __field(xnflags_t,flags)
                  __array(char,class,      XNOBJECT_NAME_LEN  )
                  __field(int,    prio                       )
                 ),

               TP_fast_assign(
                __entry->thread   = thread;
                memcpy(__entry->thread_name,thread_name, XNOBJECT_NAME_LEN);
                __entry->flags   = flags;
                memcpy(__entry->class,class, XNOBJECT_NAME_LEN);
                __entry->prio   = prio;
                 ),

                TP_printk("thread %p thread_name %s flags %lu class %s 
prio %d",
                __entry->thread, __entry->thread_name, 
__entry->flags,__entry->class,
                __entry->prio)
);

#endif

/* This part must be outside protection */
#include <trace/define_trace.h>



in pod.h :
#define CREATE_TRACE_POINTS
#include <trace/events/pod.h>



More information about the lttng-dev mailing list