Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
ftrace.h File Reference
#include <linux/ftrace_event.h>

Go to the source code of this file.

Macros

#define TRACE_EVENT(name, proto, args, tstruct, assign, print)
 
#define __field(type, item)   type item;
 
#define __field_ext(type, item, filter_type)   type item;
 
#define __array(type, item, len)   type item[len];
 
#define __dynamic_array(type, item, len)   u32 __data_loc_##item;
 
#define __string(item, src)   __dynamic_array(char, item, -1)
 
#define TP_STRUCT__entry(args...)   args
 
#define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print)
 
#define DEFINE_EVENT(template, name, proto, args)
 
#define DEFINE_EVENT_PRINT(template, name, proto, args, print)   DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
 
#define TRACE_EVENT_FN(name, proto, args, tstruct,assign, print, reg, unreg)
 
#define TRACE_EVENT_FLAGS(name, value)   __TRACE_EVENT_FLAGS(name, value)
 
#define __field(type, item)
 
#define __field_ext(type, item, filter_type)
 
#define __array(type, item, len)
 
#define __dynamic_array(type, item, len)   u32 item;
 
#define __string(item, src)   __dynamic_array(char, item, -1)
 
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print)
 
#define DEFINE_EVENT(template, name, proto, args)
 
#define DEFINE_EVENT_PRINT(template, name, proto, args, print)   DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
 
#define TRACE_EVENT_FLAGS(event, flag)
 
#define __entry   field
 
#define TP_printk(fmt, args...)   fmt "\n", args
 
#define __get_dynamic_array(field)   ((void *)__entry + (__entry->__data_loc_##field & 0xffff))
 
#define __get_str(field)   (char *)__get_dynamic_array(field)
 
#define __print_flags(flag, delim, flag_array...)
 
#define __print_symbolic(value, symbol_array...)
 
#define __print_symbolic_u64(value, symbol_array...)   __print_symbolic(value, symbol_array)
 
#define __print_hex(buf, buf_len)   ftrace_print_hex_seq(p, buf, buf_len)
 
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print)
 
#define DEFINE_EVENT_PRINT(template, call, proto, args, print)
 
#define __field_ext(type, item, filter_type)
 
#define __field(type, item)   __field_ext(type, item, FILTER_OTHER)
 
#define __array(type, item, len)
 
#define __dynamic_array(type, item, len)
 
#define __string(item, src)   __dynamic_array(char, item, -1)
 
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print)
 
#define DEFINE_EVENT(template, name, proto, args)
 
#define DEFINE_EVENT_PRINT(template, name, proto, args, print)   DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
 
#define __entry   entry
 
#define __field(type, item)
 
#define __field_ext(type, item, filter_type)
 
#define __array(type, item, len)
 
#define __dynamic_array(type, item, len)
 
#define __string(item, src)   __dynamic_array(char, item, strlen(src) + 1)
 
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print)
 
#define DEFINE_EVENT(template, name, proto, args)
 
#define DEFINE_EVENT_PRINT(template, name, proto, args, print)   DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
 
#define _TRACE_PERF_PROTO(call, proto)
 
#define _TRACE_PERF_INIT(call)
 
#define __entry   entry
 
#define __field(type, item)
 
#define __array(type, item, len)
 
#define __dynamic_array(type, item, len)   __entry->__data_loc_##item = __data_offsets.item;
 
#define __string(item, src)   __dynamic_array(char, item, -1) \
 
#define __assign_str(dst, src)   strcpy(__get_str(dst), src);
 
#define TP_fast_assign(args...)   args
 
#define TP_perf_assign(args...)
 
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print)
 
#define DEFINE_EVENT(template, call, proto, args)
 
#define DEFINE_EVENT_PRINT(template, name, proto, args, print)
 
#define __entry   REC
 
#define TP_printk(fmt, args...)   "\"" fmt "\", " __stringify(args)
 
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print)
 
#define DEFINE_EVENT(template, call, proto, args)
 
#define DEFINE_EVENT_PRINT(template, call, proto, args, print)
 

