[lttng-dev] [RFC-PATCH] Adding trap tracepoints definitions

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Thu Mar 21 09:28:38 EDT 2013


* Francis Deslauriers (fdeslaur at gmail.com) wrote:
> On Wed, Mar 20, 2013 at 10:51 PM, Mathieu Desnoyers
> <mathieu.desnoyers at efficios.com> wrote:
> > Subject change:
> >
> > "Adding trap tracepoints definitions"
> >
> > -> "Add trap trace event definitions"
> >
> > ->
> >
> > Add trace trace event definitions. It will allow each architecture to
> > instrument their traps.
> 
> How about this?
> Add trap trace event definitions
> 
> Add trap entry and trap exit trace event definitions. It will allow each
> architecture to instrument their traps.
> 
> 
> This way we dont repeat the subject and it is more specific.

sounds good!

With these changes, please put my:

Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>

Thanks,

Mathieu

> 
> >
> > I'm being even more strict than usual as you notice given that this
> > patch is targeting lkml.
> >
> > Thanks,
> >
> > Mathieu
> >
> >>
> >> Signed-off-by: Francis Deslauriers <fdeslaur at gmail.com>
> >> ---
> >>  include/trace/events/trap.h |   47 +++++++++++++++++++++++++++++++++++++++++++
> >>  1 file changed, 47 insertions(+)
> >>  create mode 100644 include/trace/events/trap.h
> >>
> >> diff --git a/include/trace/events/trap.h b/include/trace/events/trap.h
> >> new file mode 100644
> >> index 0000000..171b9cf
> >> --- /dev/null
> >> +++ b/include/trace/events/trap.h
> >> @@ -0,0 +1,47 @@
> >> +#undef TRACE_SYSTEM
> >> +#define TRACE_SYSTEM trap
> >> +
> >> +#if !defined(_TRACE_TRAP_H) || defined(TRACE_HEADER_MULTI_READ)
> >> +#define _TRACE_TRAP_H
> >> +
> >> +#include <linux/tracepoint.h>
> >> +
> >> +TRACE_EVENT(trap_entry,
> >> +
> >> +     TP_PROTO(struct pt_regs *regs, long trap),
> >> +
> >> +     TP_ARGS(regs, trap),
> >> +
> >> +     TP_STRUCT__entry(
> >> +             __field(        long,           trap    )
> >> +             __field(        unsigned long,  ip      )
> >> +     ),
> >> +
> >> +     TP_fast_assign(
> >> +             __entry->trap   = trap;
> >> +             __entry->ip     = regs ? instruction_pointer(regs) : 0UL;
> >> +     ),
> >> +
> >> +     TP_printk("number=%ld ip=%lu", __entry->trap, __entry->ip)
> >> +);
> >> +
> >> +TRACE_EVENT(trap_exit,
> >> +
> >> +     TP_PROTO(long trap),
> >> +
> >> +     TP_ARGS(trap),
> >> +
> >> +     TP_STRUCT__entry(
> >> +             __field(        long,   trap    )
> >> +     ),
> >> +
> >> +     TP_fast_assign(
> >> +             __entry->trap   = trap;
> >> +     ),
> >> +
> >> +     TP_printk("number=%ld", __entry->trap)
> >> +);
> >> +
> >> +#endif /* _TRACE_TRAP_H */
> >> +/* This part must be outside protection */
> >> +#include <trace/define_trace.h>
> >> --
> >> 1.7.10.4
> >>
> >>
> >> _______________________________________________
> >> lttng-dev mailing list
> >> lttng-dev at lists.lttng.org
> >> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> >
> > --
> > Mathieu Desnoyers
> > EfficiOS Inc.
> > http://www.efficios.com

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list