From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754327AbeAKGbc (ORCPT + 1 other); Thu, 11 Jan 2018 01:31:32 -0500 Received: from terminus.zytor.com ([65.50.211.136]:41925 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932118AbeAKGb3 (ORCPT ); Thu, 11 Jan 2018 01:31:29 -0500 Date: Wed, 10 Jan 2018 22:27:56 -0800 From: tip-bot for Jiri Olsa Message-ID: Cc: ak@linux.intel.com, jolsa@kernel.org, dsahern@gmail.com, acme@redhat.com, hpa@zytor.com, peterz@infradead.org, alexander.shishkin@linux.intel.com, namhyung@kernel.org, mingo@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org Reply-To: hpa@zytor.com, acme@redhat.com, alexander.shishkin@linux.intel.com, peterz@infradead.org, jolsa@kernel.org, ak@linux.intel.com, dsahern@gmail.com, linux-kernel@vger.kernel.org, mingo@kernel.org, tglx@linutronix.de, namhyung@kernel.org In-Reply-To: <20180107160356.28203-11-jolsa@kernel.org> References: <20180107160356.28203-11-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Make the tool's warning messages optional Git-Commit-ID: 075ca1ebb25e798e4072a1e3a482b829bb51afb2 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 Return-Path: Commit-ID: 075ca1ebb25e798e4072a1e3a482b829bb51afb2 Gitweb: https://git.kernel.org/tip/075ca1ebb25e798e4072a1e3a482b829bb51afb2 Author: Jiri Olsa AuthorDate: Sun, 7 Jan 2018 17:03:54 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 10 Jan 2018 12:00:55 -0300 perf tools: Make the tool's warning messages optional I want to display the pure events status coming in the next patch and the tool's warnings are superfluous in the output. Making it optional, enabled by default. 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/20180107160356.28203-11-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/session.c | 6 ++++-- tools/perf/util/tool.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 54e30f1..8d0fa2f 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1773,7 +1773,8 @@ done: err = perf_session__flush_thread_stacks(session); out_err: free(buf); - perf_session__warn_about_errors(session); + if (!tool->no_warn) + perf_session__warn_about_errors(session); ordered_events__free(&session->ordered_events); auxtrace__free_events(session); return err; @@ -1929,7 +1930,8 @@ out: err = perf_session__flush_thread_stacks(session); out_err: ui_progress__finish(); - perf_session__warn_about_errors(session); + if (!tool->no_warn) + perf_session__warn_about_errors(session); /* * We may switching perf.data output, make ordered_events * reusable. diff --git a/tools/perf/util/tool.h b/tools/perf/util/tool.h index 2532b55..183c914 100644 --- a/tools/perf/util/tool.h +++ b/tools/perf/util/tool.h @@ -76,6 +76,7 @@ struct perf_tool { bool ordered_events; bool ordering_requires_timestamps; bool namespace_events; + bool no_warn; enum show_feature_header show_feat_hdr; };