translate-all: remove redundant !tcg_enabled check in dump_exec_info
authorEmilio G. Cota <cota@braap.org>
Sun, 9 Jul 2017 07:49:54 +0000 (03:49 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Jul 2017 10:04:42 +0000 (12:04 +0200)
This check is redundant because it is already performed by the only
caller of dump_exec_info -- the caller was updated by b7da97eef
("monitor: Check whether TCG is enabled before running the "info jit"
code").

Checking twice wouldn't necessarily be too bad, but here the check also
returns with tb_lock held. So we can either do the check before tb_lock is
acquired, or just get rid of it. Given that it is redundant, I am going
for the latter option.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
accel/tcg/translate-all.c

index 0caf80db75f559adae8841a93925a733b59f3ebc..4e1831cbb9dc1bf90b85e438a8d860891b458b51 100644 (file)
@@ -1851,11 +1851,6 @@ void dump_exec_info(FILE *f, fprintf_function cpu_fprintf)
 
     tb_lock();
 
-    if (!tcg_enabled()) {
-        cpu_fprintf(f, "TCG not enabled\n");
-        return;
-    }
-
     target_code_size = 0;
     max_target_code_size = 0;
     cross_page = 0;