From patchwork Tue Apr 27 03:25:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: A bit optimization for tlb_set_page() From: Jun Koi X-Patchwork-Id: 51029 Message-Id: To: qemu-devel@nongnu.org Date: Tue, 27 Apr 2010 12:25:09 +0900 It is not necessary to continue searching for watchpoint when we already found one and setup for handling watchpoint in a search loop in tlb_set_page(). This patch breaks that search loop on then. Signed-off-by: Jun Koi Acked-by: Jan Kiszka diff --git a/exec.c b/exec.c index 14d1fd7..6329775 100644 --- a/exec.c +++ b/exec.c @@ -2240,6 +2240,7 @@ void tlb_set_page(CPUState *env, target_ulong vaddr, /* TODO: The memory case can be optimized by not trapping reads of pages with a write breakpoint. */ address |= TLB_MMIO; + break; } }