From patchwork Fri Jun 3 20:40:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 9153993 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 378896082E for ; Fri, 3 Jun 2016 20:41:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29ADD2832F for ; Fri, 3 Jun 2016 20:41:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1D5A628337; Fri, 3 Jun 2016 20:41:10 +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 B62EC2832F for ; Fri, 3 Jun 2016 20:41:09 +0000 (UTC) Received: from localhost ([::1]:57626 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8vu0-0008RM-TX for patchwork-qemu-devel@patchwork.kernel.org; Fri, 03 Jun 2016 16:41:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8vtV-0008Q2-Pw for qemu-devel@nongnu.org; Fri, 03 Jun 2016 16:40:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8vtQ-0000Ov-2O for qemu-devel@nongnu.org; Fri, 03 Jun 2016 16:40:37 -0400 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:35735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8vtP-0000OZ-R8 for qemu-devel@nongnu.org; Fri, 03 Jun 2016 16:40:31 -0400 Received: by mail-wm0-x22e.google.com with SMTP id a136so12044306wme.0 for ; Fri, 03 Jun 2016 13:40:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sRuKdOxFZWKXSzWHQ7wOBhZCcq8kpzKMqz8MWS4WlIw=; b=SOc+R8a4lH7pbxG2G4uckKl5fcv+tSEg/2yIyzJqFoTwisrVva5z3kBUYqwOqB94RX WX+yA66Bos1BNwcGosuAHoeXaIeK9jvJ7HV910uzGpe3KRtfVulzlUIBePs5uZT1V1sg dkvNgNOdk5Zw4Iru76OHlBEsoIFquZb/c3zv8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sRuKdOxFZWKXSzWHQ7wOBhZCcq8kpzKMqz8MWS4WlIw=; b=aZJhCwJ6kYpVjvaPx/T0bCBiclFN8+cpwukZev1gLAhVMUkNXf1cV5d3RYSju/iGEs plivuI7xinDx0yEdmrKfqc1e+faQbO92S3B6TNsc9LAHeNUAJXRSudl7Q2ZmCFbNaAli KQRzox/J77sj/Q3uOpAOpLFifFi1ZJr41nXjZIkMbYOFSJY9kf8MHEKCmRnpD0R4M8hk cEe5vpDQEns7cnGpjcXk+Y8DTXDNdlBXlFucR1wmVIR/1DcYELnxPDDUzuQ3g+1V4ym9 iK8jijckFBkcIYvVzlni70iKiJKcaZAckIq4lXHNFNoHI3DBiIgfwSYWWsDEyCV+8Et2 X2EQ== X-Gm-Message-State: ALyK8tJXEP3TfYyiO5HhNvg9hI51TogK6ZkfIhb6WXWN5oxgYlPnSx3/ZwmenQuDcePHHisH X-Received: by 10.28.232.152 with SMTP id f24mr1039603wmi.45.1464986431125; Fri, 03 Jun 2016 13:40:31 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y1sm7370533wjl.31.2016.06.03.13.40.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jun 2016 13:40:29 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 684333E2C40; Fri, 3 Jun 2016 21:40:39 +0100 (BST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: mttcg@listserver.greensocs.com, qemu-devel@nongnu.org, fred.konrad@greensocs.com, a.rigo@virtualopensystems.com, serge.fdrv@gmail.com, cota@braap.org, bobby.prani@gmail.com Date: Fri, 3 Jun 2016 21:40:11 +0100 Message-Id: <1464986428-6739-3-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464986428-6739-1-git-send-email-alex.bennee@linaro.org> References: <1464986428-6739-1-git-send-email-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22e Subject: [Qemu-devel] [RFC v3 02/19] translate_all: DEBUG_FLUSH -> DEBUG_TB_FLUSH 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: peter.maydell@linaro.org, Peter Crosthwaite , claudio.fontana@huawei.com, mark.burton@greensocs.com, jan.kiszka@siemens.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Make the debug define consistent with the others. The flush operation is all about invalidating TranslationBlocks on flush events. Also fix up the commenting on the other DEBUG for the benefit of checkpatch. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- translate-all.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/translate-all.c b/translate-all.c index 625411f..ec6fdbb 100644 --- a/translate-all.c +++ b/translate-all.c @@ -58,10 +58,10 @@ #include "qemu/timer.h" #include "exec/log.h" -//#define DEBUG_TB_INVALIDATE -//#define DEBUG_FLUSH +/* #define DEBUG_TB_INVALIDATE */ +/* #define DEBUG_TB_FLUSH */ /* make various TB consistency checks */ -//#define DEBUG_TB_CHECK +/* #define DEBUG_TB_CHECK */ #if !defined(CONFIG_USER_ONLY) /* TB consistency checks only implemented for usermode emulation. */ @@ -836,7 +836,7 @@ static void page_flush_tb(void) /* XXX: tb_flush is currently not thread safe */ void tb_flush(CPUState *cpu) { -#if defined(DEBUG_FLUSH) +#if defined(DEBUG_TB_FLUSH) printf("qemu: flush code_size=%ld nb_tbs=%d avg_tb_size=%ld\n", (unsigned long)(tcg_ctx.code_gen_ptr - tcg_ctx.code_gen_buffer), tcg_ctx.tb_ctx.nb_tbs, tcg_ctx.tb_ctx.nb_tbs > 0 ?