Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux.git] / include / trace / ftrace.h
index 8765126b328ce4220d3c61af8c655f0226f29564..0a1a4f7caf095154c43aa901de0eca61be2b0208 100644 (file)
@@ -470,10 +470,13 @@ static inline notrace int ftrace_get_offsets_##call(                      \
  * };
  *
  * static struct ftrace_event_call event_<call> = {
- *     .name                   = "<call>",
  *     .class                  = event_class_<template>,
+ *     {
+ *             .tp                     = &__tracepoint_<call>,
+ *     },
  *     .event                  = &ftrace_event_type_<call>,
  *     .print_fmt              = print_fmt_<call>,
+ *     .flags                  = TRACE_EVENT_FL_TRACEPOINT,
  * };
  * // its only safe to use pointers when doing linker tricks to
  * // create an array.
@@ -605,10 +608,13 @@ static struct ftrace_event_class __used __refdata event_class_##call = { \
 #define DEFINE_EVENT(template, call, proto, args)                      \
                                                                        \
 static struct ftrace_event_call __used event_##call = {                        \
-       .name                   = #call,                                \
        .class                  = &event_class_##template,              \
+       {                                                               \
+               .tp                     = &__tracepoint_##call,         \
+       },                                                              \
        .event.funcs            = &ftrace_event_type_funcs_##template,  \
        .print_fmt              = print_fmt_##template,                 \
+       .flags                  = TRACE_EVENT_FL_TRACEPOINT,            \
 };                                                                     \
 static struct ftrace_event_call __used                                 \
 __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
@@ -619,10 +625,13 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
 static const char print_fmt_##call[] = print;                          \
                                                                        \
 static struct ftrace_event_call __used event_##call = {                        \
-       .name                   = #call,                                \
        .class                  = &event_class_##template,              \
+       {                                                               \
+               .tp                     = &__tracepoint_##call,         \
+       },                                                              \
        .event.funcs            = &ftrace_event_type_funcs_##call,      \
        .print_fmt              = print_fmt_##call,                     \
+       .flags                  = TRACE_EVENT_FL_TRACEPOINT,            \
 };                                                                     \
 static struct ftrace_event_call __used                                 \
 __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call