aboutsummaryrefslogtreecommitdiff
path: root/accel/tcg/cpu-exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel/tcg/cpu-exec.c')
-rw-r--r--accel/tcg/cpu-exec.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 083ada76b1..635aeecc0a 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -214,17 +214,19 @@ static inline void log_cpu_exec(target_ulong pc, CPUState *cpu,
#if defined(DEBUG_DISAS)
if (qemu_loglevel_mask(CPU_LOG_TB_CPU)) {
- FILE *logfile = qemu_log_lock();
- int flags = 0;
+ FILE *logfile = qemu_log_trylock();
+ if (logfile) {
+ int flags = 0;
- if (qemu_loglevel_mask(CPU_LOG_TB_FPU)) {
- flags |= CPU_DUMP_FPU;
- }
+ if (qemu_loglevel_mask(CPU_LOG_TB_FPU)) {
+ flags |= CPU_DUMP_FPU;
+ }
#if defined(TARGET_I386)
- flags |= CPU_DUMP_CCOP;
+ flags |= CPU_DUMP_CCOP;
#endif
- log_cpu_state(cpu, flags);
- qemu_log_unlock(logfile);
+ cpu_dump_state(cpu, logfile, flags);
+ qemu_log_unlock(logfile);
+ }
}
#endif /* DEBUG_DISAS */
}