Skip to content

Commit

Permalink
monitor: Check whether TCG is enabled before running the "info jit" code
Browse files Browse the repository at this point in the history
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>
Message-Id: <1493179907-22516-1-git-send-email-thuth@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Tested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
(cherry picked from commit b7da97e)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
  • Loading branch information
huth authored and mdroth committed Aug 31, 2017
1 parent c152efc commit e8679f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions monitor.c
Expand Up @@ -1091,6 +1091,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);
}
Expand Down

0 comments on commit e8679f5

Please sign in to comment.