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)}'