qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/3] scripts/qapi-gen.py: add --add-trace-events option


From: Paolo Bonzini
Subject: Re: [PATCH v3 2/3] scripts/qapi-gen.py: add --add-trace-events option
Date: Wed, 19 Jan 2022 09:41:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]