tracing: Remove second parameter to __assign_rel_str()
Steven Rostedt
maintainerPATCH 1/1 tracing: Remove second parameter to __assign_rel_str()
From: "Steven Rostedt (Google)" <[email protected]>
The second parameter of __assign_rel_str() is no longer used. It can be removed.
Note, the only real users of rel_string is user events. This code is just in the sample code for testing purposes.
This makes __assign_rel_str() different than __assign_str() but that's fine. __assign_str() is used over 700 places and has a larger impact. That change will come later.
--- include/trace/stages/stage6_event_callback.h | 2 +- samples/trace_events/trace-events-sample.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/trace/stages/stage6_event_callback.h +1 -1
@@ -91,7 +91,7 @@#define __rel_string_len (item, src, len) __rel_dynamic_array(char, item, -1)#undef __assign_rel_str -#define __assign_rel_str (dst, src) \ +#define __assign_rel_str (dst) \ do { \ char *__str__ = __get_rel_str(dst); \ int __len__ = __get_rel_dynamic_array_len(dst) - 1; \
samples/trace_events/trace-events-sample.h +1 -1
@@ -574,7 +574,7 @@ TRACE_EVENT(foo_rel_loc, ), TP_fast_assign( - __assign_rel_str(foo, foo); + __assign_rel_str(foo); __entry->bar = bar;__assign_rel_bitmask (bitmask, mask,BITS_PER_BYTE *sizeof (unsigned long ));
Signature · 1 line
2.43.0
Quoted 10 lines · On Fri, 23 Feb 2024 16:25:19 -0500 Steven Rostedt <[email protected]> wrote:
From: "Steven Rostedt (Google)" <[email protected]>
The second parameter of
__assign_rel_str()is no longer used. It can be removed.Note, the only real users of
rel_stringis user events. This code is just in the sample code for testing purposes.This makes
__assign_rel_str()different than__assign_str()but that's fine.__assign_str()is used over 700 places and has a larger impact. That change will come later.
Looks good to me.
Thanks,
Quoted 36 lines
Signed-off-by Steven Rostedt (Google) <[email protected]>--- include/trace/stages/stage6_event_callback.h | 2 +- samples/trace_events/trace-events-sample.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)include/trace/stages/stage6_event_callback.h +1
-1@@ -91,7 +91,7 @@#define __rel_string_len (item, src, len) __rel_dynamic_array(char, item, -1)#undef __assign_rel_str -#define __assign_rel_str (dst, src) \ +#define __assign_rel_str (dst) \ do { \ char *__str__ = __get_rel_str(dst); \ int __len__ = __get_rel_dynamic_array_len(dst) - 1; \samples/trace_events/trace-events-sample.h +1
-1@@ -574,7 +574,7 @@ TRACE_EVENT(foo_rel_loc, ), TP_fast_assign( - __assign_rel_str(foo, foo); + __assign_rel_str(foo); __entry->bar = bar;__assign_rel_bitmask (bitmask, mask,BITS_PER_BYTE *sizeof (unsigned long ));Signature · 1 line
2.43.0
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>