From patchwork Tue Apr 27 03:25:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Koi X-Patchwork-Id: 51029 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 34C92B7D57 for ; Tue, 27 Apr 2010 13:26:17 +1000 (EST) Received: from localhost ([127.0.0.1]:53356 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6bR8-0008NR-7j for incoming@patchwork.ozlabs.org; Mon, 26 Apr 2010 23:26:14 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6bQU-0008NC-Qq for qemu-devel@nongnu.org; Mon, 26 Apr 2010 23:25:34 -0400 Received: from [140.186.70.92] (port=36709 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6bQS-0008N4-MJ for qemu-devel@nongnu.org; Mon, 26 Apr 2010 23:25:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6bQQ-0002Hp-5K for qemu-devel@nongnu.org; Mon, 26 Apr 2010 23:25:32 -0400 Received: from mail-iw0-f177.google.com ([209.85.223.177]:47871) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6bQQ-0002Hi-04 for qemu-devel@nongnu.org; Mon, 26 Apr 2010 23:25:30 -0400 Received: by iwn7 with SMTP id 7so2226439iwn.24 for ; Mon, 26 Apr 2010 20:25:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=IrVLtML7PZH5S7n3hp5Yj3skiGfV5s6oKkvfbDvWc/k=; b=VPOmzwclo/+L9askNkISD+XO1PICo+fcdQd1xSt5Jay1qUh/2n3jxtlk1ayarVvTRT 084BNLsinHPtkD09xzxPreD8Jg3xyTR8hG83nDzpdgfgfyIoeZ1or4ubribab3xnDC+1 gfWStUXYRchCKZ9f6WyMQvOUVXE0JPHhDzvWo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=OMJjNz/scMcBqYlbrUzkM65CKdlADU2XB5J0fe/hYbVJ5UCdwMJk2CKHqmcpF5+fY6 /VBI6v/7gmR04tlcIs0IGtNVRdqUJ4uMdf/2AjcaqTnZ94C+XKWnG9+1pxtNFfrOXY1v zZPSAmGp0yjAHHBJg7dwwGRBgFZv+1IiplSTE= Received: by 10.231.146.2 with SMTP id f2mr1683367ibv.23.1272338729253; Mon, 26 Apr 2010 20:25:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.148.208 with HTTP; Mon, 26 Apr 2010 20:25:09 -0700 (PDT) From: Jun Koi Date: Tue, 27 Apr 2010 12:25:09 +0900 Message-ID: To: qemu-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH] A bit optimization for tlb_set_page() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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; } }