From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, stefanha@redhat.com, michael.roth@amd.com,
jsnow@redhat.com, hreitz@redhat.com, kwolf@redhat.com,
pbonzini@redhat.com
Subject: Re: [PATCH v6 3/7] qapi/commands: Optionally generate trace for QMP commands
Date: Thu, 27 Jan 2022 12:42:11 +0300 [thread overview]
Message-ID: <a9406859-5c41-a72a-e22c-d4e4db06fcfd@virtuozzo.com> (raw)
In-Reply-To: <87y231vdya.fsf@dusky.pond.sub.org>
27.01.2022 10:24, Markus Armbruster wrote:
> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
>
>> Add trace generation disabled by default and new option --gen-trace to
>> enable it. The next commit will enable it for qapi/, but not for qga/
>> and tests/. Making it work for the latter two would involve some Meson
>> hackery to ensure we generate the trace-events files before trace-tool
>> uses them. Since we don't actually support tracing there, we'll bypass
>> that problem.
>>
>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
>> ---
>> scripts/qapi/commands.py | 91 +++++++++++++++++++++++++++++++++++-----
>> scripts/qapi/main.py | 14 +++++--
>> 2 files changed, 91 insertions(+), 14 deletions(-)
>>
>> diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py
>> index 17e5ed2414..fa90b6246b 100644
>> --- a/scripts/qapi/commands.py
>> +++ b/scripts/qapi/commands.py
>
> [...]
>
>> @@ -265,6 +319,17 @@ def _begin_user_module(self, name: str) -> None:
>>
>> ''',
>> commands=commands, visit=visit))
>> +
>> + if self._gen_tracing and commands != 'qapi-commands':
>> + self._genc.add(mcgen('''
>> +#include "trace/trace-qapi.h"
>
> I believe this include is superfluous.
No objections to drop it
>
>> +#include "qapi/qmp/qjson.h"
>> +#include "trace/trace-%(nm)s_trace_events.h"
>> +''',
>> + nm=c_name(commands, protect=False)))
>> + # We use c_name(commands, protect=False) to turn '-' into '_', to
>> + # match .underscorify() in trace/meson.build
>> +
>> self._genh.add(mcgen('''
>> #include "%(types)s.h"
>>
>
> [...]
>
--
Best regards,
Vladimir
next prev parent reply other threads:[~2022-01-27 10:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-26 16:11 [PATCH v6 0/7] trace qmp commands Vladimir Sementsov-Ogievskiy
2022-01-26 16:11 ` [PATCH v6 1/7] qapi/gen: Add FOO.trace-events output module Vladimir Sementsov-Ogievskiy
2022-01-26 16:11 ` [PATCH v6 2/7] qapi/commands: refactor error handling code Vladimir Sementsov-Ogievskiy
2022-01-26 16:11 ` [PATCH v6 3/7] qapi/commands: Optionally generate trace for QMP commands Vladimir Sementsov-Ogievskiy
2022-01-27 7:24 ` Markus Armbruster
2022-01-27 9:42 ` Vladimir Sementsov-Ogievskiy [this message]
2022-01-26 16:11 ` [PATCH v6 4/7] meson: generate trace events for qmp commands Vladimir Sementsov-Ogievskiy
2022-01-26 16:11 ` [PATCH v6 5/7] docs/qapi-code-gen: update to cover trace events code generation Vladimir Sementsov-Ogievskiy
2022-01-27 8:20 ` Stefan Hajnoczi
2022-01-26 16:11 ` [PATCH v6 6/7] meson: document, why we don't generate trace events for tests/ and qga/ Vladimir Sementsov-Ogievskiy
2022-01-27 6:50 ` Markus Armbruster
2022-01-27 9:26 ` Vladimir Sementsov-Ogievskiy
2022-01-27 6:51 ` Markus Armbruster
2022-01-27 8:21 ` Stefan Hajnoczi
2022-01-26 16:11 ` [PATCH v6 7/7] qapi: generate trace events by default Vladimir Sementsov-Ogievskiy
2022-01-27 7:32 ` [PATCH v6 0/7] trace qmp commands Markus Armbruster
2022-01-27 9:41 ` Vladimir Sementsov-Ogievskiy
2022-01-27 11:10 ` Markus Armbruster
2022-01-27 8:21 ` Stefan Hajnoczi
2022-01-27 9:41 ` Vladimir Sementsov-Ogievskiy
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=a9406859-5c41-a72a-e22c-d4e4db06fcfd@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=armbru@redhat.com \
--cc=hreitz@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=michael.roth@amd.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).