Message ID | 1493106839-10438-12-git-send-email-cota@braap.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0D448601D3 for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 25 Apr 2017 07:58:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CBF42845E for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 25 Apr 2017 07:58:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10EEF285E7; Tue, 25 Apr 2017 07:58:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8B8A42845E for <patchwork-qemu-devel@patchwork.kernel.org>; Tue, 25 Apr 2017 07:58:50 +0000 (UTC) Received: from localhost ([::1]:47575 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1d2vN3-0002lc-Lm for patchwork-qemu-devel@patchwork.kernel.org; Tue, 25 Apr 2017 03:58:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <cota@braap.org>) id 1d2vIp-0008QW-IN for qemu-devel@nongnu.org; Tue, 25 Apr 2017 03:54:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <cota@braap.org>) id 1d2vIo-0000ox-F2 for qemu-devel@nongnu.org; Tue, 25 Apr 2017 03:54:27 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:42893) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <cota@braap.org>) id 1d2vIj-0000hb-IT; Tue, 25 Apr 2017 03:54:21 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 9F3CD21F3C; Tue, 25 Apr 2017 03:54:05 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Tue, 25 Apr 2017 03:54:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=y0C jSxjfTR2FVTA8ONLuT936VOXcL5FIJexxz7x9tkc=; b=0Aw6JEHxxob1zmpwGoJ uqg5liHqb6SYhVtcxD8NFSukfeWwNIILcG5U9yNCvqwGGPJc3iAwIs7A8vzSjGYh QoIcyTvKrBtm236Sfm9NPQMCO6zJEFoIjKvsNPTXOYPiKFsL8NWsgXRfC3G3yEeT p+oR5+lzawmdhGlam5MzbWDg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=y0CjSxjfTR2FVTA8ONLuT936VOXcL5FIJexxz7x9t kc=; b=K29daeJRLG4km+Z2RkBV12voEDDeRxQObNHjs3jp85+f0eD0vZFF5A8JN URdJQcPnkwqZrRwJ+n3dSHrvCX3UtRdnxqOMNCf624KHCTyMXs/W2WW3V1XUTWW+ 6p0/Kkve6r0Z3ppJTSsfR1FGr36CAzzi3riEpAnjraFOf0v4luGX/QaXcKYJwnhM 3giMIAo4tL5pYPnQGdiydDlP5scXbBGjBOCSSIya6PXq/WPP7DngxPoXe4MZwfa5 t4Ly27Bx6GqD+9RV7Mvrj70icRBwsT07BofL0tyP1NKeHAms6NjFHVowZlNp9gwJ X/OaSN5lPLy9YQW4dlcohqT19p5lg== X-ME-Sender: <xms:nQD_WN1ugfTFfK7VgDTyHI-ajBNPICyU4e4JNIkocZ_h2Ma7nu3Xqw> X-Sasl-enc: AXHZl4PkwMIBPRqR3tNrtHWprVzUq/D0sPaU5F1VjIJR 1493106845 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 568117E96F; Tue, 25 Apr 2017 03:54:05 -0400 (EDT) From: "Emilio G. Cota" <cota@braap.org> To: qemu-devel@nongnu.org Date: Tue, 25 Apr 2017 03:53:57 -0400 Message-Id: <1493106839-10438-12-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493106839-10438-1-git-send-email-cota@braap.org> References: <1493106839-10438-1-git-send-email-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.28 Subject: [Qemu-devel] [PATCH v2 11/13] target/i386: optimize cross-page direct jumps in softmmu X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Peter Maydell <peter.maydell@linaro.org>, Eduardo Habkost <ehabkost@redhat.com>, Peter Crosthwaite <crosthwaite.peter@gmail.com>, Stefan Weil <sw@weilnetz.de>, Alexander Graf <agraf@suse.de>, alex.bennee@linaro.org, qemu-arm@nongnu.org, Pranith Kumar <bobby.prani+qemu@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, Aurelien Jarno <aurelien@aurel32.net>, Richard Henderson <rth@twiddle.net> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/target/i386/translate.c b/target/i386/translate.c index 445082b..9982a2d 100644 --- a/target/i386/translate.c +++ b/target/i386/translate.c @@ -2154,9 +2154,9 @@ static inline void gen_goto_tb(DisasContext *s, int tb_num, target_ulong eip) gen_jmp_im(eip); tcg_gen_exit_tb((uintptr_t)s->tb + tb_num); } else { - /* jump to another page: currently not optimized */ + /* jump to another page */ gen_jmp_im(eip); - gen_eob(s); + gen_jr(s, cpu_tmp0); } }
Instead of unconditionally exiting to the exec loop, use the gen_jr helper to jump to the target if it is valid. As long as the hit rate in tb_jmp_cache remains high, this change improves performance. Perf impact: see the next commit's log. Signed-off-by: Emilio G. Cota <cota@braap.org> --- target/i386/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)