1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM benchmark
3 
4 #if !defined(_TRACE_BENCHMARK_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_BENCHMARK_H
6 
7 #include <linux/tracepoint.h>
8 
9 extern int trace_benchmark_reg(void);
10 extern void trace_benchmark_unreg(void);
11 
12 #define BENCHMARK_EVENT_STRLEN		128
13 
14 TRACE_EVENT_FN(benchmark_event,
15 
16 	TP_PROTO(const char *str),
17 
18 	TP_ARGS(str),
19 
20 	TP_STRUCT__entry(
21 		__array(	char,	str,	BENCHMARK_EVENT_STRLEN	)
22 	),
23 
24 	TP_fast_assign(
25 		memcpy(__entry->str, str, BENCHMARK_EVENT_STRLEN);
26 	),
27 
28 	TP_printk("%s", __entry->str),
29 
30 	trace_benchmark_reg, trace_benchmark_unreg
31 );
32 
33 #endif /* _TRACE_BENCHMARK_H */
34 
35 #undef TRACE_INCLUDE_FILE
36 #undef TRACE_INCLUDE_PATH
37 #define TRACE_INCLUDE_PATH .
38 #define TRACE_INCLUDE_FILE trace_benchmark
39 
40 /* This part must be outside protection */
41 #include <trace/define_trace.h>
42