Skip to contentSkip to conversation

target-arm: log instructions start in TCG code

PATCH In review Aurelien Jarno 2 participants 3 messages Oct 15, 2009 – Oct 22, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-arm: log instructions start in TCG code

---
 target-arm/translate.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
target-arm/translate.c +4 -0
index 0c10ac2..bb0f8ef 100644
@@ -8805,6 +8805,10 @@ static inline void gen_intermediate_code_internal(CPUState *env,
         if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO))
             gen_io_start();
 
+        if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) {
+            tcg_gen_debug_insn_start(dc->pc);
+        }
+
         if (env->thumb) {
             disas_thumb_insn(env, dc);
             if (dc->condexec_mask) {
Signature · 1 line
1.6.1.3
#1 lore raw
Quoted 21 lines · Aurelien Jarno

---
 target-arm/translate.c |    4 ++++

 1 files changed, 4 insertions(+), 0 deletions(-)
target-arm/translate.c +4 -1
index 0c10ac2..bb0f8ef 100644
@@ -8805,6 +8805,10 @@ static inline void gen_intermediate_code_internal(CPUState *env,
         if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO))
             gen_io_start();
 
+        if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) {
+            tcg_gen_debug_insn_start(dc->pc);
+        }
+
         if (env->thumb) {
             disas_thumb_insn(env, dc);
             if (dc->condexec_mask) {
--
Quoted 1 line

1.6.1.3

Shouldn't you dump the TCG debug instruction before the check for gen_io_start?

Laurent

#2 lore raw
Quoted 14 lines · Laurent Desnogues
Quoted 13 lines · Aurelien Jarno

---
 target-arm/translate.c |    4 ++++

 1 files changed, 4 insertions(+), 0 deletions(-)
target-arm/translate.c +0 -0
index 0c10ac2..bb0f8ef 100644
@@ -8805,6 +8805,10 @@ static inline void gen_intermediate_code_internal(CPUState *env,
         if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO))
             gen_io_start();
 
Quoted 13 lines
Quoted 9 lines
target-arm/translate.c +4 -1
+        if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) {
+            tcg_gen_debug_insn_start(dc->pc);
+        }
+
         if (env->thumb) {
             disas_thumb_insn(env, dc);
             if (dc->condexec_mask) {
--

1.6.1.3

Shouldn't you dump the TCG debug instruction before the check for gen_io_start?

Good question. I have mainly added this debug code at the same location as on other architecture. The question is does the gen_io code actually belong to an op?

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