Skip to contentSkip to conversation

accel/tcg: Remove dead code

PATCH Applied Thomas Huth 3 participants 3 messages Sep 17, 2018 – Sep 18, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 accel/tcg: Remove dead code

The global cpu_single_env variable has been removed more than 5 years ago, so apparently nobody used this dead debug code in that timeframe anymore. Thus let's remove it completely now.

---
 accel/tcg/translate-all.c | 9 ---------
 1 file changed, 9 deletions(-)
accel/tcg/translate-all.c +0 -9
index 898c3bb..e589c35 100644
@@ -2011,15 +2011,6 @@ void tb_invalidate_phys_page_fast(struct page_collection *pages,
 {
     PageDesc *p;
 
-#if 0
-    if (1) {
-        qemu_log("modifying code at 0x%x size=%d EIP=%x PC=%08x\n",
-                  cpu_single_env->mem_io_vaddr, len,
-                  cpu_single_env->eip,
-                  cpu_single_env->eip +
-                  (intptr_t)cpu_single_env->segs[R_CS].base);
-    }
-#endif
     assert_memory_lock();
 
     p = page_find(start >> TARGET_PAGE_BITS);
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Thomas Huth

The global cpu_single_env variable has been removed more than 5 years ago, so apparently nobody used this dead debug code in that timeframe anymore. Thus let's remove it completely now.

It's also x86-specific debug (R_CS) in the middle of a generic file, which is pretty ugly, so we're well rid of it.

thanks
-- PMM

#2 lore raw
In reply to Thomas Huth
Quoted 20 lines · Thomas Huth

The global cpu_single_env variable has been removed more than 5 years ago, so apparently nobody used this dead debug code in that timeframe anymore. Thus let's remove it completely now.

---
 accel/tcg/translate-all.c | 9 ---------
 1 file changed, 9 deletions(-)
accel/tcg/translate-all.c +0 -2
index 898c3bb..e589c35 100644
@@ -2011,15 +2011,6 @@ void tb_invalidate_phys_page_fast(struct page_collection *pages,
 {
     PageDesc *p;
 
-#if 0
-    if (1) {

accel/tcg/translate-all.c void tb_invalidate_phys_page_fast(struct page_collection *pages, · line 2016

Quoted 10 lines
accel/tcg/translate-all.c +0 -7
-        qemu_log("modifying code at 0x%x size=%d EIP=%x PC=%08x\n",
-                  cpu_single_env->mem_io_vaddr, len,
-                  cpu_single_env->eip,
-                  cpu_single_env->eip +
-                  (intptr_t)cpu_single_env->segs[R_CS].base);
-    }
-#endif
     assert_memory_lock();
 
     p = page_find(start >> TARGET_PAGE_BITS);

Queued, thanks.

Paolo