From patchwork Thu Aug 4 08:59:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Faggioli X-Patchwork-Id: 9263037 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 A9F696048B for ; Thu, 4 Aug 2016 09:01:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99F4B28375 for ; Thu, 4 Aug 2016 09:01:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8ECB028384; Thu, 4 Aug 2016 09:01:46 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0009B28375 for ; Thu, 4 Aug 2016 09:01:43 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVEUd-000107-Q6; Thu, 04 Aug 2016 08:59:07 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVEUc-0000zy-RZ for xen-devel@lists.xenproject.org; Thu, 04 Aug 2016 08:59:06 +0000 Received: from [193.109.254.147] by server-2.bemta-14.messagelabs.com id 05/E5-30017-AD303A75; Thu, 04 Aug 2016 08:59:06 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFIsWRWlGSWpSXmKPExsXiVRvkonuTeXG 4wb792hbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bqdfsZC36zV8zd7tnAuISti5GLQ0hgBqNE 84/tTCAOi8BUVon/D/+BZSQENrJKLN14m72LkRPIiZF4tPMWI4RdI3Hy4nEWEFtIQEXi5vZVT BCjFjNJrHr8lRUkISygJ3Hk6A92CDtM4sarCUwgNpuAgcSbHXvBakQElCTurZoMFmcWqJBY8f IGmM0ioCrR0rgVrJdXwFviZdMfsMWiAnISKy+3sELEBSVOznwCdAQHUK+mxPpd+hBj5CW2v53 DPIFRaBaSqlkIVbOQVC1gZF7FqFGcWlSWWqRrZKqXVJSZnlGSm5iZo2toaKKXm1pcnJiempOY VKyXnJ+7iREYzvUMDIw7GDcd9zvEKMnBpCTKm5O6KFyILyk/pTIjsTgjvqg0J7X4EKMMB4eSB O9KpsXhQoJFqempFWmZOcDIgklLcPAoifBeZQRK8xYXJOYWZ6ZDpE4x6nJsmXpvLZMQS15+Xq qUOG80yAwBkKKM0jy4EbAov8QoKyXMy8jAwCDEU5BalJtZgir/ilGcg1FJmHcWyBSezLwSuE2 vgI5gAjrihMECkCNKEhFSUg2MNRHCa151RJ9MmLJKoyIiPjPhQcj3TIa362bv9wnf9O46R3xy wh1JfRbNzL3Pl05lK/p2yioxUbfB+cK+Mxt2Bu08np6xTu5uqu++Y+9vBi5njgh61brU6k3az ITOyQ6/Fn0MNzouXD1lRrPeKd4N2Re1H86TNfDy399d/7Km7OB+Roc7nJ12SizFGYmGWsxFxY kA8iO+OO0CAAA= X-Env-Sender: raistlin.df@gmail.com X-Msg-Ref: server-8.tower-27.messagelabs.com!1470301145!47332608!1 X-Originating-IP: [74.125.82.68] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 53073 invoked from network); 4 Aug 2016 08:59:05 -0000 Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by server-8.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 4 Aug 2016 08:59:05 -0000 Received: by mail-wm0-f68.google.com with SMTP id o80so41782268wme.0 for ; Thu, 04 Aug 2016 01:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:from:to:cc:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=qxGK+hns06AkAgHNbnTW05ptlG/4+BQbLp1QCuny/so=; b=hu5onBb6lwVtf4KsfL6dyYSLcohgkVEuqd1GwXwu5pz5BHgYag0Nh3b2mUA6En3Kfs gihJn63JbteTpHCqQ7Oeba62WoXnN81L+be4KJaV8SFKHYzMqdVcFiElioMSI2nFcXC7 +7k9ZZqQODT6O5zpiNMuAnLuLzGKPxjOGHacQXiIty0KB/B7WjlICqxLcKVp3s/cgu9Y 9sG4M9zvVHrv5ojVBoGGItAFzozsJam4FWSa0ZwgqtAhDnjQStIQ8yxcqUceEqB+Q5YN /iO4RZD97OoW5cI+ZqTWzbgvkehMv7n24/YSrp9N2Y0R4LqVNepDdWPhZ/zDtMVW7BgL b3zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:from:to:cc:date:message-id :user-agent:mime-version:content-transfer-encoding; bh=qxGK+hns06AkAgHNbnTW05ptlG/4+BQbLp1QCuny/so=; b=bvTq1eJhZcYFIxIcoWtwDfDC5FFhJSZfbqCe6s/5Pf6QNa6U2ugvHVO7jwOBfnCFnI v8MyS3Yxj2CpBmwtJW8R5E0C5Ay6FfvyEX+wCnHiY8krhlqHOtB2dhBLAaVuQ7jIkzWi jL/UTrPSpwi4RK1SayCm49KJqqYVDfE8FgLybNMEN1gDYDweHpkP6UTc1XbvLSlqhFWj Ufq/TkhnIWuw8GNmqjj1Gb16FEbUJGJKs6yP3HWx3NkdzIXuGabUVu1qz6uWpginfiOP x8/SZ7U0WEg8EyfEzjsjVbsPTDQDOnHXfPe9318YAFC/3qDwJSHcU3pfrsy1ktSveejY w+FA== X-Gm-Message-State: AEkooutjsti336Gw0hams3rEMviVUo8vBZE9zc0ltn3a1MWPRSM0Su9dCB9dy9DW86o93Q== X-Received: by 10.194.235.166 with SMTP id un6mr74029797wjc.169.1470301145123; Thu, 04 Aug 2016 01:59:05 -0700 (PDT) Received: from Solace.fritz.box (net-188-217-84-158.cust.vodafonedsl.it. [188.217.84.158]) by smtp.gmail.com with ESMTPSA id i80sm2546516wmf.11.2016.08.04.01.59.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Aug 2016 01:59:04 -0700 (PDT) From: Dario Faggioli To: xen-devel@lists.xenproject.org Date: Thu, 04 Aug 2016 10:59:03 +0200 Message-ID: <147030114310.13239.5963137289838855143.stgit@Solace.fritz.box> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Cc: George Dunlap , Wei Liu , Ian Jackson Subject: [Xen-devel] [PATCH] tools: xenalyze: kill spurious sched_switch output in non dump mode. X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP In fact, 52cf096df7 ("xenalyze: handle scheduling event"), when dealing with TRC_SCHED_SWITCH, forgot to check whether we actually are in dump mode, causing the printf() in dump_sched_switch() to always produce its output, which is not what we want. Signed-off-by: Dario Faggioli Acked-by: George Dunlap --- Cc: George Dunlap Cc: Ian Jackson Cc: Wei Liu --- tools/xentrace/xenalyze.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index d223de6..3d06e45 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -7629,7 +7629,8 @@ void sched_process(struct pcpu_info *p) } break; case TRC_SCHED_SWITCH: - dump_sched_switch(ri); + if(opt.dump_all) + dump_sched_switch(ri); break; case TRC_SCHED_SWITCH_INFPREV: if(opt.dump_all) {