Re: [PATCH v4 10/19] gendwarfksyms: Limit structure expansion

Sami Tolvanen
2024-10-16T21:22:23Z

Hi Petr,

On Wed, Oct 16, 2024 at 2:16 PM Petr Pavlu <petr.pavlu@suse.com> wrote:
>
> On 10/8/24 20:38, Sami Tolvanen wrote:
> > /*
> > - * These can be emitted for stand-elone assembly code, which means we
> > + * These can be emitted for stand-alone assembly code, which means we
> > * might run into them in vmlinux.o.
> > */
> > process(cache, "unspecified_type");
>
> Nit: This hunk should be folded into patch #9 ("gendwarfksyms: Expand
> structure types").

Oops, I'll fix this in the next version.

> The commit message and the comment in process_type() describe that each
> structure type should be expanded only once per symbol, but that doesn't
> seem to be the case?

Yup, it looks like I messed up the logic here. The ptr_depth check
should be later.

> If I follow correctly, the type_expand() logic on the output eventually
> performs only the first expansion for the CRC calculation. However, it
> looks this process_type() code should do the same, if only to be a bit
> faster. Or did I misunderstand anything how this should work?
>
> I played with the following (applies on the top of the series), which
> matches my understanding of what should happen:

This looks correct to me, and do I like the way you cleaned this up.
I'll apply this to v5. Thanks!

Sami