[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250801110907.121f32ee@gandalf.local.home>
Date: Fri, 1 Aug 2025 11:09:07 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Yonghong Song <yonghong.song@...ux.dev>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux Trace Kernel
<linux-trace-kernel@...r.kernel.org>, Masami Hiramatsu
<mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
bpf@...r.kernel.org, Douglas Raillard <douglas.raillard@....com>
Subject: Re: [PATCH] tracing: Have unsigned int function args displayed as
hexadecimal
On Fri, 1 Aug 2025 07:49:53 -0700
Yonghong Song <yonghong.song@...ux.dev> wrote:
> > @@ -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
>
> > + /* 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);
Powered by blists - more mailing lists