qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] monitor: Check whether TCG is enabled before running the "info jit" code
@ 2017-04-26  4:11 Thomas Huth
  2017-04-26  8:18 ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2017-04-26  4:11 UTC (permalink / raw)
  To: Dr. David Alan Gilbert, qemu-devel; +Cc: Markus Armbruster, Peter Maydell

The "info jit" command currently aborts on Mac OS X with the message
"qemu_mutex_lock: Invalid argument" when running with "-M accel=qtest".
We should only call into the TCG code here if TCG has really been
enabled and initialized.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 monitor.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/monitor.c b/monitor.c
index be282ec..3e0979d 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1086,6 +1086,11 @@ static void hmp_info_registers(Monitor *mon, const QDict *qdict)
 
 static void hmp_info_jit(Monitor *mon, const QDict *qdict)
 {
+    if (!tcg_enabled()) {
+        error_report("JIT information is only available with accel=tcg");
+        return;
+    }
+
     dump_exec_info((FILE *)mon, monitor_fprintf);
     dump_drift_info((FILE *)mon, monitor_fprintf);
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-26  9:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-26  4:11 [Qemu-devel] [PATCH] monitor: Check whether TCG is enabled before running the "info jit" code Thomas Huth
2017-04-26  8:18 ` Dr. David Alan Gilbert
2017-04-26  9:21   ` Peter Maydell
2017-04-26  9:27     ` Dr. David Alan Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).