Skip to contentSkip to conversation

Remove duplicate CPU logging

PATCH In review Richard Henderson 3 participants 7 messages Apr 5, 2010 – Apr 9, 2010

lore
Share & tools
lore
#0 lore raw

cover Remove duplicate CPU logging

Generic code handles -d cpu in cpu_exec, amidst the horde of ifdefs. These duplicates simply double the amount of output produced with no extra information emitted.

Maintainers for mips, ppc and sh4 cc'd.

r~

Richard Henderson (4):
target-i386: Remove duplicate CPU log.
target-mips: Remove duplicate CPU log.
target-ppc: Remove duplicate cpu log.
target-sh4: Remove duplicate CPU log.

 target-i386/translate.c |    1 -
 target-mips/translate.c |    6 ------
 target-ppc/translate.c  |    2 --
 target-sh4/translate.c  |    6 ------
 4 files changed, 0 insertions(+), 15 deletions(-)
#1 lore raw

PATCH 1/4 target-i386: Remove duplicate CPU log.

The proper logging for -d cpu is done in generic code.

---
 target-i386/translate.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
target-i386/translate.c +0 -1
index 28d9940..66d8e75 100644
@@ -7891,7 +7891,6 @@ static inline void gen_intermediate_code_internal(CPUState *env,
     }
 
 #ifdef DEBUG_DISAS
-    log_cpu_state_mask(CPU_LOG_TB_CPU, env, X86_DUMP_CCOP);
     if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
         int disas_flags;
         qemu_log("----------------\n");
Signature · 1 line
1.6.6.1
#2 lore raw

PATCH 2/4 target-mips: Remove duplicate CPU log.

In reply to Richard Henderson

Logging for -d cpu is done in generic code.

---
 target-mips/translate.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
target-mips/translate.c +0 -6
index 0ade3bd..b796b4f 100644
@@ -9424,11 +9424,6 @@ gen_intermediate_code_internal (CPUState *env, TranslationBlock *tb,
     max_insns = tb->cflags & CF_COUNT_MASK;
     if (max_insns == 0)
         max_insns = CF_COUNT_MASK;
-#ifdef DEBUG_DISAS
-    qemu_log_mask(CPU_LOG_TB_CPU, "------------------------------------------------\n");
-    /* FIXME: This may print out stale hflags from env... */
-    log_cpu_state_mask(CPU_LOG_TB_CPU, env, 0);
-#endif
     LOG_DISAS("\ntb %p idx %d hflags %04x\n", tb, ctx.mem_idx, ctx.hflags);
     gen_icount_start();
     while (ctx.bstate == BS_NONE) {
@@ -9542,7 +9537,6 @@ done_generating:
         log_target_disas(pc_start, ctx.pc - pc_start, 0);
         qemu_log("\n");
     }
-    qemu_log_mask(CPU_LOG_TB_CPU, "---------------- %d %08x\n", ctx.bstate, ctx.hflags);
 #endif
 }
 
Signature · 1 line
1.6.6.1
#3 lore raw

PATCH 3/4 target-ppc: Remove duplicate cpu log.

In reply to Richard Henderson

Logging for -d cpu is done in generic code.

---
 target-ppc/translate.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
target-ppc/translate.c +0 -2
index 0af7e4f..3a6146a 100644
@@ -9111,8 +9111,6 @@ static inline void gen_intermediate_code_internal(CPUState *env,
         tb->icount = num_insns;
     }
 #if defined(DEBUG_DISAS)
-    qemu_log_mask(CPU_LOG_TB_CPU, "---------------- excp: %04x\n", ctx.exception);
-    log_cpu_state_mask(CPU_LOG_TB_CPU, env, 0);
     if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
         int flags;
         flags = env->bfd_mach;
Signature · 1 line
1.6.6.1
#4 lore raw

PATCH 4/4 target-sh4: Remove duplicate CPU log.

In reply to Richard Henderson

Logging for -d cpu is done in generic code.

---
 target-sh4/translate.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
target-sh4/translate.c +0 -6
index bff3188..391b762 100644
@@ -1914,12 +1914,6 @@ gen_intermediate_code_internal(CPUState * env, TranslationBlock * tb,
     ctx.features = env->features;
     ctx.has_movcal = (tb->flags & TB_FLAG_PENDING_MOVCA);
 
-#ifdef DEBUG_DISAS
-    qemu_log_mask(CPU_LOG_TB_CPU,
-                 "------------------------------------------------\n");
-    log_cpu_state_mask(CPU_LOG_TB_CPU, env, 0);
-#endif
-
     ii = -1;
     num_insns = 0;
     max_insns = tb->cflags & CF_COUNT_MASK;
Signature · 1 line
1.6.6.1
#5 lore raw
In reply to Richard Henderson
Quoted 5 lines · Richard Henderson

Generic code handles -d cpu in cpu_exec, amidst the horde of ifdefs. These duplicates simply double the amount of output produced with no extra information emitted.

Maintainers for mips, ppc and sh4 cc'd.

Fine by me, though i'm maintaining none of the above.

Quoted 18 lines

r~

Richard Henderson (4):
target-i386: Remove duplicate CPU log.
target-mips: Remove duplicate CPU log.
target-ppc: Remove duplicate cpu log.
target-sh4: Remove duplicate CPU log.

 target-i386/translate.c |    1 -
 target-mips/translate.c |    6 ------
 target-ppc/translate.c  |    2 --
 target-sh4/translate.c  |    6 ------
 4 files changed, 0 insertions(+), 15 deletions(-)
Signature · 1 line
mailto:[email protected]
#6 lore raw
In reply to Richard Henderson
Quoted 3 lines · Richard Henderson

Generic code handles -d cpu in cpu_exec, amidst the horde of ifdefs. These duplicates simply double the amount of output produced with no extra information emitted.

This is only true if cpu-exec.c is compiled with CONFIG_DEBUG_EXEC enable, which is not the default. In the current state, this patch series simply breaks the -cpu option. IMHO, a patch enabling CONFIG_DEBUG_EXEC should be added to this patch series.

Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net