@@ -263,6 +263,9 @@ static struct trace_event_fields trace_event_fields_##call[] = { \
263263 tstruct \
264264 {} };
265265
266+ #undef DECLARE_EVENT_SYSCALL_CLASS
267+ #define DECLARE_EVENT_SYSCALL_CLASS DECLARE_EVENT_CLASS
268+
266269#undef DEFINE_EVENT_PRINT
267270#define DEFINE_EVENT_PRINT (template , name , proto , args , print )
268271
@@ -396,11 +399,11 @@ static inline notrace int trace_event_get_offsets_##call( \
396399
397400#include "stages/stage6_event_callback.h"
398401
399- #undef DECLARE_EVENT_CLASS
400- #define DECLARE_EVENT_CLASS ( call , proto , args , tstruct , assign , print ) \
401- \
402+
403+ #undef __DECLARE_EVENT_CLASS
404+ #define __DECLARE_EVENT_CLASS ( call , proto , args , tstruct , assign , print ) \
402405static notrace void \
403- trace_event_raw_event_ ##call(void *__data, proto) \
406+ do_trace_event_raw_event_ ##call(void *__data, proto) \
404407{ \
405408 struct trace_event_file *trace_file = __data; \
406409 struct trace_event_data_offsets_##call __maybe_unused __data_offsets;\
@@ -425,15 +428,35 @@ trace_event_raw_event_##call(void *__data, proto) \
425428 \
426429 trace_event_buffer_commit(&fbuffer); \
427430}
431+
432+ #undef DECLARE_EVENT_CLASS
433+ #define DECLARE_EVENT_CLASS (call , proto , args , tstruct , assign , print ) \
434+ __DECLARE_EVENT_CLASS(call, PARAMS(proto), PARAMS(args), PARAMS(tstruct), \
435+ PARAMS(assign), PARAMS(print)) \
436+ static notrace void \
437+ trace_event_raw_event_##call(void *__data, proto) \
438+ { \
439+ do_trace_event_raw_event_##call(__data, args); \
440+ }
441+
442+ #undef DECLARE_EVENT_SYSCALL_CLASS
443+ #define DECLARE_EVENT_SYSCALL_CLASS (call , proto , args , tstruct , assign , print ) \
444+ __DECLARE_EVENT_CLASS(call, PARAMS(proto), PARAMS(args), PARAMS(tstruct), \
445+ PARAMS(assign), PARAMS(print)) \
446+ static notrace void \
447+ trace_event_raw_event_##call(void *__data, proto) \
448+ { \
449+ preempt_disable_notrace(); \
450+ do_trace_event_raw_event_##call(__data, args); \
451+ preempt_enable_notrace(); \
452+ }
453+
428454/*
429455 * The ftrace_test_probe is compiled out, it is only here as a build time check
430456 * to make sure that if the tracepoint handling changes, the ftrace probe will
431457 * fail to compile unless it too is updated.
432458 */
433459
434- #undef DECLARE_EVENT_SYSCALL_CLASS
435- #define DECLARE_EVENT_SYSCALL_CLASS DECLARE_EVENT_CLASS
436-
437460#undef DEFINE_EVENT
438461#define DEFINE_EVENT (template , call , proto , args ) \
439462static inline void ftrace_test_probe_##call(void) \
@@ -443,6 +466,8 @@ static inline void ftrace_test_probe_##call(void) \
443466
444467#include TRACE_INCLUDE (TRACE_INCLUDE_FILE )
445468
469+ #undef __DECLARE_EVENT_CLASS
470+
446471#include "stages/stage7_class_define.h"
447472
448473#undef DECLARE_EVENT_CLASS
0 commit comments