qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/3] scripts/qapi/commands: gen_commands(): add add_trace_poi


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH 1/3] scripts/qapi/commands: gen_commands(): add add_trace_points argument
Date: Thu, 23 Dec 2021 13:38:13 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

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



reply via email to

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