tracing: Fix minor typos in samples header
PATCH 1/1 tracing: Fix minor typos in samples header
Following minor corrections in the comments section of the trace events sample header file.
- There are 6 parts of the TRACE_EVENT macro instead of 5 (name, TP_PROTO, TP_ARGS, TP_STRUCT, TP_fast_assign, TP_printk).
- The example variable for __field_struct type should be the variable name instead of the variable.
- Improve closing brace alignment to improve readability.
--- samples/trace_events/trace-events-sample.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
samples/trace_events/trace-events-sample.h +3 -3
@@ -61,7 +61,7 @@#include <linux/tracepoint.h> /* -* The TRACE_EVENT macro is broken up into 5 parts. +* The TRACE_EVENT macro is broken up into 6 parts. * * name: name of the trace point. This is also how to enable the tracepoint. * A function called trace_foo_bar() will be created.
@@ -93,7 +93,7 @@* * __field_struct(struct bar, foo) * -* __entry->bar.x = y; +* __entry->foo.x = y; * __array: There are three fields (type, name, size). The type is the * type of elements in the array, the name is the name of the array.
@@ -410,7 +410,7 @@ TRACE_EVENT_CONDITION(foo_bar_with_cond,TP_STRUCT__entry (__string (foo ,foo ) -__field ( int, bar ) +__field ( int, bar ) ), TP_fast_assign(
--
2.39.2
Quoted 6 lines · Deepak R Varma
Following minor corrections in the comments section of the trace events sample header file.
- There are 6 parts of the
TRACE_EVENTmacro instead of 5 (name,TP_PROTO,TP_ARGS,TP_STRUCT,TP_fast_assign,TP_printk).
Quoted 7 lines
- The example variable for
__field_structtype should be the variable name instead of the variable.- Improve closing brace alignment to improve readability.
Signed-off-by Deepak R Varma <[email protected]>---
Hello,
May I request a feedback/status of this patch proposal?
Thank you,
deepak.
Quoted 37 lines
samples/trace_events/trace-events-sample.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)samples/trace_events/trace-events-sample.h +3
-4@@ -61,7 +61,7 @@#include <linux/tracepoint.h> /* -* The TRACE_EVENT macro is broken up into 5 parts. +* The TRACE_EVENT macro is broken up into 6 parts. * * name: name of the trace point. This is also how to enable the tracepoint. * A function called trace_foo_bar() will be created. @@ -93,7 +93,7 @@* * __field_struct(struct bar, foo) * -* __entry->bar.x = y; +* __entry->foo.x = y; * __array: There are three fields (type, name, size). The type is the * type of elements in the array, the name is the name of the array. @@ -410,7 +410,7 @@ TRACE_EVENT_CONDITION(foo_bar_with_cond,TP_STRUCT__entry (__string (foo ,foo ) -__field ( int, bar ) +__field ( int, bar ) ), TP_fast_assign( --2.39.2