From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752700AbbCVKP1 (ORCPT ); Sun, 22 Mar 2015 06:15:27 -0400 Received: from terminus.zytor.com ([198.137.202.10]:57289 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751820AbbCVKPX (ORCPT ); Sun, 22 Mar 2015 06:15:23 -0400 Date: Sun, 22 Mar 2015 03:15:12 -0700 From: tip-bot for David Ahern Message-ID: Cc: acme@redhat.com, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org, dsahern@gmail.com Reply-To: dsahern@gmail.com, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, acme@redhat.com In-Reply-To: <1426789383-19023-1-git-send-email-dsahern@gmail.com> References: <1426789383-19023-1-git-send-email-dsahern@gmail.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf trace: Fix summary_only option Git-Commit-ID: 13f22a2d4a5359867aa05562fc922f1ca24873a5 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 13f22a2d4a5359867aa05562fc922f1ca24873a5 Gitweb: http://git.kernel.org/tip/13f22a2d4a5359867aa05562fc922f1ca24873a5 Author: David Ahern AuthorDate: Thu, 19 Mar 2015 12:23:03 -0600 Committer: Arnaldo Carvalho de Melo CommitDate: Sat, 21 Mar 2015 14:53:31 -0300 perf trace: Fix summary_only option The intent of the -s/--summary-only option is to just show a summary of the system calls and statistics without any of the individual events. Commit e596663ebb2 broke that by showing the interrupted lines: perf trace -i perf.data -s ... 0.741 ( 0.000 ms): sleep/31316 fstat(fd: 4, statbuf: 0x7ffc75ceb830 ) ... 0.744 ( 0.000 ms): sleep/31316 mmap(len: 100244, prot: READ, flags: PRIVATE, fd: 4 ) ... 0.747 ( 0.000 ms): perf/31315 write(fd: 3, buf: 0x7d4bb0, count: 8 ) ... ... Fix by checking for the summary only option. Signed-off-by: David Ahern Link: http://lkml.kernel.org/r/1426789383-19023-1-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 0b3b4e4..6af6bce 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -1724,7 +1724,8 @@ static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel, return -1; } - printed += trace__printf_interrupted_entry(trace, sample); + if (!trace->summary_only) + printed += trace__printf_interrupted_entry(trace, sample); ttrace->entry_time = sample->time; msg = ttrace->entry_str;