aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-09 16:00:22 -0400
committerSteven Rostedt <srostedt@redhat.com>2009-03-10 00:35:05 -0400
commit9cc26a261d43e5898287a1f5808132f8f05ceb1c (patch)
treecf00e838e7f026d20500d8f90191230ed3f41078
parent2939b0469d04ba9ac791aca9a81625d7eb50662b (diff)
tracing: use generic __stringify
Impact: clean up This removes the custom made STR(x) macros in the tracer and uses the generic __stringify macro instead. Signed-off-by: Steven Rostedt <srostedt@redhat.com>
-rw-r--r--kernel/trace/events.c4
-rw-r--r--kernel/trace/trace_events_stage_3.h4
-rw-r--r--kernel/trace/trace_selftest.c6
3 files changed, 5 insertions, 9 deletions
diff --git a/kernel/trace/events.c b/kernel/trace/events.c
index f2509cbaacea..9fc918da404f 100644
--- a/kernel/trace/events.c
+++ b/kernel/trace/events.c
@@ -2,9 +2,7 @@
2 * This is the place to register all trace points as events. 2 * This is the place to register all trace points as events.
3 */ 3 */
4 4
5/* someday this needs to go in a generic header */ 5#include <linux/stringify.h>
6#define __STR(x) #x
7#define STR(x) __STR(x)
8 6
9#include <trace/trace_events.h> 7#include <trace/trace_events.h>
10 8
diff --git a/kernel/trace/trace_events_stage_3.h b/kernel/trace/trace_events_stage_3.h
index 557ca52bcdcd..41b82b93c9c7 100644
--- a/kernel/trace/trace_events_stage_3.h
+++ b/kernel/trace/trace_events_stage_3.h
@@ -139,7 +139,7 @@ static struct ftrace_event_call __used \
139__attribute__((__aligned__(4))) \ 139__attribute__((__aligned__(4))) \
140__attribute__((section("_ftrace_events"))) event_##call = { \ 140__attribute__((section("_ftrace_events"))) event_##call = { \
141 .name = #call, \ 141 .name = #call, \
142 .system = STR(TRACE_SYSTEM), \ 142 .system = __stringify(TRACE_SYSTEM), \
143 .regfunc = ftrace_reg_event_##call, \ 143 .regfunc = ftrace_reg_event_##call, \
144 .unregfunc = ftrace_unreg_event_##call, \ 144 .unregfunc = ftrace_unreg_event_##call, \
145} 145}
@@ -225,7 +225,7 @@ static struct ftrace_event_call __used \
225__attribute__((__aligned__(4))) \ 225__attribute__((__aligned__(4))) \
226__attribute__((section("_ftrace_events"))) event_##call = { \ 226__attribute__((section("_ftrace_events"))) event_##call = { \
227 .name = #call, \ 227 .name = #call, \
228 .system = STR(TRACE_SYSTEM), \ 228 .system = __stringify(TRACE_SYSTEM), \
229 .regfunc = ftrace_reg_event_##call, \ 229 .regfunc = ftrace_reg_event_##call, \
230 .unregfunc = ftrace_unreg_event_##call, \ 230 .unregfunc = ftrace_unreg_event_##call, \
231 .raw_init = ftrace_raw_init_event_##call, \ 231 .raw_init = ftrace_raw_init_event_##call, \
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index 7238646b8723..f907a2b29028 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -1,5 +1,6 @@
1/* Include in trace.c */ 1/* Include in trace.c */
2 2
3#include <linux/stringify.h>
3#include <linux/kthread.h> 4#include <linux/kthread.h>
4#include <linux/delay.h> 5#include <linux/delay.h>
5 6
@@ -100,9 +101,6 @@ static inline void warn_failed_init_tracer(struct tracer *trace, int init_ret)
100 101
101#ifdef CONFIG_DYNAMIC_FTRACE 102#ifdef CONFIG_DYNAMIC_FTRACE
102 103
103#define __STR(x) #x
104#define STR(x) __STR(x)
105
106/* Test dynamic code modification and ftrace filters */ 104/* Test dynamic code modification and ftrace filters */
107int trace_selftest_startup_dynamic_tracing(struct tracer *trace, 105int trace_selftest_startup_dynamic_tracing(struct tracer *trace,
108 struct trace_array *tr, 106 struct trace_array *tr,
@@ -130,7 +128,7 @@ int trace_selftest_startup_dynamic_tracing(struct tracer *trace,
130 * start of the function names. We simply put a '*' to 128 * start of the function names. We simply put a '*' to
131 * accommodate them. 129 * accommodate them.
132 */ 130 */
133 func_name = "*" STR(DYN_FTRACE_TEST_NAME); 131 func_name = "*" __stringify(DYN_FTRACE_TEST_NAME);
134 132
135 /* filter only on our function */ 133 /* filter only on our function */
136 ftrace_set_filter(func_name, strlen(func_name), 1); 134 ftrace_set_filter(func_name, strlen(func_name), 1);