]> git.baikalelectronics.ru Git - kernel.git/commitdiff
tracing: Rename the staging files for trace_events
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 29 Mar 2022 20:50:44 +0000 (16:50 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Sat, 2 Apr 2022 12:40:04 +0000 (08:40 -0400)
When looking for implementation of different phases of the creation of the
TRACE_EVENT() macro, it is pretty useless when all helper macro
redefinitions are in files labeled "stageX_defines.h". Rename them to
state which phase the files are for. For instance, when looking for the
defines that are used to create the event fields, seeing
"stage4_event_fields.h" gives the developer a good idea that the defines
are in that file.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
16 files changed:
include/trace/stages/stage1_defines.h [deleted file]
include/trace/stages/stage1_struct_define.h [new file with mode: 0644]
include/trace/stages/stage2_data_offsets.h [new file with mode: 0644]
include/trace/stages/stage2_defines.h [deleted file]
include/trace/stages/stage3_defines.h [deleted file]
include/trace/stages/stage3_trace_output.h [new file with mode: 0644]
include/trace/stages/stage4_defines.h [deleted file]
include/trace/stages/stage4_event_fields.h [new file with mode: 0644]
include/trace/stages/stage5_defines.h [deleted file]
include/trace/stages/stage5_get_offsets.h [new file with mode: 0644]
include/trace/stages/stage6_defines.h [deleted file]
include/trace/stages/stage6_event_callback.h [new file with mode: 0644]
include/trace/stages/stage7_class_define.h [new file with mode: 0644]
include/trace/stages/stage7_defines.h [deleted file]
include/trace/trace_custom_events.h
include/trace/trace_events.h

diff --git a/include/trace/stages/stage1_defines.h b/include/trace/stages/stage1_defines.h
deleted file mode 100644 (file)
index a167834..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-/* Stage 1 definitions for creating trace events */
-
-#undef __field
-#define __field(type, item)            type    item;
-
-#undef __field_ext
-#define __field_ext(type, item, filter_type)   type    item;
-
-#undef __field_struct
-#define __field_struct(type, item)     type    item;
-
-#undef __field_struct_ext
-#define __field_struct_ext(type, item, filter_type)    type    item;
-
-#undef __array
-#define __array(type, item, len)       type    item[len];
-
-#undef __dynamic_array
-#define __dynamic_array(type, item, len) u32 __data_loc_##item;
-
-#undef __string
-#define __string(item, src) __dynamic_array(char, item, -1)
-
-#undef __string_len
-#define __string_len(item, src, len) __dynamic_array(char, item, -1)
-
-#undef __bitmask
-#define __bitmask(item, nr_bits) __dynamic_array(char, item, -1)
-
-#undef __sockaddr
-#define __sockaddr(field, len) __dynamic_array(u8, field, len)
-
-#undef __rel_dynamic_array
-#define __rel_dynamic_array(type, item, len) u32 __rel_loc_##item;
-
-#undef __rel_string
-#define __rel_string(item, src) __rel_dynamic_array(char, item, -1)
-
-#undef __rel_string_len
-#define __rel_string_len(item, src, len) __rel_dynamic_array(char, item, -1)
-
-#undef __rel_bitmask
-#define __rel_bitmask(item, nr_bits) __rel_dynamic_array(char, item, -1)
-
-#undef __rel_sockaddr
-#define __rel_sockaddr(field, len) __rel_dynamic_array(u8, field, len)
-
-#undef TP_STRUCT__entry
-#define TP_STRUCT__entry(args...) args
diff --git a/include/trace/stages/stage1_struct_define.h b/include/trace/stages/stage1_struct_define.h
new file mode 100644 (file)
index 0000000..a167834
--- /dev/null
@@ -0,0 +1,51 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+/* Stage 1 definitions for creating trace events */
+
+#undef __field
+#define __field(type, item)            type    item;
+
+#undef __field_ext
+#define __field_ext(type, item, filter_type)   type    item;
+
+#undef __field_struct
+#define __field_struct(type, item)     type    item;
+
+#undef __field_struct_ext
+#define __field_struct_ext(type, item, filter_type)    type    item;
+
+#undef __array
+#define __array(type, item, len)       type    item[len];
+
+#undef __dynamic_array
+#define __dynamic_array(type, item, len) u32 __data_loc_##item;
+
+#undef __string
+#define __string(item, src) __dynamic_array(char, item, -1)
+
+#undef __string_len
+#define __string_len(item, src, len) __dynamic_array(char, item, -1)
+
+#undef __bitmask
+#define __bitmask(item, nr_bits) __dynamic_array(char, item, -1)
+
+#undef __sockaddr
+#define __sockaddr(field, len) __dynamic_array(u8, field, len)
+
+#undef __rel_dynamic_array
+#define __rel_dynamic_array(type, item, len) u32 __rel_loc_##item;
+
+#undef __rel_string
+#define __rel_string(item, src) __rel_dynamic_array(char, item, -1)
+
+#undef __rel_string_len
+#define __rel_string_len(item, src, len) __rel_dynamic_array(char, item, -1)
+
+#undef __rel_bitmask
+#define __rel_bitmask(item, nr_bits) __rel_dynamic_array(char, item, -1)
+
+#undef __rel_sockaddr
+#define __rel_sockaddr(field, len) __rel_dynamic_array(u8, field, len)
+
+#undef TP_STRUCT__entry
+#define TP_STRUCT__entry(args...) args
diff --git a/include/trace/stages/stage2_data_offsets.h b/include/trace/stages/stage2_data_offsets.h
new file mode 100644 (file)
index 0000000..42fd1e8
--- /dev/null
@@ -0,0 +1,54 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+/* Stage 2 definitions for creating trace events */
+
+#undef TRACE_DEFINE_ENUM
+#define TRACE_DEFINE_ENUM(a)
+
+#undef TRACE_DEFINE_SIZEOF
+#define TRACE_DEFINE_SIZEOF(a)
+
+#undef __field
+#define __field(type, item)
+
+#undef __field_ext
+#define __field_ext(type, item, filter_type)
+
+#undef __field_struct
+#define __field_struct(type, item)
+
+#undef __field_struct_ext
+#define __field_struct_ext(type, item, filter_type)
+
+#undef __array
+#define __array(type, item, len)
+
+#undef __dynamic_array
+#define __dynamic_array(type, item, len)       u32 item;
+
+#undef __string
+#define __string(item, src) __dynamic_array(char, item, -1)
+
+#undef __string_len
+#define __string_len(item, src, len) __dynamic_array(char, item, -1)
+
+#undef __bitmask
+#define __bitmask(item, nr_bits) __dynamic_array(unsigned long, item, -1)
+
+#undef __sockaddr
+#define __sockaddr(field, len) __dynamic_array(u8, field, len)
+
+#undef __rel_dynamic_array
+#define __rel_dynamic_array(type, item, len)   u32 item;
+
+#undef __rel_string
+#define __rel_string(item, src) __rel_dynamic_array(char, item, -1)
+
+#undef __rel_string_len
+#define __rel_string_len(item, src, len) __rel_dynamic_array(char, item, -1)
+
+#undef __rel_bitmask
+#define __rel_bitmask(item, nr_bits) __rel_dynamic_array(unsigned long, item, -1)
+
+#undef __rel_sockaddr
+#define __rel_sockaddr(field, len) __rel_dynamic_array(u8, field, len)
diff --git a/include/trace/stages/stage2_defines.h b/include/trace/stages/stage2_defines.h
deleted file mode 100644 (file)
index 42fd1e8..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-/* Stage 2 definitions for creating trace events */
-
-#undef TRACE_DEFINE_ENUM
-#define TRACE_DEFINE_ENUM(a)
-
-#undef TRACE_DEFINE_SIZEOF
-#define TRACE_DEFINE_SIZEOF(a)
-
-#undef __field
-#define __field(type, item)
-
-#undef __field_ext
-#define __field_ext(type, item, filter_type)
-
-#undef __field_struct
-#define __field_struct(type, item)
-
-#undef __field_struct_ext
-#define __field_struct_ext(type, item, filter_type)
-
-#undef __array
-#define __array(type, item, len)
-
-#undef __dynamic_array
-#define __dynamic_array(type, item, len)       u32 item;
-
-#undef __string
-#define __string(item, src) __dynamic_array(char, item, -1)
-
-#undef __string_len
-#define __string_len(item, src, len) __dynamic_array(char, item, -1)
-
-#undef __bitmask
-#define __bitmask(item, nr_bits) __dynamic_array(unsigned long, item, -1)
-
-#undef __sockaddr
-#define __sockaddr(field, len) __dynamic_array(u8, field, len)
-
-#undef __rel_dynamic_array
-#define __rel_dynamic_array(type, item, len)   u32 item;
-
-#undef __rel_string
-#define __rel_string(item, src) __rel_dynamic_array(char, item, -1)
-
-#undef __rel_string_len
-#define __rel_string_len(item, src, len) __rel_dynamic_array(char, item, -1)
-
-#undef __rel_bitmask
-#define __rel_bitmask(item, nr_bits) __rel_dynamic_array(unsigned long, item, -1)
-
-#undef __rel_sockaddr
-#define __rel_sockaddr(field, len) __rel_dynamic_array(u8, field, len)
diff --git a/include/trace/stages/stage3_defines.h b/include/trace/stages/stage3_defines.h
deleted file mode 100644 (file)
index e3b183e..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-/* Stage 3 definitions for creating trace events */
-
-#undef __entry
-#define __entry field
-
-#undef TP_printk
-#define TP_printk(fmt, args...) fmt "\n", args
-
-#undef __get_dynamic_array
-#define __get_dynamic_array(field)     \
-               ((void *)__entry + (__entry->__data_loc_##field & 0xffff))
-
-#undef __get_dynamic_array_len
-#define __get_dynamic_array_len(field) \
-               ((__entry->__data_loc_##field >> 16) & 0xffff)
-
-#undef __get_str
-#define __get_str(field) ((char *)__get_dynamic_array(field))
-
-#undef __get_rel_dynamic_array
-#define __get_rel_dynamic_array(field)                                 \
-               ((void *)__entry +                                      \
-                offsetof(typeof(*__entry), __rel_loc_##field) +        \
-                sizeof(__entry->__rel_loc_##field) +                   \
-                (__entry->__rel_loc_##field & 0xffff))
-
-#undef __get_rel_dynamic_array_len
-#define __get_rel_dynamic_array_len(field)     \
-               ((__entry->__rel_loc_##field >> 16) & 0xffff)
-
-#undef __get_rel_str
-#define __get_rel_str(field) ((char *)__get_rel_dynamic_array(field))
-
-#undef __get_bitmask
-#define __get_bitmask(field)                                           \
-       ({                                                              \
-               void *__bitmask = __get_dynamic_array(field);           \
-               unsigned int __bitmask_size;                            \
-               __bitmask_size = __get_dynamic_array_len(field);        \
-               trace_print_bitmask_seq(p, __bitmask, __bitmask_size);  \
-       })
-
-#undef __get_rel_bitmask
-#define __get_rel_bitmask(field)                                               \
-       ({                                                              \
-               void *__bitmask = __get_rel_dynamic_array(field);               \
-               unsigned int __bitmask_size;                            \
-               __bitmask_size = __get_rel_dynamic_array_len(field);    \
-               trace_print_bitmask_seq(p, __bitmask, __bitmask_size);  \
-       })
-
-#undef __get_sockaddr
-#define __get_sockaddr(field)  ((struct sockaddr *)__get_dynamic_array(field))
-
-#undef __get_rel_sockaddr
-#define __get_rel_sockaddr(field)      ((struct sockaddr *)__get_rel_dynamic_array(field))
-
-#undef __print_flags
-#define __print_flags(flag, delim, flag_array...)                      \
-       ({                                                              \
-               static const struct trace_print_flags __flags[] =       \
-                       { flag_array, { -1, NULL }};                    \
-               trace_print_flags_seq(p, delim, flag, __flags); \
-       })
-
-#undef __print_symbolic
-#define __print_symbolic(value, symbol_array...)                       \
-       ({                                                              \
-               static const struct trace_print_flags symbols[] =       \
-                       { symbol_array, { -1, NULL }};                  \
-               trace_print_symbols_seq(p, value, symbols);             \
-       })
-
-#undef __print_flags_u64
-#undef __print_symbolic_u64
-#if BITS_PER_LONG == 32
-#define __print_flags_u64(flag, delim, flag_array...)                  \
-       ({                                                              \
-               static const struct trace_print_flags_u64 __flags[] =   \
-                       { flag_array, { -1, NULL } };                   \
-               trace_print_flags_seq_u64(p, delim, flag, __flags);     \
-       })
-
-#define __print_symbolic_u64(value, symbol_array...)                   \
-       ({                                                              \
-               static const struct trace_print_flags_u64 symbols[] =   \
-                       { symbol_array, { -1, NULL } };                 \
-               trace_print_symbols_seq_u64(p, value, symbols); \
-       })
-#else
-#define __print_flags_u64(flag, delim, flag_array...)                  \
-                       __print_flags(flag, delim, flag_array)
-
-#define __print_symbolic_u64(value, symbol_array...)                   \
-                       __print_symbolic(value, symbol_array)
-#endif
-
-#undef __print_hex
-#define __print_hex(buf, buf_len)                                      \
-       trace_print_hex_seq(p, buf, buf_len, false)
-
-#undef __print_hex_str
-#define __print_hex_str(buf, buf_len)                                  \
-       trace_print_hex_seq(p, buf, buf_len, true)
-
-#undef __print_array
-#define __print_array(array, count, el_size)                           \
-       ({                                                              \
-               BUILD_BUG_ON(el_size != 1 && el_size != 2 &&            \
-                            el_size != 4 && el_size != 8);             \
-               trace_print_array_seq(p, array, count, el_size);        \
-       })
-
-#undef __print_hex_dump
-#define __print_hex_dump(prefix_str, prefix_type,                      \
-                        rowsize, groupsize, buf, len, ascii)           \
-       trace_print_hex_dump_seq(p, prefix_str, prefix_type,            \
-                                rowsize, groupsize, buf, len, ascii)
-
-#undef __print_ns_to_secs
-#define __print_ns_to_secs(value)                      \
-       ({                                              \
-               u64 ____val = (u64)(value);             \
-               do_div(____val, NSEC_PER_SEC);          \
-               ____val;                                \
-       })
-
-#undef __print_ns_without_secs
-#define __print_ns_without_secs(value)                 \
-       ({                                              \
-               u64 ____val = (u64)(value);             \
-               (u32) do_div(____val, NSEC_PER_SEC);    \
-       })
diff --git a/include/trace/stages/stage3_trace_output.h b/include/trace/stages/stage3_trace_output.h
new file mode 100644 (file)
index 0000000..e3b183e
--- /dev/null
@@ -0,0 +1,135 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+/* Stage 3 definitions for creating trace events */
+
+#undef __entry
+#define __entry field
+
+#undef TP_printk
+#define TP_printk(fmt, args...) fmt "\n", args
+
+#undef __get_dynamic_array
+#define __get_dynamic_array(field)     \
+               ((void *)__entry + (__entry->__data_loc_##field & 0xffff))
+
+#undef __get_dynamic_array_len
+#define __get_dynamic_array_len(field) \
+               ((__entry->__data_loc_##field >> 16) & 0xffff)
+
+#undef __get_str
+#define __get_str(field) ((char *)__get_dynamic_array(field))
+
+#undef __get_rel_dynamic_array
+#define __get_rel_dynamic_array(field)                                 \
+               ((void *)__entry +                                      \
+                offsetof(typeof(*__entry), __rel_loc_##field) +        \
+                sizeof(__entry->__rel_loc_##field) +                   \
+                (__entry->__rel_loc_##field & 0xffff))
+
+#undef __get_rel_dynamic_array_len
+#define __get_rel_dynamic_array_len(field)     \
+               ((__entry->__rel_loc_##field >> 16) & 0xffff)
+
+#undef __get_rel_str
+#define __get_rel_str(field) ((char *)__get_rel_dynamic_array(field))
+
+#undef __get_bitmask
+#define __get_bitmask(field)                                           \
+       ({                                                              \
+               void *__bitmask = __get_dynamic_array(field);           \
+               unsigned int __bitmask_size;                            \
+               __bitmask_size = __get_dynamic_array_len(field);        \
+               trace_print_bitmask_seq(p, __bitmask, __bitmask_size);  \
+       })
+
+#undef __get_rel_bitmask
+#define __get_rel_bitmask(field)                                               \
+       ({                                                              \
+               void *__bitmask = __get_rel_dynamic_array(field);               \
+               unsigned int __bitmask_size;                            \
+               __bitmask_size = __get_rel_dynamic_array_len(field);    \
+               trace_print_bitmask_seq(p, __bitmask, __bitmask_size);  \
+       })
+
+#undef __get_sockaddr
+#define __get_sockaddr(field)  ((struct sockaddr *)__get_dynamic_array(field))
+
+#undef __get_rel_sockaddr
+#define __get_rel_sockaddr(field)      ((struct sockaddr *)__get_rel_dynamic_array(field))
+
+#undef __print_flags
+#define __print_flags(flag, delim, flag_array...)                      \
+       ({                                                              \
+               static const struct trace_print_flags __flags[] =       \
+                       { flag_array, { -1, NULL }};                    \
+               trace_print_flags_seq(p, delim, flag, __flags); \
+       })
+
+#undef __print_symbolic
+#define __print_symbolic(value, symbol_array...)                       \
+       ({                                                              \
+               static const struct trace_print_flags symbols[] =       \
+                       { symbol_array, { -1, NULL }};                  \
+               trace_print_symbols_seq(p, value, symbols);             \
+       })
+
+#undef __print_flags_u64
+#undef __print_symbolic_u64
+#if BITS_PER_LONG == 32
+#define __print_flags_u64(flag, delim, flag_array...)                  \
+       ({                                                              \
+               static const struct trace_print_flags_u64 __flags[] =   \
+                       { flag_array, { -1, NULL } };                   \
+               trace_print_flags_seq_u64(p, delim, flag, __flags);     \
+       })
+
+#define __print_symbolic_u64(value, symbol_array...)                   \
+       ({                                                              \
+               static const struct trace_print_flags_u64 symbols[] =   \
+                       { symbol_array, { -1, NULL } };                 \
+               trace_print_symbols_seq_u64(p, value, symbols); \
+       })
+#else
+#define __print_flags_u64(flag, delim, flag_array...)                  \
+                       __print_flags(flag, delim, flag_array)
+
+#define __print_symbolic_u64(value, symbol_array...)                   \
+                       __print_symbolic(value, symbol_array)
+#endif
+
+#undef __print_hex
+#define __print_hex(buf, buf_len)                                      \
+       trace_print_hex_seq(p, buf, buf_len, false)
+
+#undef __print_hex_str
+#define __print_hex_str(buf, buf_len)                                  \
+       trace_print_hex_seq(p, buf, buf_len, true)
+
+#undef __print_array
+#define __print_array(array, count, el_size)                           \
+       ({                                                              \
+               BUILD_BUG_ON(el_size != 1 && el_size != 2 &&            \
+                            el_size != 4 && el_size != 8);             \
+               trace_print_array_seq(p, array, count, el_size);        \
+       })
+
+#undef __print_hex_dump
+#define __print_hex_dump(prefix_str, prefix_type,                      \
+                        rowsize, groupsize, buf, len, ascii)           \
+       trace_print_hex_dump_seq(p, prefix_str, prefix_type,            \
+                                rowsize, groupsize, buf, len, ascii)
+
+#undef __print_ns_to_secs
+#define __print_ns_to_secs(value)                      \
+       ({                                              \
+               u64 ____val = (u64)(value);             \
+               do_div(____val, NSEC_PER_SEC);          \
+               ____val;                                \
+       })
+
+#undef __print_ns_without_secs
+#define __print_ns_without_secs(value)                 \
+       ({                                              \
+               u64 ____val = (u64)(value);             \
+               (u32) do_div(____val, NSEC_PER_SEC);    \
+       })
diff --git a/include/trace/stages/stage4_defines.h b/include/trace/stages/stage4_defines.h
deleted file mode 100644 (file)
index e80cdc3..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-/* Stage 4 definitions for creating trace events */
-
-#undef __field_ext
-#define __field_ext(_type, _item, _filter_type) {                      \
-       .type = #_type, .name = #_item,                                 \
-       .size = sizeof(_type), .align = __alignof__(_type),             \
-       .is_signed = is_signed_type(_type), .filter_type = _filter_type },
-
-#undef __field_struct_ext
-#define __field_struct_ext(_type, _item, _filter_type) {               \
-       .type = #_type, .name = #_item,                                 \
-       .size = sizeof(_type), .align = __alignof__(_type),             \
-       0, .filter_type = _filter_type },
-
-#undef __field
-#define __field(type, item)    __field_ext(type, item, FILTER_OTHER)
-
-#undef __field_struct
-#define __field_struct(type, item) __field_struct_ext(type, item, FILTER_OTHER)
-
-#undef __array
-#define __array(_type, _item, _len) {                                  \
-       .type = #_type"["__stringify(_len)"]", .name = #_item,          \
-       .size = sizeof(_type[_len]), .align = __alignof__(_type),       \
-       .is_signed = is_signed_type(_type), .filter_type = FILTER_OTHER },
-
-#undef __dynamic_array
-#define __dynamic_array(_type, _item, _len) {                          \
-       .type = "__data_loc " #_type "[]", .name = #_item,              \
-       .size = 4, .align = 4,                                          \
-       .is_signed = is_signed_type(_type), .filter_type = FILTER_OTHER },
-
-#undef __string
-#define __string(item, src) __dynamic_array(char, item, -1)
-
-#undef __string_len
-#define __string_len(item, src, len) __dynamic_array(char, item, -1)
-
-#undef __bitmask
-#define __bitmask(item, nr_bits) __dynamic_array(unsigned long, item, -1)
-
-#undef __sockaddr
-#define __sockaddr(field, len) __dynamic_array(u8, field, len)
-
-#undef __rel_dynamic_array
-#define __rel_dynamic_array(_type, _item, _len) {                      \
-       .type = "__rel_loc " #_type "[]", .name = #_item,               \
-       .size = 4, .align = 4,                                          \
-       .is_signed = is_signed_type(_type), .filter_type = FILTER_OTHER },
-
-#undef __rel_string
-#define __rel_string(item, src) __rel_dynamic_array(char, item, -1)
-
-#undef __rel_string_len
-#define __rel_string_len(item, src, len) __rel_dynamic_array(char, item, -1)
-
-#undef __rel_bitmask
-#define __rel_bitmask(item, nr_bits) __rel_dynamic_array(unsigned long, item, -1)
-
-#undef __rel_sockaddr
-#define __rel_sockaddr(field, len) __rel_dynamic_array(u8, field, len)
diff --git a/include/trace/stages/stage4_event_fields.h b/include/trace/stages/stage4_event_fields.h
new file mode 100644 (file)
index 0000000..e80cdc3
--- /dev/null
@@ -0,0 +1,63 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+/* Stage 4 definitions for creating trace events */
+
+#undef __field_ext
+#define __field_ext(_type, _item, _filter_type) {                      \
+       .type = #_type, .name = #_item,                                 \
+       .size = sizeof(_type), .align = __alignof__(_type),             \
+       .is_signed = is_signed_type(_type), .filter_type = _filter_type },
+
+#undef __field_struct_ext
+#define __field_struct_ext(_type, _item, _filter_type) {               \
+       .type = #_type, .name = #_item,                                 \
+       .size = sizeof(_type), .align = __alignof__(_type),             \
+       0, .filter_type = _filter_type },
+
+#undef __field
+#define __field(type, item)    __field_ext(type, item, FILTER_OTHER)
+
+#undef __field_struct
+#define __field_struct(type, item) __field_struct_ext(type, item, FILTER_OTHER)
+
+#undef __array
+#define __array(_type, _item, _len) {                                  \
+       .type = #_type"["__stringify(_len)"]", .name = #_item,          \
+       .size = sizeof(_type[_len]), .align = __alignof__(_type),       \
+       .is_signed = is_signed_type(_type), .filter_type = FILTER_OTHER },
+
+#undef __dynamic_array
+#define __dynamic_array(_type, _item, _len) {                          \
+       .type = "__data_loc " #_type "[]", .name = #_item,              \
+       .size = 4, .align = 4,                                          \
+       .is_signed = is_signed_type(_type), .filter_type = FILTER_OTHER },
+
+#undef __string
+#define __string(item, src) __dynamic_array(char, item, -1)
+
+#undef __string_len
+#define __string_len(item, src, len) __dynamic_array(char, item, -1)
+
+#undef __bitmask
+#define __bitmask(item, nr_bits) __dynamic_array(unsigned long, item, -1)
+
+#undef __sockaddr
+#define __sockaddr(field, len) __dynamic_array(u8, field, len)
+
+#undef __rel_dynamic_array
+#define __rel_dynamic_array(_type, _item, _len) {                      \
+       .type = "__rel_loc " #_type "[]", .name = #_item,               \
+       .size = 4, .align = 4,                                          \
+       .is_signed = is_signed_type(_type), .filter_type = FILTER_OTHER },
+
+#undef __rel_string
+#define __rel_string(item, src) __rel_dynamic_array(char, item, -1)
+
+#undef __rel_string_len
+#define __rel_string_len(item, src, len) __rel_dynamic_array(char, item, -1)
+
+#undef __rel_bitmask
+#define __rel_bitmask(item, nr_bits) __rel_dynamic_array(unsigned long, item, -1)
+
+#undef __rel_sockaddr
+#define __rel_sockaddr(field, len) __rel_dynamic_array(u8, field, len)
diff --git a/include/trace/stages/stage5_defines.h b/include/trace/stages/stage5_defines.h
deleted file mode 100644 (file)
index 7ee5931..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-/* Stage 5 definitions for creating trace events */
-
-/*
- * remember the offset of each array from the beginning of the event.
- */
-
-#undef __entry
-#define __entry entry
-
-#undef __field
-#define __field(type, item)
-
-#undef __field_ext
-#define __field_ext(type, item, filter_type)
-
-#undef __field_struct
-#define __field_struct(type, item)
-
-#undef __field_struct_ext
-#define __field_struct_ext(type, item, filter_type)
-
-#undef __array
-#define __array(type, item, len)
-
-#undef __dynamic_array
-#define __dynamic_array(type, item, len)                               \
-       __item_length = (len) * sizeof(type);                           \
-       __data_offsets->item = __data_size +                            \
-                              offsetof(typeof(*entry), __data);        \
-       __data_offsets->item |= __item_length << 16;                    \
-       __data_size += __item_length;
-
-#undef __string
-#define __string(item, src) __dynamic_array(char, item,                        \
-                   strlen((src) ? (const char *)(src) : "(null)") + 1)
-
-#undef __string_len
-#define __string_len(item, src, len) __dynamic_array(char, item, (len) + 1)
-
-#undef __rel_dynamic_array
-#define __rel_dynamic_array(type, item, len)                           \
-       __item_length = (len) * sizeof(type);                           \
-       __data_offsets->item = __data_size +                            \
-                              offsetof(typeof(*entry), __data) -       \
-                              offsetof(typeof(*entry), __rel_loc_##item) -     \
-                              sizeof(u32);                             \
-       __data_offsets->item |= __item_length << 16;                    \
-       __data_size += __item_length;
-
-#undef __rel_string
-#define __rel_string(item, src) __rel_dynamic_array(char, item,                        \
-                   strlen((src) ? (const char *)(src) : "(null)") + 1)
-
-#undef __rel_string_len
-#define __rel_string_len(item, src, len) __rel_dynamic_array(char, item, (len) + 1)
-/*
- * __bitmask_size_in_bytes_raw is the number of bytes needed to hold
- * num_possible_cpus().
- */
-#define __bitmask_size_in_bytes_raw(nr_bits)   \
-       (((nr_bits) + 7) / 8)
-
-#define __bitmask_size_in_longs(nr_bits)                       \
-       ((__bitmask_size_in_bytes_raw(nr_bits) +                \
-         ((BITS_PER_LONG / 8) - 1)) / (BITS_PER_LONG / 8))
-
-/*
- * __bitmask_size_in_bytes is the number of bytes needed to hold
- * num_possible_cpus() padded out to the nearest long. This is what
- * is saved in the buffer, just to be consistent.
- */
-#define __bitmask_size_in_bytes(nr_bits)                               \
-       (__bitmask_size_in_longs(nr_bits) * (BITS_PER_LONG / 8))
-
-#undef __bitmask
-#define __bitmask(item, nr_bits) __dynamic_array(unsigned long, item,  \
-                                        __bitmask_size_in_longs(nr_bits))
-
-#undef __rel_bitmask
-#define __rel_bitmask(item, nr_bits) __rel_dynamic_array(unsigned long, item,  \
-                                        __bitmask_size_in_longs(nr_bits))
-
-#undef __sockaddr
-#define __sockaddr(field, len) __dynamic_array(u8, field, len)
-
-#undef __rel_sockaddr
-#define __rel_sockaddr(field, len) __rel_dynamic_array(u8, field, len)
diff --git a/include/trace/stages/stage5_get_offsets.h b/include/trace/stages/stage5_get_offsets.h
new file mode 100644 (file)
index 0000000..7ee5931
--- /dev/null
@@ -0,0 +1,89 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+/* Stage 5 definitions for creating trace events */
+
+/*
+ * remember the offset of each array from the beginning of the event.
+ */
+
+#undef __entry
+#define __entry entry
+
+#undef __field
+#define __field(type, item)
+
+#undef __field_ext
+#define __field_ext(type, item, filter_type)
+
+#undef __field_struct
+#define __field_struct(type, item)
+
+#undef __field_struct_ext
+#define __field_struct_ext(type, item, filter_type)
+
+#undef __array
+#define __array(type, item, len)
+
+#undef __dynamic_array
+#define __dynamic_array(type, item, len)                               \
+       __item_length = (len) * sizeof(type);                           \
+       __data_offsets->item = __data_size +                            \
+                              offsetof(typeof(*entry), __data);        \
+       __data_offsets->item |= __item_length << 16;                    \
+       __data_size += __item_length;
+
+#undef __string
+#define __string(item, src) __dynamic_array(char, item,                        \
+                   strlen((src) ? (const char *)(src) : "(null)") + 1)
+
+#undef __string_len
+#define __string_len(item, src, len) __dynamic_array(char, item, (len) + 1)
+
+#undef __rel_dynamic_array
+#define __rel_dynamic_array(type, item, len)                           \
+       __item_length = (len) * sizeof(type);                           \
+       __data_offsets->item = __data_size +                            \
+                              offsetof(typeof(*entry), __data) -       \
+                              offsetof(typeof(*entry), __rel_loc_##item) -     \
+                              sizeof(u32);                             \
+       __data_offsets->item |= __item_length << 16;                    \
+       __data_size += __item_length;
+
+#undef __rel_string
+#define __rel_string(item, src) __rel_dynamic_array(char, item,                        \
+                   strlen((src) ? (const char *)(src) : "(null)") + 1)
+
+#undef __rel_string_len
+#define __rel_string_len(item, src, len) __rel_dynamic_array(char, item, (len) + 1)
+/*
+ * __bitmask_size_in_bytes_raw is the number of bytes needed to hold
+ * num_possible_cpus().
+ */
+#define __bitmask_size_in_bytes_raw(nr_bits)   \
+       (((nr_bits) + 7) / 8)
+
+#define __bitmask_size_in_longs(nr_bits)                       \
+       ((__bitmask_size_in_bytes_raw(nr_bits) +                \
+         ((BITS_PER_LONG / 8) - 1)) / (BITS_PER_LONG / 8))
+
+/*
+ * __bitmask_size_in_bytes is the number of bytes needed to hold
+ * num_possible_cpus() padded out to the nearest long. This is what
+ * is saved in the buffer, just to be consistent.
+ */
+#define __bitmask_size_in_bytes(nr_bits)                               \
+       (__bitmask_size_in_longs(nr_bits) * (BITS_PER_LONG / 8))
+
+#undef __bitmask
+#define __bitmask(item, nr_bits) __dynamic_array(unsigned long, item,  \
+                                        __bitmask_size_in_longs(nr_bits))
+
+#undef __rel_bitmask
+#define __rel_bitmask(item, nr_bits) __rel_dynamic_array(unsigned long, item,  \
+                                        __bitmask_size_in_longs(nr_bits))
+
+#undef __sockaddr
+#define __sockaddr(field, len) __dynamic_array(u8, field, len)
+
+#undef __rel_sockaddr
+#define __rel_sockaddr(field, len) __rel_dynamic_array(u8, field, len)
diff --git a/include/trace/stages/stage6_defines.h b/include/trace/stages/stage6_defines.h
deleted file mode 100644 (file)
index e1724f7..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-/* Stage 6 definitions for creating trace events */
-
-#undef __entry
-#define __entry entry
-
-#undef __field
-#define __field(type, item)
-
-#undef __field_struct
-#define __field_struct(type, item)
-
-#undef __array
-#define __array(type, item, len)
-
-#undef __dynamic_array
-#define __dynamic_array(type, item, len)                               \
-       __entry->__data_loc_##item = __data_offsets.item;
-
-#undef __string
-#define __string(item, src) __dynamic_array(char, item, -1)
-
-#undef __string_len
-#define __string_len(item, src, len) __dynamic_array(char, item, -1)
-
-#undef __assign_str
-#define __assign_str(dst, src)                                         \
-       strcpy(__get_str(dst), (src) ? (const char *)(src) : "(null)");
-
-#undef __assign_str_len
-#define __assign_str_len(dst, src, len)                                        \
-       do {                                                            \
-               memcpy(__get_str(dst), (src), (len));                   \
-               __get_str(dst)[len] = '\0';                             \
-       } while(0)
-
-#undef __bitmask
-#define __bitmask(item, nr_bits) __dynamic_array(unsigned long, item, -1)
-
-#undef __get_bitmask
-#define __get_bitmask(field) (char *)__get_dynamic_array(field)
-
-#undef __assign_bitmask
-#define __assign_bitmask(dst, src, nr_bits)                                    \
-       memcpy(__get_bitmask(dst), (src), __bitmask_size_in_bytes(nr_bits))
-
-#undef __sockaddr
-#define __sockaddr(field, len) __dynamic_array(u8, field, len)
-
-#undef __get_sockaddr
-#define __get_sockaddr(field)  ((struct sockaddr *)__get_dynamic_array(field))
-
-#undef __assign_sockaddr
-#define __assign_sockaddr(dest, src, len)                                      \
-       memcpy(__get_dynamic_array(dest), src, len)
-
-#undef __rel_dynamic_array
-#define __rel_dynamic_array(type, item, len)                           \
-       __entry->__rel_loc_##item = __data_offsets.item;
-
-#undef __rel_string
-#define __rel_string(item, src) __rel_dynamic_array(char, item, -1)
-
-#undef __rel_string_len
-#define __rel_string_len(item, src, len) __rel_dynamic_array(char, item, -1)
-
-#undef __assign_rel_str
-#define __assign_rel_str(dst, src)                                     \
-       strcpy(__get_rel_str(dst), (src) ? (const char *)(src) : "(null)");
-
-#undef __assign_rel_str_len
-#define __assign_rel_str_len(dst, src, len)                            \
-       do {                                                            \
-               memcpy(__get_rel_str(dst), (src), (len));               \
-               __get_rel_str(dst)[len] = '\0';                         \
-       } while (0)
-
-#undef __rel_bitmask
-#define __rel_bitmask(item, nr_bits) __rel_dynamic_array(unsigned long, item, -1)
-
-#undef __get_rel_bitmask
-#define __get_rel_bitmask(field) (char *)__get_rel_dynamic_array(field)
-
-#undef __assign_rel_bitmask
-#define __assign_rel_bitmask(dst, src, nr_bits)                                        \
-       memcpy(__get_rel_bitmask(dst), (src), __bitmask_size_in_bytes(nr_bits))
-
-#undef __rel_sockaddr
-#define __rel_sockaddr(field, len) __rel_dynamic_array(u8, field, len)
-
-#undef __get_rel_sockaddr
-#define __get_rel_sockaddr(field)      ((struct sockaddr *)__get_rel_dynamic_array(field))
-
-#undef __assign_rel_sockaddr
-#define __assign_rel_sockaddr(dest, src, len)                                  \
-       memcpy(__get_rel_dynamic_array(dest), src, len)
-
-#undef TP_fast_assign
-#define TP_fast_assign(args...) args
-
-#undef __perf_count
-#define __perf_count(c)        (c)
-
-#undef __perf_task
-#define __perf_task(t) (t)
diff --git a/include/trace/stages/stage6_event_callback.h b/include/trace/stages/stage6_event_callback.h
new file mode 100644 (file)
index 0000000..e1724f7
--- /dev/null
@@ -0,0 +1,106 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+/* Stage 6 definitions for creating trace events */
+
+#undef __entry
+#define __entry entry
+
+#undef __field
+#define __field(type, item)
+
+#undef __field_struct
+#define __field_struct(type, item)
+
+#undef __array
+#define __array(type, item, len)
+
+#undef __dynamic_array
+#define __dynamic_array(type, item, len)                               \
+       __entry->__data_loc_##item = __data_offsets.item;
+
+#undef __string
+#define __string(item, src) __dynamic_array(char, item, -1)
+
+#undef __string_len
+#define __string_len(item, src, len) __dynamic_array(char, item, -1)
+
+#undef __assign_str
+#define __assign_str(dst, src)                                         \
+       strcpy(__get_str(dst), (src) ? (const char *)(src) : "(null)");
+
+#undef __assign_str_len
+#define __assign_str_len(dst, src, len)                                        \
+       do {                                                            \
+               memcpy(__get_str(dst), (src), (len));                   \
+               __get_str(dst)[len] = '\0';                             \
+       } while(0)
+
+#undef __bitmask
+#define __bitmask(item, nr_bits) __dynamic_array(unsigned long, item, -1)
+
+#undef __get_bitmask
+#define __get_bitmask(field) (char *)__get_dynamic_array(field)
+
+#undef __assign_bitmask
+#define __assign_bitmask(dst, src, nr_bits)                                    \
+       memcpy(__get_bitmask(dst), (src), __bitmask_size_in_bytes(nr_bits))
+
+#undef __sockaddr
+#define __sockaddr(field, len) __dynamic_array(u8, field, len)
+
+#undef __get_sockaddr
+#define __get_sockaddr(field)  ((struct sockaddr *)__get_dynamic_array(field))
+
+#undef __assign_sockaddr
+#define __assign_sockaddr(dest, src, len)                                      \
+       memcpy(__get_dynamic_array(dest), src, len)
+
+#undef __rel_dynamic_array
+#define __rel_dynamic_array(type, item, len)                           \
+       __entry->__rel_loc_##item = __data_offsets.item;
+
+#undef __rel_string
+#define __rel_string(item, src) __rel_dynamic_array(char, item, -1)
+
+#undef __rel_string_len
+#define __rel_string_len(item, src, len) __rel_dynamic_array(char, item, -1)
+
+#undef __assign_rel_str
+#define __assign_rel_str(dst, src)                                     \
+       strcpy(__get_rel_str(dst), (src) ? (const char *)(src) : "(null)");
+
+#undef __assign_rel_str_len
+#define __assign_rel_str_len(dst, src, len)                            \
+       do {                                                            \
+               memcpy(__get_rel_str(dst), (src), (len));               \
+               __get_rel_str(dst)[len] = '\0';                         \
+       } while (0)
+
+#undef __rel_bitmask
+#define __rel_bitmask(item, nr_bits) __rel_dynamic_array(unsigned long, item, -1)
+
+#undef __get_rel_bitmask
+#define __get_rel_bitmask(field) (char *)__get_rel_dynamic_array(field)
+
+#undef __assign_rel_bitmask
+#define __assign_rel_bitmask(dst, src, nr_bits)                                        \
+       memcpy(__get_rel_bitmask(dst), (src), __bitmask_size_in_bytes(nr_bits))
+
+#undef __rel_sockaddr
+#define __rel_sockaddr(field, len) __rel_dynamic_array(u8, field, len)
+
+#undef __get_rel_sockaddr
+#define __get_rel_sockaddr(field)      ((struct sockaddr *)__get_rel_dynamic_array(field))
+
+#undef __assign_rel_sockaddr
+#define __assign_rel_sockaddr(dest, src, len)                                  \
+       memcpy(__get_rel_dynamic_array(dest), src, len)
+
+#undef TP_fast_assign
+#define TP_fast_assign(args...) args
+
+#undef __perf_count
+#define __perf_count(c)        (c)
+
+#undef __perf_task
+#define __perf_task(t) (t)
diff --git a/include/trace/stages/stage7_class_define.h b/include/trace/stages/stage7_class_define.h
new file mode 100644 (file)
index 0000000..8a7ec24
--- /dev/null
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+/* Stage 7 definitions for creating trace events */
+
+#undef __entry
+#define __entry REC
+
+#undef __print_flags
+#undef __print_symbolic
+#undef __print_hex
+#undef __print_hex_str
+#undef __get_dynamic_array
+#undef __get_dynamic_array_len
+#undef __get_str
+#undef __get_bitmask
+#undef __get_sockaddr
+#undef __get_rel_dynamic_array
+#undef __get_rel_dynamic_array_len
+#undef __get_rel_str
+#undef __get_rel_bitmask
+#undef __get_rel_sockaddr
+#undef __print_array
+#undef __print_hex_dump
+
+/*
+ * The below is not executed in the kernel. It is only what is
+ * displayed in the print format for userspace to parse.
+ */
+#undef __print_ns_to_secs
+#define __print_ns_to_secs(val) (val) / 1000000000UL
+
+#undef __print_ns_without_secs
+#define __print_ns_without_secs(val) (val) % 1000000000UL
+
+#undef TP_printk
+#define TP_printk(fmt, args...) "\"" fmt "\", "  __stringify(args)
diff --git a/include/trace/stages/stage7_defines.h b/include/trace/stages/stage7_defines.h
deleted file mode 100644 (file)
index 8a7ec24..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-/* Stage 7 definitions for creating trace events */
-
-#undef __entry
-#define __entry REC
-
-#undef __print_flags
-#undef __print_symbolic
-#undef __print_hex
-#undef __print_hex_str
-#undef __get_dynamic_array
-#undef __get_dynamic_array_len
-#undef __get_str
-#undef __get_bitmask
-#undef __get_sockaddr
-#undef __get_rel_dynamic_array
-#undef __get_rel_dynamic_array_len
-#undef __get_rel_str
-#undef __get_rel_bitmask
-#undef __get_rel_sockaddr
-#undef __print_array
-#undef __print_hex_dump
-
-/*
- * The below is not executed in the kernel. It is only what is
- * displayed in the print format for userspace to parse.
- */
-#undef __print_ns_to_secs
-#define __print_ns_to_secs(val) (val) / 1000000000UL
-
-#undef __print_ns_without_secs
-#define __print_ns_without_secs(val) (val) % 1000000000UL
-
-#undef TP_printk
-#define TP_printk(fmt, args...) "\"" fmt "\", "  __stringify(args)
index b567c72023396b8424849638568bf85bf0b71fa6..6e492dba96bfcbf03039ba51b9becf08ae9c6c10 100644 (file)
@@ -35,7 +35,7 @@
 
 /* Stage 1 creates the structure of the recorded event layout */
 
-#include "stages/stage1_defines.h"
+#include "stages/stage1_struct_define.h"
 
 #undef DECLARE_CUSTOM_EVENT_CLASS
 #define DECLARE_CUSTOM_EVENT_CLASS(name, proto, args, tstruct, assign, print) \
@@ -56,7 +56,7 @@
 
 /* Stage 2 creates the custom class */
 
-#include "stages/stage2_defines.h"
+#include "stages/stage2_data_offsets.h"
 
 #undef DECLARE_CUSTOM_EVENT_CLASS
 #define DECLARE_CUSTOM_EVENT_CLASS(call, proto, args, tstruct, assign, print)  \
@@ -71,7 +71,7 @@
 
 /* Stage 3 create the way to print the custom event */
 
-#include "stages/stage3_defines.h"
+#include "stages/stage3_trace_output.h"
 
 #undef DECLARE_CUSTOM_EVENT_CLASS
 #define DECLARE_CUSTOM_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
@@ -102,7 +102,7 @@ static struct trace_event_functions trace_custom_event_type_funcs_##call = { \
 
 /* Stage 4 creates the offset layout for the fields */
 
-#include "stages/stage4_defines.h"
+#include "stages/stage4_event_fields.h"
 
 #undef DECLARE_CUSTOM_EVENT_CLASS
 #define DECLARE_CUSTOM_EVENT_CLASS(call, proto, args, tstruct, func, print)    \
@@ -114,7 +114,7 @@ static struct trace_event_fields trace_custom_event_fields_##call[] = {     \
 
 /* Stage 5 creates the helper function for dynamic fields */
 
-#include "stages/stage5_defines.h"
+#include "stages/stage5_get_offsets.h"
 
 #undef DECLARE_CUSTOM_EVENT_CLASS
 #define DECLARE_CUSTOM_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
@@ -134,7 +134,7 @@ static inline notrace int trace_custom_event_get_offsets_##call(    \
 
 /* Stage 6 creates the probe function that records the event */
 
-#include "stages/stage6_defines.h"
+#include "stages/stage6_event_callback.h"
 
 #undef DECLARE_CUSTOM_EVENT_CLASS
 #define DECLARE_CUSTOM_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
@@ -182,7 +182,7 @@ static inline void ftrace_test_custom_probe_##call(void)            \
 
 /* Stage 7 creates the actual class and event structure for the custom event */
 
-#include "stages/stage7_defines.h"
+#include "stages/stage7_class_define.h"
 
 #undef DECLARE_CUSTOM_EVENT_CLASS
 #define DECLARE_CUSTOM_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
index 8a8cd66cc6d54a036b7485060ddc69d8d32a529a..c2f9cabf154d11d27b7944f7cc14a02812249d5c 100644 (file)
@@ -45,7 +45,7 @@
                             PARAMS(print));                   \
        DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args));
 
