Skip to contentSkip to conversation

trace: Do not try to include QMP commands in user emulation binaries

PATCH In review Philippe Mathieu-Daudé 2 participants 3 messages Dec 20, 2022 – Dec 21, 2022 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace: Do not try to include QMP commands in user emulation binaries

QMP is not available on user emulation; there is not monitor. Besides, since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the qapi-commands-trace.h header in a user-emulation-only build.

Remove the QMP trace commands from qemu-user binaries.

---
 trace/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
trace/meson.build +3 -1
index 26b54714d5..4385afbff0 100644
@@ -88,4 +88,6 @@ if 'ftrace' in get_option('trace_backends')
   trace_ss.add(files('ftrace.c'))
 endif
 trace_ss.add(files('control.c'))
-trace_ss.add(files('qmp.c'))
+if have_system or have_tools or have_ga
+  trace_ss.add(files('qmp.c'))
+endif
Signature · 1 line
2.38.1
#1 lore raw
Quoted 17 lines · Philippe Mathieu-Daudé

QMP is not available on user emulation; there is not monitor. Besides, since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the qapi-commands-trace.h header in a user-emulation-only build.

Remove the QMP trace commands from qemu-user binaries.

---
  trace/meson.build | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
trace/meson.build +0 -0
index 26b54714d5..4385afbff0 100644

trace/meson.build if 'ftrace' in get_option('trace_backends') · line 91

Quoted 5 lines
trace/meson.build +1 -1
@@ -88,4 +88,6 @@ if 'ftrace' in get_option('trace_backends')
    trace_ss.add(files('ftrace.c'))
  endif
  trace_ss.add(files('control.c'))
-trace_ss.add(files('qmp.c'))
+if have_system or have_tools or have_ga

Maybe this pattern deserves adding a variable similar to:

have_monitor = have_system or have_tools or have_ga

Quoted 2 lines
trace/meson.build +2 -0
+  trace_ss.add(files('qmp.c'))
+endif
Acked-by on v1 1/1
#2 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 11 lines · Philippe Mathieu-Daudé

QMP is not available on user emulation; there is not monitor. Besides, since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the qapi-commands-trace.h header in a user-emulation-only build.

Remove the QMP trace commands from qemu-user binaries.

---
  trace/meson.build | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

r~

Quoted 13 lines
trace/meson.build +3 -1
index 26b54714d5..4385afbff0 100644
@@ -88,4 +88,6 @@ if 'ftrace' in get_option('trace_backends')
    trace_ss.add(files('ftrace.c'))
  endif
  trace_ss.add(files('control.c'))
-trace_ss.add(files('qmp.c'))
+if have_system or have_tools or have_ga
+  trace_ss.add(files('qmp.c'))
+endif