exec, cpu log

Bug #1085658 reported by Daniil Troshkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Invalid
Undecided
Daniil Troshkov

Bug Description

Hello!

CPU_LOG_EXEC (and CPU_LOG_TB_CPU) does not work (i.e. not of each tb dumped) because tb links is occur.
Patch:

diff --git a/cpu-exec.c b/cpu-exec.c
index 904ee73..509d50c 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -582,7 +582,11 @@ int cpu_exec(CPUArchState *env)
                 /* see if we can patch the calling TB. When the TB
                    spans two pages, we cannot safely do a direct
                    jump. */
- if (next_tb != 0 && tb->page_addr[1] == -1) {
+ if (next_tb != 0 && tb->page_addr[1] == -1
+#ifdef CONFIG_DEBUG_EXEC
+ && !qemu_loglevel_mask(CPU_LOG_EXEC | CPU_LOG_TB_CPU)
+#endif
+ ) {
                     tb_add_jump((TranslationBlock *)(next_tb & ~3), next_tb & 3, tb);
                 }
                 spin_unlock(&tb_lock);

Revision history for this message
Daniil Troshkov (troshkovdanil) wrote :
Revision history for this message
Peter Maydell (pmaydell) wrote :

> CPU_LOG_EXEC (and CPU_LOG_TB_CPU) does not work (i.e. not of each tb dumped) because tb links is occur.

This is true, but I'm afraid I don't think this patch is the right approach. Enabling debug tracing shouldn't cause us to change behaviour, so we can't just disable TB linking when doing debug logging.

description: updated
Changed in qemu:
assignee: nobody → Daniil Troshkov (troshkovdanil)
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.