qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "andrzej zaborowski" <balrog@zabor.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] fix DEBUG_TB_CHECK in exec.c
Date: Fri, 7 Apr 2006 23:43:23 +0200	[thread overview]
Message-ID: <fb249edb0604071443w4f99c75bvc7664f4f15d85622@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

With DEBUG_TB_CHECK enabled, exec.c fails to build. This patch
corrects the compilation errors.
Regards,
Andrew
--
balrog 2oo6

Dear Outlook users: Please remove me from your address books
http://www.newsforge.com/article.pl?sid=03/08/21/143258

[-- Attachment #2: qemu-exec-cleanups.patch --]
[-- Type: application/octet-stream, Size: 2380 bytes --]

diff -pNaur qemu/exec.c qemu-omap-clean/exec.c
--- qemu/exec.c	2006-02-08 22:43:39.000000000 +0000
+++ qemu-omap-clean/exec.c	2006-04-07 20:56:55.000000000 +0000
@@ -40,8 +40,8 @@
 //#define DEBUG_TLB
 
 /* make various TB consistency checks */
-//#define DEBUG_TB_CHECK 
-//#define DEBUG_TLB_CHECK 
+//#define DEBUG_TB_CHECK
+//#define DEBUG_TLB_CHECK
 
 /* threshold to flush the translated code buffer */
 #define CODE_GEN_BUFFER_MAX_SIZE (CODE_GEN_BUFFER_SIZE - CODE_GEN_MAX_SIZE)
@@ -319,16 +319,17 @@ void tb_flush(CPUState *env1)
 
 #ifdef DEBUG_TB_CHECK
 
+#ifndef CONFIG_SOFTMMU
 static void tb_invalidate_check(unsigned long address)
 {
     TranslationBlock *tb;
     int i;
     address &= TARGET_PAGE_MASK;
-    for(i = 0;i < CODE_GEN_HASH_SIZE; i++) {
-        for(tb = tb_hash[i]; tb != NULL; tb = tb->hash_next) {
+    for(i = 0;i < CODE_GEN_PHYS_HASH_SIZE; i++) {
+        for(tb = tb_phys_hash[i]; tb != NULL; tb = tb->phys_hash_next) {
             if (!(address + TARGET_PAGE_SIZE <= tb->pc ||
                   address >= tb->pc + tb->size)) {
-                printf("ERROR invalidate: address=%08lx PC=%08lx size=%04x\n",
+                printf("ERROR invalidate: address=%08lx PC=%08x size=%04x\n",
                        address, tb->pc, tb->size);
             }
         }
@@ -341,17 +342,18 @@ static void tb_page_check(void)
     TranslationBlock *tb;
     int i, flags1, flags2;
     
-    for(i = 0;i < CODE_GEN_HASH_SIZE; i++) {
-        for(tb = tb_hash[i]; tb != NULL; tb = tb->hash_next) {
+    for(i = 0;i < CODE_GEN_PHYS_HASH_SIZE; i++) {
+        for(tb = tb_phys_hash[i]; tb != NULL; tb = tb->phys_hash_next) {
             flags1 = page_get_flags(tb->pc);
             flags2 = page_get_flags(tb->pc + tb->size - 1);
             if ((flags1 & PAGE_WRITE) || (flags2 & PAGE_WRITE)) {
-                printf("ERROR page flags: PC=%08lx size=%04x f1=%x f2=%x\n",
+                printf("ERROR page flags: PC=%08x size=%04x f1=%x f2=%x\n",
                        tb->pc, tb->size, flags1, flags2);
             }
         }
     }
 }
+#endif
 
 void tb_jmp_check(TranslationBlock *tb)
 {
@@ -907,7 +909,7 @@ void tb_link_phys(TranslationBlock *tb, 
     if (tb->tb_next_offset[1] != 0xffff)
         tb_reset_jump(tb, 1);
 
-#ifdef DEBUG_TB_CHECK
+#if defined(DEBUG_TB_CHECK) && !defined(CONFIG_SOFTMMU)
     tb_page_check();
 #endif
 }

                 reply	other threads:[~2006-04-07 21:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb249edb0604071443w4f99c75bvc7664f4f15d85622@mail.gmail.com \
    --to=balrog@zabor.org \
    --cc=balrogg@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).