From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-devel@nongnu.org
Cc: stefanha@redhat.com, michael.roth@amd.com, armbru@redhat.com,
pbonzini@redhat.com
Subject: Re: [PATCH 1/3] scripts/qapi/commands: gen_commands(): add add_trace_points argument
Date: Thu, 23 Dec 2021 13:38:13 +0300 [thread overview]
Message-ID: <17f72d0e-4474-ff04-0614-83b8fb7b31ad@virtuozzo.com> (raw)
In-Reply-To: <20211221193502.114296-2-vsementsov@virtuozzo.com>
21.12.2021 22:35, Vladimir Sementsov-Ogievskiy wrote:
> Add possibility to generate trace points for each qmp command.
>
> We should generate both trace points and trace-events file, for further
> trace point code generation.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy<vsementsov@virtuozzo.com>
> ---
> scripts/qapi/commands.py | 84 ++++++++++++++++++++++++++++++++++------
> 1 file changed, 73 insertions(+), 11 deletions(-)
>
> diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py
> index 21001bbd6b..e62f1a4125 100644
> --- a/scripts/qapi/commands.py
> +++ b/scripts/qapi/commands.py
> @@ -53,7 +53,8 @@ def gen_command_decl(name: str,
> def gen_call(name: str,
> arg_type: Optional[QAPISchemaObjectType],
> boxed: bool,
> - ret_type: Optional[QAPISchemaType]) -> str:
> + ret_type: Optional[QAPISchemaType],
> + add_trace_points: bool) -> str:
> ret = ''
>
> argstr = ''
> @@ -71,21 +72,65 @@ def gen_call(name: str,
> if ret_type:
> lhs = 'retval = '
>
> - ret = mcgen('''
> + qmp_name = f'qmpq_{c_name(name)}'
That was called qmpq_ because qmp_ conflicts with existing qmp_ trace points for jobs. But looking at them, they don't add much information to new qmpq_ trace events, so, in v2 I'll remove old qmp_ trace points (not many of them) and new generated trace points will be named simply qmp_*
--
Best regards,
Vladimir
next prev parent reply other threads:[~2021-12-23 10:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-21 19:34 [PATCH RFC 0/3] trace qmp commands Vladimir Sementsov-Ogievskiy
2021-12-21 19:35 ` [PATCH 1/3] scripts/qapi/commands: gen_commands(): add add_trace_points argument Vladimir Sementsov-Ogievskiy
2021-12-23 10:38 ` Vladimir Sementsov-Ogievskiy [this message]
2021-12-21 19:35 ` [PATCH 2/3] scripts/qapi-gen.py: add --add-trace-points option Vladimir Sementsov-Ogievskiy
2021-12-23 6:50 ` Philippe Mathieu-Daudé
2021-12-21 19:35 ` [PATCH 3/3] meson: generate trace points for qmp commands Vladimir Sementsov-Ogievskiy
2021-12-22 22:11 ` Paolo Bonzini
2021-12-23 9:33 ` Vladimir Sementsov-Ogievskiy
2021-12-23 10: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=17f72d0e-4474-ff04-0614-83b8fb7b31ad@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=armbru@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).