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? > 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? 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? > Signed-off-by: Marc-André Lureau <[email protected]>
