From patchwork Sun Jul 16 20:03:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emilio Cota X-Patchwork-Id: 9843589 Return-Path: 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 E9BC9602BD for ; Sun, 16 Jul 2017 20:08:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECAED26CFC for ; Sun, 16 Jul 2017 20:08:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E198626E16; Sun, 16 Jul 2017 20:08:44 +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 8B1BA26CFC for ; Sun, 16 Jul 2017 20:08:44 +0000 (UTC) Received: from localhost ([::1]:46714 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWpqN-0003Rz-KL for patchwork-qemu-devel@patchwork.kernel.org; Sun, 16 Jul 2017 16:08:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWpmY-0001Ae-W1 for qemu-devel@nongnu.org; Sun, 16 Jul 2017 16:04:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWpmU-0008G5-Df for qemu-devel@nongnu.org; Sun, 16 Jul 2017 16:04:46 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:35925) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dWpmU-0008FL-7e for qemu-devel@nongnu.org; Sun, 16 Jul 2017 16:04:42 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 222F220A47; Sun, 16 Jul 2017 16:04:40 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Sun, 16 Jul 2017 16:04:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=vulZyVfFh1a/KkQ 9R33O/pPlt4RL1z1OblxCn47KoIA=; b=fQTATPRHrBC39nChtVv9iRymmKKb7WB GIF15uTI3gN15UXKE8/v/t1tUAeGiWXpf8RABjgtvILa31kTfZj4UdEg5pwudRho XHe/0jQYc3fAWm7+IQB7AJCgLX4sBH/S1ZhhLv8rTxDP/uBR5aCY8hvA1xYyBTB8 IahLrUQP3RVw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=vulZyVfFh1a/KkQ9R33O/pPlt4RL1z1OblxCn47KoIA=; b=g6E8n2A/ j3hhmgthtpWUe/rt84MNwAXna9aBzgcrBZCVuskbwzaNxtFV2+jtBr6HVzhySC/d izODrQ7rWS+uImtPQLATp6FfP7eU9l2ScdUfjZGBcK3u6hDDdZE3mlWk4uMRIYaN uvQOizzj4z2ftC5t8p5T1qJaQw9LpLAMa1k2hxyOHYhF/FR0+y3odtPcM2fViiV6 2XS1fuzJTpQnARoisT0xb+EVtfomBAsF7fgpW9s130yfCjycARg0WEnsBWaMv27w hb98MkELC4Hxfa3+igWRKPnF6WC7UxcqBv2z99dswSk89qU1XwrEhoQxiPcv5a8p BK9ztmRA4CriWw== X-ME-Sender: X-Sasl-enc: 4/imRmim/jE8AP9Q4xI79Zq/JmPZCj2vtcHosa2imwkm 1500235479 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id DBC142450F; Sun, 16 Jul 2017 16:04:39 -0400 (EDT) From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Sun, 16 Jul 2017 16:03:45 -0400 Message-Id: <1500235468-15341-3-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500235468-15341-1-git-send-email-cota@braap.org> References: <1500235468-15341-1-git-send-email-cota@braap.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.25 Subject: [Qemu-devel] [PATCH v2 02/45] translate-all: remove redundant !tcg_enabled check in dump_exec_info X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This check is redundant because it is already performed by the only caller of dump_exec_info -- the caller was updated by b7da97eef ("monitor: Check whether TCG is enabled before running the "info jit" code"). Checking twice wouldn't necessarily be too bad, but here the check also returns with tb_lock held. So we can either do the check before tb_lock is acquired, or just get rid of it. Given that it is redundant, I am going for the latter option. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index e09bd43..090ebad 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -1858,11 +1858,6 @@ void dump_exec_info(FILE *f, fprintf_function cpu_fprintf) tb_lock(); - if (!tcg_enabled()) { - cpu_fprintf(f, "TCG not enabled\n"); - return; - } - target_code_size = 0; max_target_code_size = 0; cross_page = 0;