-#include "stages/stage1_defines.h"
+#include "stages/stage1_struct_define.h"
 
 #undef DECLARE_EVENT_CLASS
 #define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print) \
  * The size of an array is also encoded, in the higher 16 bits of <item>.
  */
 
-#include "stages/stage2_defines.h"
+#include "stages/stage2_data_offsets.h"
 
 #undef DECLARE_EVENT_CLASS
 #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
  * in binary.
  */
 
-#include "stages/stage3_defines.h"
+#include "stages/stage3_trace_output.h"
 
 #undef DECLARE_EVENT_CLASS
 #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
@@ -236,7 +236,7 @@ static struct trace_event_functions trace_event_type_funcs_##call = {       \
 
 #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
 
-#include "stages/stage4_defines.h"
+#include "stages/stage4_event_fields.h"
 
 #undef DECLARE_EVENT_CLASS
 #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print)   \
@@ -249,7 +249,7 @@ static struct trace_event_fields trace_event_fields_##call[] = {    \
 
 #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
 
-#include "stages/stage5_defines.h"
+#include "stages/stage5_get_offsets.h"
 
 #undef DECLARE_EVENT_CLASS
 #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
@@ -372,7 +372,7 @@ static inline notrace int trace_event_get_offsets_##call(           \
 #define _TRACE_PERF_INIT(call)
 #endif /* CONFIG_PERF_EVENTS */
 
-#include "stages/stage6_defines.h"
+#include "stages/stage6_event_callback.h"
 
 #undef DECLARE_EVENT_CLASS
 #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
@@ -418,7 +418,7 @@ static inline void ftrace_test_probe_##call(void)                   \
 
 #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
 
-#include "stages/stage7_defines.h"
+#include "stages/stage7_class_define.h"
 
 #undef DECLARE_EVENT_CLASS
 #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \