File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,14 @@ struct ftrace_event_call {
198198#endif
199199};
200200
201+ #define __TRACE_EVENT_FLAGS (name , value ) \
202+ static int __init trace_init_flags_##name(void) \
203+ { \
204+ event_##name.flags = value; \
205+ return 0; \
206+ } \
207+ early_initcall(trace_init_flags_##name);
208+
201209#define PERF_MAX_TRACE_SIZE 2048
202210
203211#define MAX_FILTER_PRED 32
Original file line number Diff line number Diff line change @@ -137,7 +137,8 @@ extern struct trace_event_functions exit_syscall_print_funcs;
137137 .class = &event_class_syscall_enter, \
138138 .event.funcs = &enter_syscall_print_funcs, \
139139 .data = (void *)&__syscall_meta_##sname,\
140- }
140+ }; \
141+ __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY)
141142
142143#define SYSCALL_TRACE_EXIT_EVENT (sname ) \
143144 static struct syscall_metadata \
@@ -152,7 +153,8 @@ extern struct trace_event_functions exit_syscall_print_funcs;
152153 .class = &event_class_syscall_exit, \
153154 .event.funcs = &exit_syscall_print_funcs, \
154155 .data = (void *)&__syscall_meta_##sname,\
155- }
156+ }; \
157+ __TRACE_EVENT_FLAGS(exit_##sname, TRACE_EVENT_FL_CAP_ANY)
156158
157159#define SYSCALL_METADATA (sname , nb ) \
158160 SYSCALL_TRACE_ENTER_EVENT(sname); \
Original file line number Diff line number Diff line change 8484
8585#undef TRACE_EVENT_FLAGS
8686#define TRACE_EVENT_FLAGS (name , value ) \
87- static int __init trace_init_flags_##name(void) \
88- { \
89- event_##name.flags = value; \
90- return 0; \
91- } \
92- early_initcall(trace_init_flags_##name);
87+ __TRACE_EVENT_FLAGS(name, value)
9388
9489#include TRACE_INCLUDE (TRACE_INCLUDE_FILE )
9590
You can’t perform that action at this time.
0 commit comments