aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/ftrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/ftrace.h')
-rw-r--r--include/trace/ftrace.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 1016b216293..f282885057d 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -768,7 +768,6 @@ perf_trace_templ_##call(struct ftrace_event_call *event_call, \
768 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ 768 struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\
769 struct ftrace_raw_##call *entry; \ 769 struct ftrace_raw_##call *entry; \
770 u64 __addr = 0, __count = 1; \ 770 u64 __addr = 0, __count = 1; \
771 unsigned long irq_flags; \
772 int __entry_size; \ 771 int __entry_size; \
773 int __data_size; \ 772 int __data_size; \
774 int rctx; \ 773 int rctx; \
@@ -781,17 +780,18 @@ perf_trace_templ_##call(struct ftrace_event_call *event_call, \
781 if (WARN_ONCE(__entry_size > PERF_MAX_TRACE_SIZE, \ 780 if (WARN_ONCE(__entry_size > PERF_MAX_TRACE_SIZE, \
782 "profile buffer not large enough")) \ 781 "profile buffer not large enough")) \
783 return; \ 782 return; \
783 \
784 entry = (struct ftrace_raw_##call *)perf_trace_buf_prepare( \ 784 entry = (struct ftrace_raw_##call *)perf_trace_buf_prepare( \
785 __entry_size, event_call->id, &rctx, &irq_flags); \ 785 __entry_size, event_call->id, __regs, &rctx); \
786 if (!entry) \ 786 if (!entry) \
787 return; \ 787 return; \
788 \
788 tstruct \ 789 tstruct \
789 \ 790 \
790 { assign; } \ 791 { assign; } \
791 \ 792 \
792 perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ 793 perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \
793 __count, irq_flags, __regs, \ 794 __count, __regs, event_call->perf_data); \
794 event_call->perf_data); \
795} 795}
796 796
797#undef DEFINE_EVENT 797#undef DEFINE_EVENT
@@ -799,13 +799,10 @@ perf_trace_templ_##call(struct ftrace_event_call *event_call, \
799static notrace void perf_trace_##call(proto) \ 799static notrace void perf_trace_##call(proto) \
800{ \ 800{ \
801 struct ftrace_event_call *event_call = &event_##call; \ 801 struct ftrace_event_call *event_call = &event_##call; \
802 struct pt_regs *__regs = &get_cpu_var(perf_trace_regs); \ 802 struct pt_regs __regs; \
803 \
804 perf_fetch_caller_regs(__regs, 1); \
805 \
806 perf_trace_templ_##template(event_call, __regs, args); \
807 \ 803 \
808 put_cpu_var(perf_trace_regs); \ 804 perf_fetch_caller_regs(&__regs, 1); \
805 perf_trace_templ_##template(event_call, &__regs, args); \
809} 806}
810 807
811#undef DEFINE_EVENT_PRINT 808#undef DEFINE_EVENT_PRINT