aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/ftrace.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-18 11:19:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-18 11:19:03 -0400
commit4d7b4ac22fbec1a03206c6cde353f2fd6942f828 (patch)
tree2d96a9e9c28cf6fa628a278decc00ad55a8b043b /include/trace/ftrace.h
parent3aaf51ace5975050ab43c7d4d7e439e0ae7d13d7 (diff)
parent94f3ca95787ada3d64339a4ecb2754236ab563f6 (diff)
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (311 commits) perf tools: Add mode to build without newt support perf symbols: symbol inconsistency message should be done only at verbose=1 perf tui: Add explicit -lslang option perf options: Type check all the remaining OPT_ variants perf options: Type check OPT_BOOLEAN and fix the offenders perf options: Check v type in OPT_U?INTEGER perf options: Introduce OPT_UINTEGER perf tui: Add workaround for slang < 2.1.4 perf record: Fix bug mismatch with -c option definition perf options: Introduce OPT_U64 perf tui: Add help window to show key associations perf tui: Make <- exit menus too perf newt: Add single key shortcuts for zoom into DSO and threads perf newt: Exit browser unconditionally when CTRL+C, q or Q is pressed perf newt: Fix the 'A'/'a' shortcut for annotate perf newt: Make <- exit the ui_browser x86, perf: P4 PMU - fix counters management logic perf newt: Make <- zoom out filters perf report: Report number of events, not samples perf hist: Clarify events_stats fields usage ... Fix up trivial conflicts in kernel/fork.c and tools/perf/builtin-record.c
Diffstat (limited to 'include/trace/ftrace.h')
-rw-r--r--include/trace/ftrace.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 75dd7787fb37..16253db38d73 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -763,13 +763,12 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
763#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ 763#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
764static notrace void \ 764static notrace void \
765perf_trace_templ_##call(struct ftrace_event_call *event_call, \ 765perf_trace_templ_##call(struct ftrace_event_call *event_call, \
766 proto) \ 766 struct pt_regs *__regs, proto) \
767{ \ 767{ \
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; \ 771 unsigned long irq_flags; \
772 struct pt_regs *__regs; \
773 int __entry_size; \ 772 int __entry_size; \
774 int __data_size; \ 773 int __data_size; \
775 int rctx; \ 774 int rctx; \
@@ -790,20 +789,22 @@ perf_trace_templ_##call(struct ftrace_event_call *event_call, \
790 \ 789 \
791 { assign; } \ 790 { assign; } \
792 \ 791 \
793 __regs = &__get_cpu_var(perf_trace_regs); \
794 perf_fetch_caller_regs(__regs, 2); \
795 \
796 perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \ 792 perf_trace_buf_submit(entry, __entry_size, rctx, __addr, \
797 __count, irq_flags, __regs); \ 793 __count, irq_flags, __regs); \
798} 794}
799 795
800#undef DEFINE_EVENT 796#undef DEFINE_EVENT
801#define DEFINE_EVENT(template, call, proto, args) \ 797#define DEFINE_EVENT(template, call, proto, args) \
802static notrace void perf_trace_##call(proto) \ 798static notrace void perf_trace_##call(proto) \
803{ \ 799{ \
804 struct ftrace_event_call *event_call = &event_##call; \ 800 struct ftrace_event_call *event_call = &event_##call; \
805 \ 801 struct pt_regs *__regs = &get_cpu_var(perf_trace_regs); \
806 perf_trace_templ_##template(event_call, args); \ 802 \
803 perf_fetch_caller_regs(__regs, 1); \
804 \
805 perf_trace_templ_##template(event_call, __regs, args); \
806 \
807 put_cpu_var(perf_trace_regs); \
807} 808}
808 809
809#undef DEFINE_EVENT_PRINT 810#undef DEFINE_EVENT_PRINT