Re: [PATCH] tracing: Have unsigned int function args displayed as hexadecimal
From: Steven Rostedt <rostedt@goodmis.org>
Date: 2025-08-01 15:08:49
Also in:
bpf, lkml
From: Steven Rostedt <rostedt@goodmis.org>
Date: 2025-08-01 15:08:49
Also in:
bpf, lkml
On Fri, 1 Aug 2025 07:49:53 -0700 Yonghong Song [off-list ref] wrote:
quoted
@@ -744,7 +752,14 @@ void print_function_args(struct trace_seq *s, unsigned long *args, trace_seq_printf(s, "0x%lx", arg); break; case BTF_KIND_INT: - trace_seq_printf(s, "%ld", arg); + /* Get the INT encodoing */ + int_data = btf_type_int(t); + encode = BTF_INT_ENCODING(int_data);See different identation between above 'int_data' and 'encode'. The same as below.
Bah, I think I cut and pasted into emacs and it used spaces instead of tabs. -- Steve
quoted
+ /* Print unsigned ints as hex */ + if (encode & BTF_INT_SIGNED) + trace_seq_printf(s, "%ld", arg); + else + trace_seq_printf(s, "0x%lx", arg); break; case BTF_KIND_ENUM: trace_seq_printf(s, "%ld", arg);