On 1/18/22 15:22, Markus Armbruster wrote:
So, supporting auto-generated trace points for qga qmp commands requires some
deeper refactoring.
Similar trouble with tests?
The normal case seems to be "generate trace code", with an exception for
cases where our build system defeats that. Agree?
More specifically, it's the lack of "include" statements: the only kind
of include statement allowed by Meson is "include('foo/meson.build')"
which is actually spelled "subdir('foo')".
What this would require is akin to
include('qga/meson.qapi.build')
include('tests/qapi/meson.qapi.build')
include('trace/meson.build')
...
include('qga/meson.build')
There has been an issue open in Meson forever about this:
https://github.com/mesonbuild/meson/issues/375. Some discussion can be
found in https://github.com/mesonbuild/meson/pull/5209.
A somewhat ugly workaround would be something like
subdir('qga/qapi')
subdir('qapi')
subdir('trace')
...
subdir('qga')
Or even, move the .json files for qemu-ga and tests to qapi/qga and
qapi/tests respectively.
That said, given that there's no tracing support in either trace nor in
qemu-ga, I agree with Vladimir's assessment that there is no reason to
do it.
Paolo
If yes, I'd prefer to default to "generate trace code", and have an
option to suppress it, with suitable TODO comment(s) explaining why.