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<vsement...@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