1 
2 #define __app__(x, y) str__##x##y
3 #define __app(x, y) __app__(x, y)
4 
5 #define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
6 
7 #define TRACE_MAKE_SYSTEM_STR()				\
8 	static const char TRACE_SYSTEM_STRING[] =	\
9 		__stringify(TRACE_SYSTEM)
10 
11 TRACE_MAKE_SYSTEM_STR();
12 
13 #undef TRACE_DEFINE_ENUM
14 #define TRACE_DEFINE_ENUM(a)				\
15 	static struct trace_eval_map __used __initdata	\
16 	__##TRACE_SYSTEM##_##a =			\
17 	{						\
18 		.system = TRACE_SYSTEM_STRING,		\
19 		.eval_string = #a,			\
20 		.eval_value = a				\
21 	};						\
22 	static struct trace_eval_map __used		\
23 	__section("_ftrace_eval_map")			\
24 	*TRACE_SYSTEM##_##a = &__##TRACE_SYSTEM##_##a
25 
26 #undef TRACE_DEFINE_SIZEOF
27 #define TRACE_DEFINE_SIZEOF(a)				\
28 	static struct trace_eval_map __used __initdata	\
29 	__##TRACE_SYSTEM##_##a =			\
30 	{						\
31 		.system = TRACE_SYSTEM_STRING,		\
32 		.eval_string = "sizeof(" #a ")",	\
33 		.eval_value = sizeof(a)			\
34 	};						\
35 	static struct trace_eval_map __used		\
36 	__section("_ftrace_eval_map")			\
37 	*TRACE_SYSTEM##_##a = &__##TRACE_SYSTEM##_##a
38