Macro Definition Documentation

#define __array (   type,
  item,
  len 
)    type item[len];

Definition at line 496 of file ftrace.h.

#define __array (   type,
  item,
  len 
)

Definition at line 496 of file ftrace.h.

#define __array (   type,
  item,
  len 
)
Value:
do { \
mutex_lock(&event_storage_mutex); \
BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \
snprintf(event_storage, sizeof(event_storage), \
"%s[%d]", #type, len); \
ret = trace_define_field(event_call, event_storage, #item, \
sizeof(field.item), \
mutex_unlock(&event_storage_mutex); \
if (ret) \
return ret; \
} while (0);

Definition at line 496 of file ftrace.h.

#define __array (   type,
  item,
  len 
)

Definition at line 496 of file ftrace.h.

#define __array (   type,
  item,
  len 
)

Definition at line 496 of file ftrace.h.

#define __assign_str (   dst,
  src 
)    strcpy(__get_str(dst), src);

Definition at line 506 of file ftrace.h.

#define __dynamic_array (   type,
  item,
  len 
)    u32 __data_loc_##item;

Definition at line 499 of file ftrace.h.

#define __dynamic_array (   type,
  item,
  len 
)    u32 item;

Definition at line 499 of file ftrace.h.

#define __dynamic_array (   type,
  item,
  len 
)
Value:
ret = trace_define_field(event_call, "__data_loc " #type "[]", #item, \
offsetof(typeof(field), __data_loc_##item), \
sizeof(field.__data_loc_##item), \

Definition at line 499 of file ftrace.h.

#define __dynamic_array (   type,
  item,
  len 
)
Value:
__data_offsets->item = __data_size + \
offsetof(typeof(*entry), __data); \
__data_offsets->item |= (len * sizeof(type)) << 16; \
__data_size += (len) * sizeof(type);

Definition at line 499 of file ftrace.h.

#define __dynamic_array (   type,
  item,
  len 
)    __entry->__data_loc_##item = __data_offsets.item;

Definition at line 499 of file ftrace.h.

#define __entry   field

Definition at line 570 of file ftrace.h.

#define __entry   entry

Definition at line 570 of file ftrace.h.

#define __entry   entry

Definition at line 570 of file ftrace.h.

#define __entry   REC

Definition at line 570 of file ftrace.h.

#define __field (   type,
  item 
)    type item;

Definition at line 493 of file ftrace.h.

#define __field (   type,
  item 
)

Definition at line 493 of file ftrace.h.

#define __field (   type,
  item 
)    __field_ext(type, item, FILTER_OTHER)

Definition at line 493 of file ftrace.h.

#define __field (   type,
  item 
)

Definition at line 493 of file ftrace.h.

#define __field (   type,
  item 
)

Definition at line 493 of file ftrace.h.

#define __field_ext (   type,
  item,
  filter_type 
)    type item;

Definition at line 369 of file ftrace.h.

#define __field_ext (   type,
  item,
  filter_type 
)

Definition at line 369 of file ftrace.h.

#define __field_ext (   type,
  item,
  filter_type 
)
Value:
ret = trace_define_field(event_call, #type, #item, \
sizeof(field.item), \
if (ret) \
return ret;

Definition at line 369 of file ftrace.h.

#define __field_ext (   type,
  item,
  filter_type 
)

Definition at line 369 of file ftrace.h.

#define __get_dynamic_array (   field)    ((void *)__entry + (__entry->__data_loc_##field & 0xffff))

Definition at line 186 of file ftrace.h.

#define __get_str (   field)    (char *)__get_dynamic_array(field)

Definition at line 190 of file ftrace.h.

#define __print_flags (   flag,
  delim,
  flag_array... 
)
Value:
({ \
static const struct trace_print_flags __flags[] = \
{ flag_array, { -1, NULL }}; \
ftrace_print_flags_seq(p, delim, flag, __flags); \
})

Definition at line 193 of file ftrace.h.

#define __print_hex (   buf,
  buf_len 
)    ftrace_print_hex_seq(p, buf, buf_len)

Definition at line 222 of file ftrace.h.

#define __print_symbolic (   value,
  symbol_array... 
)
Value:
({ \
static const struct trace_print_flags symbols[] = \
{ symbol_array, { -1, NULL }}; \
ftrace_print_symbols_seq(p, value, symbols); \
})

Definition at line 201 of file ftrace.h.

#define __print_symbolic_u64 (   value,
  symbol_array... 
)    __print_symbolic(value, symbol_array)

Definition at line 217 of file ftrace.h.

#define __string (   item,
  src 
)    __dynamic_array(char, item, -1)

Definition at line 503 of file ftrace.h.

#define __string (   item,
  src 
)    __dynamic_array(char, item, -1)

Definition at line 503 of file ftrace.h.

#define __string (   item,
  src 
)    __dynamic_array(char, item, -1)

Definition at line 503 of file ftrace.h.

#define __string (   item,
  src 
)    __dynamic_array(char, item, strlen(src) + 1)

Definition at line 503 of file ftrace.h.

#define __string (   item,
  src 
)    __dynamic_array(char, item, -1) \

Definition at line 503 of file ftrace.h.

#define _TRACE_PERF_INIT (   call)

Definition at line 486 of file ftrace.h.

#define _TRACE_PERF_PROTO (   call,
  proto 
)

Definition at line 485 of file ftrace.h.

#define DECLARE_EVENT_CLASS (   name,
  proto,
  args,
  tstruct,
  assign,
  print 
)
Value:
struct ftrace_raw_##name { \
tstruct \
char __data[0]; \
}; \
\
static struct ftrace_event_class event_class_##name;

Definition at line 582 of file ftrace.h.

#define DECLARE_EVENT_CLASS (   call,
  proto,
  args,
  tstruct,
  assign,
  print 
)
Value:
struct ftrace_data_offsets_##call { \
tstruct; \
};

Definition at line 582 of file ftrace.h.

#define DECLARE_EVENT_CLASS (   call,
  proto,
  args,
  tstruct,
  assign,
  print 
)

Definition at line 582 of file ftrace.h.

#define DECLARE_EVENT_CLASS (   call,
  proto,
  args,
  tstruct,
  func,
  print 
)
Value:
static int notrace \
ftrace_define_fields_##call(struct ftrace_event_call *event_call) \
{ \
struct ftrace_raw_##call field; \
int ret; \
\
tstruct; \
\
return ret; \
}

Definition at line 582 of file ftrace.h.

#define DECLARE_EVENT_CLASS (   call,
  proto,
  args,
  tstruct,
  assign,
  print 
)
Value:
static inline notrace int ftrace_get_offsets_##call( \
struct ftrace_data_offsets_##call *__data_offsets, proto) \
{ \
int __data_size = 0; \
struct ftrace_raw_##call __maybe_unused *entry; \
\
tstruct; \
\
return __data_size; \
}

Definition at line 582 of file ftrace.h.

#define DECLARE_EVENT_CLASS (   call,
  proto,
  args,
  tstruct,
  assign,
  print 
)

Definition at line 582 of file ftrace.h.

#define DECLARE_EVENT_CLASS (   call,
  proto,
  args,
  tstruct,
  assign,
  print 
)
Value:
static const char print_fmt_##call[] = print; \
static struct ftrace_event_class __used event_class_##call = { \
.system = __stringify(TRACE_SYSTEM), \
.define_fields = ftrace_define_fields_##call, \
.fields = LIST_HEAD_INIT(event_class_##call.fields),\
.raw_init = trace_event_raw_init, \
.probe = ftrace_raw_event_##call, \
.reg = ftrace_event_reg, \
_TRACE_PERF_INIT(call) \
};

Definition at line 582 of file ftrace.h.

#define DEFINE_EVENT (   template,
  name,
  proto,
  args 
)
Value:
static struct ftrace_event_call __used \
__attribute__((__aligned__(4))) event_##name

Definition at line 596 of file ftrace.h.

#define DEFINE_EVENT (   template,
  name,
  proto,
  args 
)

Definition at line 596 of file ftrace.h.

#define DEFINE_EVENT (   template,
  name,
  proto,
  args 
)

Definition at line 596 of file ftrace.h.

#define DEFINE_EVENT (   template,
  name,
  proto,
  args 
)

Definition at line 596 of file ftrace.h.

#define DEFINE_EVENT (   template,
  call,
  proto,
  args 
)
Value:
static inline void ftrace_test_probe_##call(void) \
{ \
check_trace_callback_type_##call(ftrace_raw_event_##template); \
}

Definition at line 596 of file ftrace.h.

#define DEFINE_EVENT (   template,
  call,
  proto,
  args 
)
Value:
\
static struct ftrace_event_call __used event_##call = { \
.name = #call, \
.class = &event_class_##template, \
.event.funcs = &ftrace_event_type_funcs_##template, \
.print_fmt = print_fmt_##template, \
}; \
__attribute__((section("_ftrace_events"))) *__event_##call = &event_##call

Definition at line 596 of file ftrace.h.

#define DEFINE_EVENT_PRINT (   template,
  name,
  proto,
  args,
  print 
)    DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))

Definition at line 608 of file ftrace.h.

#define DEFINE_EVENT_PRINT (   template,
  name,
  proto,
  args,
  print 
)    DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))

Definition at line 608 of file ftrace.h.

#define DEFINE_EVENT_PRINT (   template,
  call,
  proto,
  args,
  print 
)

Definition at line 608 of file ftrace.h.

#define DEFINE_EVENT_PRINT (   template,
  name,
  proto,
  args,
  print 
)    DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))

Definition at line 608 of file ftrace.h.

#define DEFINE_EVENT_PRINT (   template,
  name,
  proto,
  args,
  print 
)    DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))

Definition at line 608 of file ftrace.h.

#define DEFINE_EVENT_PRINT (   template,
  name,
  proto,
  args,
  print 
)

Definition at line 608 of file ftrace.h.

#define DEFINE_EVENT_PRINT (   template,
  call,
  proto,
  args,
  print 
)
Value:
\
static const char print_fmt_##call[] = print; \
\
static struct ftrace_event_call __used event_##call = { \
.name = #call, \
.class = &event_class_##template, \
.event.funcs = &ftrace_event_type_funcs_##call, \
.print_fmt = print_fmt_##call, \
}; \
__attribute__((section("_ftrace_events"))) *__event_##call = &event_##call

Definition at line 608 of file ftrace.h.

#define TP_fast_assign (   args...)    args

Definition at line 510 of file ftrace.h.

#define TP_perf_assign (   args...)

Definition at line 513 of file ftrace.h.

#define TP_printk (   fmt,
  args... 
)    fmt "\n", args

Definition at line 579 of file ftrace.h.

#define TP_printk (   fmt,
  args... 
)    "\"" fmt "\", " __stringify(args)

Definition at line 579 of file ftrace.h.

#define TP_STRUCT__entry (   args...)    args

Definition at line 57 of file ftrace.h.

#define TRACE_EVENT (   name,
  proto,
  args,
  tstruct,
  assign,
  print 
)
Value:
PARAMS(args), \
PARAMS(tstruct), \
PARAMS(assign), \
PARAMS(print)); \
DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args));

Definition at line 31 of file ftrace.h.

#define TRACE_EVENT_FLAGS (   name,
  value 
)    __TRACE_EVENT_FLAGS(name, value)

Definition at line 137 of file ftrace.h.

#define TRACE_EVENT_FLAGS (   event,
  flag 
)

Definition at line 137 of file ftrace.h.

#define TRACE_EVENT_FN (   name,
  proto,
  args,
  tstruct,
  assign,
  print,
  reg,
  unreg 
)
Value:
PARAMS(tstruct), PARAMS(assign), PARAMS(print)) \

Definition at line 80 of file ftrace.h.