@@ -263,6 +263,9 @@ static struct trace_event_fields trace_event_fields_##call[] = { \
263
263
tstruct \
264
264
{} };
265
265
266
+ #undef DECLARE_EVENT_SYSCALL_CLASS
267
+ #define DECLARE_EVENT_SYSCALL_CLASS DECLARE_EVENT_CLASS
268
+
266
269
#undef DEFINE_EVENT_PRINT
267
270
#define DEFINE_EVENT_PRINT (template , name , proto , args , print )
268
271
@@ -396,11 +399,11 @@ static inline notrace int trace_event_get_offsets_##call( \
396
399
397
400
#include "stages/stage6_event_callback.h"
398
401
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 ) \
402
405
static notrace void \
403
- trace_event_raw_event_ ##call(void *__data, proto) \
406
+ do_trace_event_raw_event_ ##call(void *__data, proto) \
404
407
{ \
405
408
struct trace_event_file *trace_file = __data; \
406
409
struct trace_event_data_offsets_##call __maybe_unused __data_offsets;\
@@ -425,15 +428,35 @@ trace_event_raw_event_##call(void *__data, proto) \
425
428
\
426
429
trace_event_buffer_commit(&fbuffer); \
427
430
}
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
+
428
454
/*
429
455
* The ftrace_test_probe is compiled out, it is only here as a build time check
430
456
* to make sure that if the tracepoint handling changes, the ftrace probe will
431
457
* fail to compile unless it too is updated.
432
458
*/
433
459
434
- #undef DECLARE_EVENT_SYSCALL_CLASS
435
- #define DECLARE_EVENT_SYSCALL_CLASS DECLARE_EVENT_CLASS
436
-
437
460
#undef DEFINE_EVENT
438
461
#define DEFINE_EVENT (template , call , proto , args ) \
439
462
static inline void ftrace_test_probe_##call(void) \
@@ -443,6 +466,8 @@ static inline void ftrace_test_probe_##call(void) \
443
466
444
467
#include TRACE_INCLUDE (TRACE_INCLUDE_FILE )
445
468
469
+ #undef __DECLARE_EVENT_CLASS
470
+
446
471
#include "stages/stage7_class_define.h"
447
472
448
473
#undef DECLARE_EVENT_CLASS
0 commit comments