Re: [PATCH] perf trace: Format instruction pointer fields as hexadecimal

From: Aaron Tomlin

Date: Sun Jul 19 2026 - 21:50:52 EST


On Sun, Jul 19, 2026 at 03:10:00PM -0400, Aaron Tomlin wrote:
> Provide a helper function trace__field_is_ip() in
> trace__fprintf_tp_fields() to ensure that tracepoint fields representing
> instruction pointers such as "__probe_ip", "caller_ip", and
> "call_site" are always formatted as hexadecimal memory addresses rather
> than signed integers.
>
> For example, when running a kmem:kfree tracepoint:
>
> # perf trace --show-cpu --event kmem:kfree --max-event 1
>
> Before this change, "call_site" was represented as a signed integer:
> 0.000 [003] xfce4-terminal/2201 kmem:kfree(call_site: -1714572588, ptr: 0xffff8afee0303000)
>
> After this change, "call_site" is correctly represented in hexadecimal:
> 0.000 [003] xfce4-terminal/2201 kmem:kfree(call_site: 0xffffffff99cf1194, ptr: 0xffff8afee0303000)
>
> This improves the readability of perf trace output by making code
> addresses straightforward to parse and map to kernel symbols.
>
> Signed-off-by: Aaron Tomlin <atomlin@xxxxxxxxxxx>
> ---
> tools/perf/builtin-trace.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)

Hi Peter, Ingo, Arnaldo, Namhyung, Ian,

Please note that this patch was rebased on "perf trace: Correct cpumask
formatting and add --bitmask-list" (Message-ID:
20260719001510.398616-1-atomlin@xxxxxxxxxxx).


Kind regards,
--
Aaron Tomlin