qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: kwolf@redhat.com, michael.roth@amd.com, qemu-devel@nongnu.org,
	hreitz@redhat.com, stefanha@redhat.com, jsnow@redhat.com
Subject: Re: [PATCH v3 2/3] scripts/qapi-gen.py: add --add-trace-events option
Date: Wed, 19 Jan 2022 09:41:40 +0100	[thread overview]
Message-ID: <4938a29f-a4a2-2a2e-990c-90789a1e8090@redhat.com> (raw)
In-Reply-To: <87zgnt86ow.fsf@dusky.pond.sub.org>

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	other threads:[~2022-01-19  9:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17 20:18 [PATCH v3 0/3] trace qmp commands Vladimir Sementsov-Ogievskiy
2022-01-17 20:18 ` [PATCH v3 1/3] scripts/qapi/gen.py: add .trace-events file for module Vladimir Sementsov-Ogievskiy
2022-01-18  8:38   ` Markus Armbruster
2022-01-18 10:34     ` Vladimir Sementsov-Ogievskiy
2022-01-17 20:18 ` [PATCH v3 2/3] scripts/qapi-gen.py: add --add-trace-events option Vladimir Sementsov-Ogievskiy
2022-01-18 10:27   ` Markus Armbruster
2022-01-18 11:58     ` Vladimir Sementsov-Ogievskiy
2022-01-18 14:22       ` Markus Armbruster
2022-01-19  8:41         ` Paolo Bonzini [this message]
2022-01-17 20:18 ` [PATCH v3 3/3] meson: generate trace events for qmp commands Vladimir Sementsov-Ogievskiy
2022-01-18 10:30   ` Markus Armbruster
2022-01-18 12:21     ` Paolo Bonzini
2022-01-18 13:05       ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4938a29f-a4a2-2a2e-990c-90789a1e8090@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).