Hi

On Wed, Sep 9, 2026 at 6:25 PM Markus Armbruster <[email protected]> wrote:
>
> Marc-André Lureau <[email protected]> writes:
>
> > Rename QAPISchemaUsedTypes to QAPISchemaTypeAnalysis and broaden type
> > collection: instead of discovering types transitively from commands and
> > events, register every non-implicit type upfront in visit_needed() and
> > let visit_end() resolve their dependencies.
>
> So, we now discover types transitively from commands, events, and
> non-implicit types.  Correct?

As well as arrays, yes

>
> > This is needed so that QOM property types that are defined in the QAPI
> > schema but not referenced by any command or event still appear in
> > query-qmp-schema output, making them introspectable by management tools.
>
> It's the stupidest solution that could possibly work.  I respect that.
>
> > Commands and events still register their (often implicit) argument and
> > return types, which visit_needed() intentionally skips.
> >
> > This makes the x86-64 schema grow from 244K to 265K.
>
> You mean the output of query-qmp-schema, don't you?

Yes, I'll clarify in commit message

>
> I see it grow like you wrote modulo a KiB or two.  Tolerable, I guess.
>
> The QAPI schema has some 1400 definitions.
>
> Before the patch, query-qmp-schema shows some 1250 of them (89%).
> Afterwards, it's just under 1350 (96%).
>
> I didn't check how many of the additional types are actually used for
> QOM properties at the end of the series.  The ones that aren't are and
> thus dead weight in query-qmp-schema output.  I'm sure we could come up
> with a way to cut them out, but would it be worth our while?  Even if
> most of them are dead weight, most of a small number is still a small
> number.
>
> Still elided are 38 implicit union base types and the builtin integer
> types we don't expose in introspection (9 total), and their lists
> (another 9).
>
> Computing reachability to elide these is kinda ridiculous :)
>
> Thoughts?


I agree that filtering out types unused by QOM probably isn't worth at
this point

There's also a follow-up at the end of the series that exposes integer
signedness and width. It removes the mapping to "int" and preserves
integer array element types, so the nine integer types and their lists
will appear in introspection too.

thanks

Reply via email to