* [PATCH 1/4] tracing: not necessary to undefine DEFINE_EVENT again
2020-06-12 9:28 [PATCH 0/4] tracing: cleanup trace event macro Wei Yang
@ 2020-06-12 9:28 ` Wei Yang
2020-06-12 9:28 ` [PATCH 2/4] tracing: not necessary re-define DEFINE_EVENT_PRINT Wei Yang
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Wei Yang @ 2020-06-12 9:28 UTC (permalink / raw)
To: rostedt, mingo; +Cc: linux-kernel, Wei Yang
After un-define DEFINE_EVENT in Stage 2, DEFINE_EVENT is not defined to a
specific form. It is not necessary to un-define it again.
Let's skip this.
Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com>
---
include/trace/trace_events.h | 6 ------
1 file changed, 6 deletions(-)
diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h
index 502c7be50b8d..a4994761bdaf 100644
--- a/include/trace/trace_events.h
+++ b/include/trace/trace_events.h
@@ -443,9 +443,6 @@ static struct trace_event_fields trace_event_fields_##call[] = { \
tstruct \
{} };
-#undef DEFINE_EVENT
-#define DEFINE_EVENT(template, name, proto, args)
-
#undef DEFINE_EVENT_PRINT
#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
@@ -523,9 +520,6 @@ static inline notrace int trace_event_get_offsets_##call( \
return __data_size; \
}
-#undef DEFINE_EVENT
-#define DEFINE_EVENT(template, name, proto, args)
-
#undef DEFINE_EVENT_PRINT
#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
--
2.20.1 (Apple Git-117)
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 2/4] tracing: not necessary re-define DEFINE_EVENT_PRINT
2020-06-12 9:28 [PATCH 0/4] tracing: cleanup trace event macro Wei Yang
2020-06-12 9:28 ` [PATCH 1/4] tracing: not necessary to undefine DEFINE_EVENT again Wei Yang
@ 2020-06-12 9:28 ` Wei Yang
2020-06-12 9:28 ` [PATCH 3/4] tracing: define DEFINE_EVENT_PRINT not related to DEFINE_EVENT Wei Yang
2020-06-12 9:28 ` [PATCH 4/4] tracing: not necessary to define DEFINE_EVENT_PRINT to be empty again Wei Yang
3 siblings, 0 replies; 5+ messages in thread
From: Wei Yang @ 2020-06-12 9:28 UTC (permalink / raw)
To: rostedt, mingo; +Cc: linux-kernel, Wei Yang
The definition of DEFINE_EVENT_PRINT is not changed after previous one,
so not necessary to re-define is as the same form.
Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com>
---
include/trace/trace_events.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h
index a4994761bdaf..5219f81b9d74 100644
--- a/include/trace/trace_events.h
+++ b/include/trace/trace_events.h
@@ -520,10 +520,6 @@ static inline notrace int trace_event_get_offsets_##call( \
return __data_size; \
}
-#undef DEFINE_EVENT_PRINT
-#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
- DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
-
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
/*
--
2.20.1 (Apple Git-117)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/4] tracing: define DEFINE_EVENT_PRINT not related to DEFINE_EVENT
2020-06-12 9:28 [PATCH 0/4] tracing: cleanup trace event macro Wei Yang
2020-06-12 9:28 ` [PATCH 1/4] tracing: not necessary to undefine DEFINE_EVENT again Wei Yang
2020-06-12 9:28 ` [PATCH 2/4] tracing: not necessary re-define DEFINE_EVENT_PRINT Wei Yang
@ 2020-06-12 9:28 ` Wei Yang
2020-06-12 9:28 ` [PATCH 4/4] tracing: not necessary to define DEFINE_EVENT_PRINT to be empty again Wei Yang
3 siblings, 0 replies; 5+ messages in thread
From: Wei Yang @ 2020-06-12 9:28 UTC (permalink / raw)
To: rostedt, mingo; +Cc: linux-kernel, Wei Yang
Current definition define DEFINE_EVENT_PRINT to be DEFINE_EVENT.
Actually, at this point DEFINE_EVENT is already an empty macro. Let's
cut the relationship between DEFINE_EVENT_PRINT and DEFINE_EVENT.
Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com>
---
include/trace/trace_events.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h
index 5219f81b9d74..43023c3e9d74 100644
--- a/include/trace/trace_events.h
+++ b/include/trace/trace_events.h
@@ -210,8 +210,7 @@ TRACE_MAKE_SYSTEM_STR();
#define DEFINE_EVENT(template, name, proto, args)
#undef DEFINE_EVENT_PRINT
-#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
- DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
+#define DEFINE_EVENT_PRINT(template, name, proto, args, print)
#undef TRACE_EVENT_FLAGS
#define TRACE_EVENT_FLAGS(event, flag)
@@ -444,8 +443,7 @@ static struct trace_event_fields trace_event_fields_##call[] = { \
{} };
#undef DEFINE_EVENT_PRINT
-#define DEFINE_EVENT_PRINT(template, name, proto, args, print) \
- DEFINE_EVENT(template, name, PARAMS(proto), PARAMS(args))
+#define DEFINE_EVENT_PRINT(template, name, proto, args, print)
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
--
2.20.1 (Apple Git-117)
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 4/4] tracing: not necessary to define DEFINE_EVENT_PRINT to be empty again
2020-06-12 9:28 [PATCH 0/4] tracing: cleanup trace event macro Wei Yang
` (2 preceding siblings ...)
2020-06-12 9:28 ` [PATCH 3/4] tracing: define DEFINE_EVENT_PRINT not related to DEFINE_EVENT Wei Yang
@ 2020-06-12 9:28 ` Wei Yang
3 siblings, 0 replies; 5+ messages in thread
From: Wei Yang @ 2020-06-12 9:28 UTC (permalink / raw)
To: rostedt, mingo; +Cc: linux-kernel, Wei Yang
After the previous cleanup, DEFINE_EVENT_PRINT's definition has no
relationship with DEFINE_EVENT. So After we re-define DEFINE_EVENT, it
is not necessary to define DEFINE_EVENT_PRINT to be empty again.
Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com>
---
include/trace/trace_events.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h
index 43023c3e9d74..1bc3e7bba9a4 100644
--- a/include/trace/trace_events.h
+++ b/include/trace/trace_events.h
@@ -709,9 +709,6 @@ static inline void ftrace_test_probe_##call(void) \
check_trace_callback_type_##call(trace_event_raw_event_##template); \
}
-#undef DEFINE_EVENT_PRINT
-#define DEFINE_EVENT_PRINT(template, name, proto, args, print)
-
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
#undef __entry
--
2.20.1 (Apple Git-117)
^ permalink raw reply [flat|nested] 5+ messages in thread