Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp69105imm; Wed, 5 Sep 2018 15:08:54 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda8CmY65NaKdwYMLYRf+lDj0o7bWPp5+46mJ0SgutGY0h3FCxqNz7oyJpTM6pgoZLgZbYFF X-Received: by 2002:a63:9409:: with SMTP id m9-v6mr19571962pge.13.1536185334559; Wed, 05 Sep 2018 15:08:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536185334; cv=none; d=google.com; s=arc-20160816; b=Afk8hKgOxqwYSDQ3/OquxboJuPxBukpNxV7ucnuU5ZGEcDimgfH6+jllHgHgmhX9Qd diGxqVG/bBrZeHy4IKVLy6b62HwzW0BORumahtFVJ78B33rc9BSfQxHS5G4fPDd/xvCP oHKXc3YS90X4xj9eNnRfdLFZpQ9Q9Nsy3GQJprL1O6Qh11AWIAYQ4tF1SrhAjCfiayXz EE/sqKM4mvOFVd1I3uaZ1DCZALLqCAUS/RD4HWXP9MMEsmj95/4dojQWhyVC/Tfy3zzY mcmT+0TT7DljZWz4j1CV6eyI05dNnYxDpCyCZva87pSXW9l8s1ll9V7W5+pFLO0PBds/ nOpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=gKgaFnzkOvyheAQng5WY4U8j3PUewa9X/XkmB9aFay8=; b=dyVurKeTtqaxPBcPTb84BXwm0SKh/O83baJT00iQh+olppRcwVe27sdPaCtVt3W4pb kpEhOY13+LNzmSwMa/Eg6EAKtvvs6AIUjb92fvriOXVq9io78O776i7EPVprNmo7smWK yyzwFC8iIl5fLuqA2t4iRVhg0O1kWKw456SbiThBmK234QbmhCdu3+AMEoBb7DLg6G7K mI5Ea+GgrTAZ/DXswbQUVo4lJqYoXsMa3fsxZTk21TbXJ6H8qrag90KWASOgtNTot48m RzoPW1B7MkgPYRJ1PM4JXDzeUxgurVYnuiyXykFGefhKMBco/zIRFrq3d3f/3Hf6vxFs fTiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="xHt77Xw/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6-v6si4006918pln.265.2018.09.05.15.08.39; Wed, 05 Sep 2018 15:08:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="xHt77Xw/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728683AbeIFCi4 (ORCPT + 99 others); Wed, 5 Sep 2018 22:38:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:53538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727666AbeIFCiz (ORCPT ); Wed, 5 Sep 2018 22:38:55 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C2EBF2083D; Wed, 5 Sep 2018 22:06:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536185204; bh=dqlxhShzeAWzs42TAZnALtVFqAe4UslMzH9jtfoHmPI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xHt77Xw/9xUZCoyA+FMNIObVGPbfRXX0OzmauzcJsiNoiwbt9gp/dZ9f4M5xrm1XQ 6HI8ur4Knj/N2cSHczTKkJBh6iO6kfR09Wa8d1VL8wCOzup6ymdAKIvwR9SYwd7IiT IOpPt1khcuA0tdc3G/xRHl5F8Jwa29r10VNxkZ34= From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Jiri Olsa , Alexander Shishkin , Andi Kleen , David Ahern , Namhyung Kim , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: [PATCH 41/77] perf stat: Move STAT_RECORD out of perf_evlist__print_counters() Date: Wed, 5 Sep 2018 19:04:04 -0300 Message-Id: <20180905220440.20256-42-acme@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180905220440.20256-1-acme@kernel.org> References: <20180905220440.20256-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiri Olsa It's stat related and should stay in the 'perf stat' command. The perf_evlist__print_counters function will be moved out in the following patches. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20180830063252.23729-17-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-stat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index db11832bbdbc..4ffbb6594eb6 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -1701,10 +1701,6 @@ perf_evlist__print_counters(struct perf_evlist *evlist, struct perf_evsel *counter; char buf[64], *prefix = NULL; - /* Do not print anything if we record to the pipe. */ - if (STAT_RECORD && perf_stat.data.is_pipe) - return; - if (interval) print_interval(prefix = buf, ts); else @@ -1766,6 +1762,10 @@ perf_evlist__print_counters(struct perf_evlist *evlist, static void print_counters(struct timespec *ts, int argc, const char **argv) { + /* Do not print anything if we record to the pipe. */ + if (STAT_RECORD && perf_stat.data.is_pipe) + return; + perf_evlist__print_counters(evsel_list, ts, argc, argv); } -- 2.14.4