Re: [PATCH] perf dwarf-aux: Print array type name with "[]"

From: Arnaldo Carvalho de Melo
Date: Tue May 07 2024 - 20:42:16 EST


On Wed, May 08, 2024 at 08:57:51AM +0900, Masami Hiramatsu wrote:
> On Mon, 6 May 2024 21:13:38 -0700
> Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
>
> > It's confusing both pointers and arrays are printed as *. Let's print
> > array types with [] so that we can identify them easily. Although it's
> > interchangable, sometimes it can cause confusion with size like in the
> > below example.
> >
> > Note that it is not the same with C syntax where it goes to the variable
> > names, but we want to have it in the type names (like in Go language).
> >
> > Before:
> > mov [20] 0x68(reg5) -> reg0 type='struct page**' size=0x80 (die:0x4e61d32)
> >
> > After:
> > mov [20] 0x68(reg5) -> reg0 type='struct page*[]' size=0x80 (die:0x4e61d32)
> >
>
> Good improvement!
>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>

Indeed,

Thanks, applied to perf-tools-next,

- Arnaldo