aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/ftrace.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-05-17 22:26:53 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-05-18 00:35:23 -0400
commitf0218b3e9974f06014b61be8987159f4a20e011e (patch)
tree29a593c4d71ab18cb0c450a34e79bf6bea66877e /include/trace/ftrace.h
parent1eaa4787a774c4896518c81f24e8bccaa2244924 (diff)
parent9d192e118a094087494997ea1c8a2faf39af38c5 (diff)
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip into trace/tip/tracing/core-6
Conflicts: include/trace/ftrace.h kernel/trace/trace_kprobe.c Acked-by: Masami Hiramatsu <mhiramat@redhat.com> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'include/trace/ftrace.h')
-rw-r--r--include/trace/ftrace.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 4866c109fa9a..e0e8daa6767e 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -695,13 +695,15 @@ perf_trace_##call(void *__data, proto) \
695 struct ftrace_event_call *event_call = __data; \ 695 struct ftrace_event_call *event_call = __data; \
696 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ 696 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\
697 struct ftrace_raw_##call *entry; \ 697 struct ftrace_raw_##call *entry; \
698 struct pt_regs *__regs = &get_cpu_var(perf_trace_regs); \
698 u64 __addr = 0, __count = 1; \ 699 u64 __addr = 0, __count = 1; \
699 unsigned long irq_flags; \ 700 unsigned long irq_flags; \
700 struct pt_regs *__regs; \
701 int __entry_size; \ 701 int __entry_size; \
702 int __data_size; \ 702 int __data_size; \
703 int rctx; \ 703 int rctx; \
704 \ 704 \
705 perf_fetch_caller_regs(__regs, 1); \
706 \
705 __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ 707 __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \
706 __entry_size = ALIGN(__data_size + sizeof(*entry) + sizeof(u32),\ 708 __entry_size = ALIGN(__data_size + sizeof(*entry) + sizeof(u32),\
707 sizeof(u64)); \ 709 sizeof(u64)); \
@@ -709,20 +711,19 @@ perf_trace_##call(void *__data, proto) \
709 \ 711 \
710 if (WARN_ONCE(__entry_size > PERF_MAX_TRACE_SIZE, \ 712 if (WARN_ONCE(__entry_size > PERF_MAX_TRACE_SIZE, \
711 "profile buffer not large enough")) \ 713 "profile buffer not large enough")) \
712 return; \ 714 goto out; \
713 entry = (struct ftrace_raw_##call *)perf_trace_buf_prepare( \ 715 entry = (struct ftrace_raw_##call *)perf_trace_buf_prepare( \
714 __entry_size, event_call->event.type, &rctx, &irq_flags); \ 716 __entry_size, event_call->event.type, &rctx, &irq_flags); \
715 if (!entry) \ 717 if (!entry) \
716 return; \ 718 goto out; \
717 tstruct \ 719 tstruct \
718 \ 720 \
719 { assign; } \ 721 { assign; } \
720 \ 722 \
721 __regs = &__get_cpu_var(perf_trace_regs); \
722 perf_fetch_caller_regs(__regs, 2); \
723 \
724 perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ 723 perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \
725 __count, irq_flags, __regs); \ 724 __count, irq_flags, __regs); \
725 out: \
726 put_cpu_var(perf_trace_regs); \
726} 727}
727 728
728/* 729/*