Re: [PATCH v2] perf trace: Add --bitmask-list option and correct cpumask formatting

From: Aaron Tomlin

Date: Sat Jul 18 2026 - 01:22:09 EST


On Fri, Jul 17, 2026 at 10:02:32PM -0700, Namhyung Kim wrote:
> On Thu, Jul 16, 2026 at 09:35:44PM -0400, Aaron Tomlin wrote:
> > Currently, dynamic non-array fields such as 'cpumask_t' are mishandled
> > in 'perf trace', causing the raw length and offset descriptors to be
> > interpreted and displayed as a literal integer (e.g., 'cpumask: 524320'
> > instead of the actual mask data).
> >
> > This patch corrects the parsing of dynamic fields that do not have the
> > TEP_FIELD_IS_ARRAY flag set. By doing so, it ensures the pointer to the
> > raw bits is properly resolved within the payload.
> >
> > Furthermore, it improves the display formatting for 'cpumask' types:
> > - By default, the cpumask is now correctly output as a zero-suppressed
> > hexadecimal string, resolving the aforementioned integer display
> > anomaly
> >
> > - A new '--bitmask-list' command-line option has been introduced.
> > When specified, this delegates formatting to 'bitmap_scnprintf()',
> > enabling the cpumask to be rendered as a condensed, human-readable
> > list (e.g., '0,2-5,7')
>
> Looks like you are doing two things in a patch. Can you please split?

Hi Namhyung,

Thank you for your feedback.

Sure.

> And for any user visible changes, I encourage you to add an example
> output in the commit message. Also please update the documentation for
> the new option.

Understood—I will address the above in the next iteration.


Kind regards,
--
Aaron Tomlin