Re: [PATCH v2] perf trace: Format fields with hex specifiers in print_fmt as hexadecimal
From: Aaron Tomlin
Date: Wed Aug 05 2026 - 14:54:02 EST
On Wed, Aug 05, 2026 at 11:28:16AM -0700, Namhyung Kim wrote:
> On Mon, 03 Aug 2026 08:48:45 -0400, Aaron Tomlin wrote:
> > Currently, when a probe event is added using perf probe --add with a
> > hexadecimal type cast (e.g., var:x64 and var:x32), the kernel traceprobe
> > subsystem sets the field type to "u64" in the event's format file, yet
> > generates a print format specifier of "var=0x%Lx" or "0x%x".
> >
> > By default, perf trace uses its internal beautifiers which only inspect
> > field->type and field->flags. Because traceprobe events declare
> > primitive integer field types ("u64") without a C pointer asterisk
> > (i.e., "*"), perf trace defaults to printing the field's value as a
> > decimal unsigned long ("%ld"), ignoring the hexadecimal intent.
> >
> > [...]
> Applied to perf-tools-next, thanks!
>
> Best regards,
> Namhyung
Thank you Namhyung!
--
Aaron Tomlin