Skip to content

Commit 8405541

Browse files
committed
tracing: Rename the staging files for trace_events
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>
1 parent 1bc1910 commit 8405541

9 files changed

Lines changed: 14 additions & 14 deletions
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

include/trace/trace_custom_events.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
/* Stage 1 creates the structure of the recorded event layout */
3737

38-
#include "stages/stage1_defines.h"
38+
#include "stages/stage1_struct_define.h"
3939

4040
#undef DECLARE_CUSTOM_EVENT_CLASS
4141
#define DECLARE_CUSTOM_EVENT_CLASS(name, proto, args, tstruct, assign, print) \
@@ -56,7 +56,7 @@
5656

5757
/* Stage 2 creates the custom class */
5858

59-
#include "stages/stage2_defines.h"
59+
#include "stages/stage2_data_offsets.h"
6060

6161
#undef DECLARE_CUSTOM_EVENT_CLASS
6262
#define DECLARE_CUSTOM_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
@@ -71,7 +71,7 @@
7171

7272
/* Stage 3 create the way to print the custom event */
7373

74-
#include "stages/stage3_defines.h"
74+
#include "stages/stage3_trace_output.h"
7575

7676
#undef DECLARE_CUSTOM_EVENT_CLASS
7777
#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 = { \
102102

103103
/* Stage 4 creates the offset layout for the fields */
104104

105-
#include "stages/stage4_defines.h"
105+
#include "stages/stage4_event_fields.h"
106106

107107
#undef DECLARE_CUSTOM_EVENT_CLASS
108108
#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[] = { \
114114

115115
/* Stage 5 creates the helper function for dynamic fields */
116116

117-
#include "stages/stage5_defines.h"
117+
#include "stages/stage5_get_offsets.h"
118118

119119
#undef DECLARE_CUSTOM_EVENT_CLASS
120120
#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( \
134134

135135
/* Stage 6 creates the probe function that records the event */
136136

137-
#include "stages/stage6_defines.h"
137+
#include "stages/stage6_event_callback.h"
138138

139139
#undef DECLARE_CUSTOM_EVENT_CLASS
140140
#define DECLARE_CUSTOM_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
@@ -182,7 +182,7 @@ static inline void ftrace_test_custom_probe_##call(void) \
182182

183183
/* Stage 7 creates the actual class and event structure for the custom event */
184184

185-
#include "stages/stage7_defines.h"
185+
#include "stages/stage7_class_define.h"
186186

187187
#undef DECLARE_CUSTOM_EVENT_CLASS
188188
#define DECLARE_CUSTOM_EVENT_CLASS(call, proto, args, tstruct, assign, print) \

include/trace/trace_events.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
PARAMS(print)); \
4646
DEFINE_EVENT(name, name, PARAMS(proto), PARAMS(args));
4747

48-
#include "stages/stage1_defines.h"
48+
#include "stages/stage1_struct_define.h"
4949

5050
#undef DECLARE_EVENT_CLASS
5151
#define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print) \
@@ -109,7 +109,7 @@
109109
* The size of an array is also encoded, in the higher 16 bits of <item>.
110110
*/
111111

112-
#include "stages/stage2_defines.h"
112+
#include "stages/stage2_data_offsets.h"
113113

114114
#undef DECLARE_EVENT_CLASS
115115
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
@@ -181,7 +181,7 @@
181181
* in binary.
182182
*/
183183

184-
#include "stages/stage3_defines.h"
184+
#include "stages/stage3_trace_output.h"
185185

186186
#undef DECLARE_EVENT_CLASS
187187
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
@@ -236,7 +236,7 @@ static struct trace_event_functions trace_event_type_funcs_##call = { \
236236

237237
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
238238

239-
#include "stages/stage4_defines.h"
239+
#include "stages/stage4_event_fields.h"
240240

241241
#undef DECLARE_EVENT_CLASS
242242
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, func, print) \
@@ -249,7 +249,7 @@ static struct trace_event_fields trace_event_fields_##call[] = { \
249249

250250
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
251251

252-
#include "stages/stage5_defines.h"
252+
#include "stages/stage5_get_offsets.h"
253253

254254
#undef DECLARE_EVENT_CLASS
255255
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
@@ -372,7 +372,7 @@ static inline notrace int trace_event_get_offsets_##call( \
372372
#define _TRACE_PERF_INIT(call)
373373
#endif /* CONFIG_PERF_EVENTS */
374374

375-
#include "stages/stage6_defines.h"
375+
#include "stages/stage6_event_callback.h"
376376

377377
#undef DECLARE_EVENT_CLASS
378378
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
@@ -418,7 +418,7 @@ static inline void ftrace_test_probe_##call(void) \
418418

419419
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
420420

421-
#include "stages/stage7_defines.h"
421+
#include "stages/stage7_class_define.h"
422422

423423
#undef DECLARE_EVENT_CLASS
424424
#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \

0 commit comments

Comments
 (0)