Merge commit 'tracing/core' into tracing/kprobes
Conflicts:
kernel/trace/trace_export.c
kernel/trace/trace_kprobe.c
Merge reason: This topic branch lacks an important
build fix in tracing/core:
0dd7b74787
:
tracing: Fix double CPP substitution in TRACE_EVENT_FN
that prevents from multiple tracepoint headers inclusion crashes.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
This commit is contained in:
@@ -45,14 +45,15 @@
|
||||
}; \
|
||||
static struct ftrace_event_call event_##name
|
||||
|
||||
#undef __cpparg
|
||||
#define __cpparg(arg...) arg
|
||||
|
||||
/* Callbacks are meaningless to ftrace. */
|
||||
#undef TRACE_EVENT_FN
|
||||
#define TRACE_EVENT_FN(name, proto, args, tstruct, \
|
||||
assign, print, reg, unreg) \
|
||||
TRACE_EVENT(name, TP_PROTO(proto), TP_ARGS(args), \
|
||||
TP_STRUCT__entry(tstruct), \
|
||||
TP_fast_assign(assign), \
|
||||
TP_printk(print))
|
||||
#define TRACE_EVENT_FN(name, proto, args, tstruct, \
|
||||
assign, print, reg, unreg) \
|
||||
TRACE_EVENT(name, __cpparg(proto), __cpparg(args), \
|
||||
__cpparg(tstruct), __cpparg(assign), __cpparg(print)) \
|
||||
|
||||
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
|
||||
|
||||
@@ -459,13 +460,15 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\
|
||||
* {
|
||||
* struct ring_buffer_event *event;
|
||||
* struct ftrace_raw_<call> *entry; <-- defined in stage 1
|
||||
* struct ring_buffer *buffer;
|
||||
* unsigned long irq_flags;
|
||||
* int pc;
|
||||
*
|
||||
* local_save_flags(irq_flags);
|
||||
* pc = preempt_count();
|
||||
*
|
||||
* event = trace_current_buffer_lock_reserve(event_<call>.id,
|
||||
* event = trace_current_buffer_lock_reserve(&buffer,
|
||||
* event_<call>.id,
|
||||
* sizeof(struct ftrace_raw_<call>),
|
||||
* irq_flags, pc);
|
||||
* if (!event)
|
||||
@@ -475,7 +478,7 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\
|
||||
* <assign>; <-- Here we assign the entries by the __field and
|
||||
* __array macros.
|
||||
*
|
||||
* trace_current_buffer_unlock_commit(event, irq_flags, pc);
|
||||
* trace_current_buffer_unlock_commit(buffer, event, irq_flags, pc);
|
||||
* }
|
||||
*
|
||||
* static int ftrace_raw_reg_event_<call>(struct ftrace_event_call *unused)
|
||||
@@ -567,6 +570,7 @@ static void ftrace_raw_event_##call(proto) \
|
||||
struct ftrace_event_call *event_call = &event_##call; \
|
||||
struct ring_buffer_event *event; \
|
||||
struct ftrace_raw_##call *entry; \
|
||||
struct ring_buffer *buffer; \
|
||||
unsigned long irq_flags; \
|
||||
int __data_size; \
|
||||
int pc; \
|
||||
@@ -576,7 +580,8 @@ static void ftrace_raw_event_##call(proto) \
|
||||
\
|
||||
__data_size = ftrace_get_offsets_##call(&__data_offsets, args); \
|
||||
\
|
||||
event = trace_current_buffer_lock_reserve(event_##call.id, \
|
||||
event = trace_current_buffer_lock_reserve(&buffer, \
|
||||
event_##call.id, \
|
||||
sizeof(*entry) + __data_size, \
|
||||
irq_flags, pc); \
|
||||
if (!event) \
|
||||
@@ -588,8 +593,9 @@ static void ftrace_raw_event_##call(proto) \
|
||||
\
|
||||
{ assign; } \
|
||||
\
|
||||
if (!filter_current_check_discard(event_call, entry, event)) \
|
||||
trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \
|
||||
if (!filter_current_check_discard(buffer, event_call, entry, event)) \
|
||||
trace_nowake_buffer_unlock_commit(buffer, \
|
||||
event, irq_flags, pc); \
|
||||
} \
|
||||
\
|
||||
static int ftrace_raw_reg_event_##call(struct ftrace_event_call *unused)\
|
||||
@@ -621,7 +627,6 @@ static int ftrace_raw_init_event_##call(struct ftrace_event_call *unused)\
|
||||
return -ENODEV; \
|
||||
event_##call.id = id; \
|
||||
INIT_LIST_HEAD(&event_##call.fields); \
|
||||
init_preds(&event_##call); \
|
||||
return 0; \
|
||||
} \
|
||||
\
|
||||
|
Reference in New Issue
Block a user