mbox series

[v6,0/7] trace qmp commands

Message ID 20220126161130.3240892-1-vsementsov@virtuozzo.com (mailing list archive)
Headers show
Series trace qmp commands | expand

Message

Vladimir Sementsov-Ogievskiy Jan. 26, 2022, 4:11 p.m. UTC
This series aims to add trace points for each qmp command with help of
qapi code generator.

v6:
01-04,07: add Stefan's r-b
01: - subject changed
    - rename:
       gen_trace_events --> gen_tracing
       _gen_trace_events --> _gen_tracing
       _gent() --> _gen_trace_events()
    - a bit more compact code for gent initializing
03: - rename:
       gen_trace_events --> gen_tracing
       _gen_trace_events --> _gen_tracing
04: fix --add-trace-events -> --gen-trace in commit message
05: - drop extra two sentences
    - reword
    - add example .trace-events file
06: reword
07: rename option to --suppress-tracing

Vladimir Sementsov-Ogievskiy (7):
  qapi/gen: Add FOO.trace-events output module
  qapi/commands: refactor error handling code
  qapi/commands: Optionally generate trace for QMP commands
  meson: generate trace events for qmp commands
  docs/qapi-code-gen: update to cover trace events code generation
  meson: document, why we don't generate trace events for tests/ and
    qga/
  qapi: generate trace events by default

 docs/devel/qapi-code-gen.rst |  25 ++++++++-
 meson.build                  |   3 ++
 qapi/meson.build             |   7 +++
 qga/meson.build              |  10 +++-
 scripts/qapi/commands.py     | 101 ++++++++++++++++++++++++++++++-----
 scripts/qapi/gen.py          |  31 +++++++++--
 scripts/qapi/main.py         |  14 +++--
 tests/meson.build            |  10 +++-
 trace/meson.build            |  11 ++--
 9 files changed, 185 insertions(+), 27 deletions(-)

Comments

Markus Armbruster Jan. 27, 2022, 7:32 a.m. UTC | #1
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:

> This series aims to add trace points for each qmp command with help of
> qapi code generator.

Logging QMP traffic has worked well enough for me, but I can understand
why you'd like to use tracing.  Other uses of tracing might come up in
the future.

I found a few last nits to pick.  Happy to address them in my tree.

Except for PATCH 4
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Stefan Hajnoczi Jan. 27, 2022, 8:21 a.m. UTC | #2
On Wed, Jan 26, 2022 at 05:11:23PM +0100, Vladimir Sementsov-Ogievskiy wrote:
> This series aims to add trace points for each qmp command with help of
> qapi code generator.
> 
> v6:
> 01-04,07: add Stefan's r-b
> 01: - subject changed
>     - rename:
>        gen_trace_events --> gen_tracing
>        _gen_trace_events --> _gen_tracing
>        _gent() --> _gen_trace_events()
>     - a bit more compact code for gent initializing
> 03: - rename:
>        gen_trace_events --> gen_tracing
>        _gen_trace_events --> _gen_tracing
> 04: fix --add-trace-events -> --gen-trace in commit message
> 05: - drop extra two sentences
>     - reword
>     - add example .trace-events file
> 06: reword
> 07: rename option to --suppress-tracing
> 
> Vladimir Sementsov-Ogievskiy (7):
>   qapi/gen: Add FOO.trace-events output module
>   qapi/commands: refactor error handling code
>   qapi/commands: Optionally generate trace for QMP commands
>   meson: generate trace events for qmp commands
>   docs/qapi-code-gen: update to cover trace events code generation
>   meson: document, why we don't generate trace events for tests/ and
>     qga/
>   qapi: generate trace events by default
> 
>  docs/devel/qapi-code-gen.rst |  25 ++++++++-
>  meson.build                  |   3 ++
>  qapi/meson.build             |   7 +++
>  qga/meson.build              |  10 +++-
>  scripts/qapi/commands.py     | 101 ++++++++++++++++++++++++++++++-----
>  scripts/qapi/gen.py          |  31 +++++++++--
>  scripts/qapi/main.py         |  14 +++--
>  tests/meson.build            |  10 +++-
>  trace/meson.build            |  11 ++--
>  9 files changed, 185 insertions(+), 27 deletions(-)
> 
> -- 
> 2.31.1
> 

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Vladimir Sementsov-Ogievskiy Jan. 27, 2022, 9:41 a.m. UTC | #3
27.01.2022 10:32, Markus Armbruster wrote:
> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
> 
>> This series aims to add trace points for each qmp command with help of
>> qapi code generator.
> 
> Logging QMP traffic has worked well enough for me, but I can understand
> why you'd like to use tracing.  Other uses of tracing might come up in
> the future.
> 
> I found a few last nits to pick.  Happy to address them in my tree.

