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.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 2f9b95b6d3fb..37d4b10b111d 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -33,6 +33,19 @@
33 33
34TRACE_MAKE_SYSTEM_STR(); 34TRACE_MAKE_SYSTEM_STR();
35 35
36#undef TRACE_DEFINE_ENUM
37#define TRACE_DEFINE_ENUM(a) \
38 static struct trace_enum_map __used __initdata \
39 __##TRACE_SYSTEM##_##a = \
40 { \
41 .system = TRACE_SYSTEM_STRING, \
42 .enum_string = #a, \
43 .enum_value = a \
44 }; \
45 static struct trace_enum_map __used \
46 __attribute__((section("_ftrace_enum_map"))) \
47 *TRACE_SYSTEM##_##a = &__##TRACE_SYSTEM##_##a
48
36/* 49/*
37 * DECLARE_EVENT_CLASS can be used to add a generic function 50 * DECLARE_EVENT_CLASS can be used to add a generic function
38 * handlers for events. That is, if all events have the same 51 * handlers for events. That is, if all events have the same
@@ -136,6 +149,9 @@ TRACE_MAKE_SYSTEM_STR();
136 * The size of an array is also encoded, in the higher 16 bits of <item>. 149 * The size of an array is also encoded, in the higher 16 bits of <item>.
137 */ 150 */
138 151
152#undef TRACE_DEFINE_ENUM
153#define TRACE_DEFINE_ENUM(a)
154
139#undef __field 155#undef __field
140#define __field(type, item) 156#define __field(type, item)
141 157
@@ -553,7 +569,7 @@ static inline notrace int ftrace_get_offsets_##call( \
553 * .trace = ftrace_raw_output_<call>, <-- stage 2 569 * .trace = ftrace_raw_output_<call>, <-- stage 2
554 * }; 570 * };
555 * 571 *
556 * static const char print_fmt_<call>[] = <TP_printk>; 572 * static char print_fmt_<call>[] = <TP_printk>;
557 * 573 *
558 * static struct ftrace_event_class __used event_class_<template> = { 574 * static struct ftrace_event_class __used event_class_<template> = {
559 * .system = "<system>", 575 * .system = "<system>",
@@ -704,7 +720,7 @@ static inline void ftrace_test_probe_##call(void) \
704#undef DECLARE_EVENT_CLASS 720#undef DECLARE_EVENT_CLASS
705#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ 721#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
706_TRACE_PERF_PROTO(call, PARAMS(proto)); \ 722_TRACE_PERF_PROTO(call, PARAMS(proto)); \
707static const char print_fmt_##call[] = print; \ 723static char print_fmt_##call[] = print; \
708static struct ftrace_event_class __used __refdata event_class_##call = { \ 724static struct ftrace_event_class __used __refdata event_class_##call = { \
709 .system = TRACE_SYSTEM_STRING, \ 725 .system = TRACE_SYSTEM_STRING, \
710 .define_fields = ftrace_define_fields_##call, \ 726 .define_fields = ftrace_define_fields_##call, \
@@ -733,7 +749,7 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
733#undef DEFINE_EVENT_PRINT 749#undef DEFINE_EVENT_PRINT
734#define DEFINE_EVENT_PRINT(template, call, proto, args, print) \ 750#define DEFINE_EVENT_PRINT(template, call, proto, args, print) \
735 \ 751 \
736static const char print_fmt_##call[] = print; \ 752static char print_fmt_##call[] = print; \
737 \ 753 \
738static struct ftrace_event_call __used event_##call = { \ 754static struct ftrace_event_call __used event_##call = { \
739 .class = &event_class_##template, \ 755 .class = &event_class_##template, \