That would be great, thanks a lot!

> 
> Except for PATCH 4

It has "Acked-by: Paolo", so seems we are done.

> Reviewed-by: Markus Armbruster <armbru@redhat.com>
> 

Thanks!
Vladimir Sementsov-Ogievskiy Jan. 27, 2022, 9:41 a.m. UTC | #4
27.01.2022 11:21, Stefan Hajnoczi wrote:
> On Wed, Jan 26, 2022 at 05:11:23PM +0100, Vladimir Sementsov-Ogievskiy wrote:
>> This series aims to add trace points for each qmp command with help of
>> qapi code generator.
>>
>> v6:
>> 01-04,07: add Stefan's r-b
>> 01: - subject changed
>>      - rename:
>>         gen_trace_events --> gen_tracing
>>         _gen_trace_events --> _gen_tracing
>>         _gent() --> _gen_trace_events()
>>      - a bit more compact code for gent initializing
>> 03: - rename:
>>         gen_trace_events --> gen_tracing
>>         _gen_trace_events --> _gen_tracing
>> 04: fix --add-trace-events -> --gen-trace in commit message
>> 05: - drop extra two sentences
>>      - reword
>>      - add example .trace-events file
>> 06: reword
>> 07: rename option to --suppress-tracing
>>
>> Vladimir Sementsov-Ogievskiy (7):
>>    qapi/gen: Add FOO.trace-events output module
>>    qapi/commands: refactor error handling code
>>    qapi/commands: Optionally generate trace for QMP commands
>>    meson: generate trace events for qmp commands
>>    docs/qapi-code-gen: update to cover trace events code generation
>>    meson: document, why we don't generate trace events for tests/ and
>>      qga/
>>    qapi: generate trace events by default
>>
>>   docs/devel/qapi-code-gen.rst |  25 ++++++++-
>>   meson.build                  |   3 ++
>>   qapi/meson.build             |   7 +++
>>   qga/meson.build              |  10 +++-
>>   scripts/qapi/commands.py     | 101 ++++++++++++++++++++++++++++++-----
>>   scripts/qapi/gen.py          |  31 +++++++++--
>>   scripts/qapi/main.py         |  14 +++--
>>   tests/meson.build            |  10 +++-
>>   trace/meson.build            |  11 ++--
>>   9 files changed, 185 insertions(+), 27 deletions(-)
>>
>> -- 
>> 2.31.1
>>
> 
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> 

Thanks a lot for reviewing!
Markus Armbruster Jan. 27, 2022, 11:10 a.m. UTC | #5
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:

> 27.01.2022 10:32, Markus Armbruster wrote:
>> Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> writes:
>> 
>>> This series aims to add trace points for each qmp command with help of
>>> qapi code generator.
>> Logging QMP traffic has worked well enough for me, but I can
>> understand
>> why you'd like to use tracing.  Other uses of tracing might come up in
>> the future.
>> I found a few last nits to pick.  Happy to address them in my tree.
>
> That would be great, thanks a lot!
>
>> Except for PATCH 4
>
> It has "Acked-by: Paolo", so seems we are done.
>
>> Reviewed-by: Markus Armbruster <armbru@redhat.com>

Queued, thanks!