From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754494AbbEKODQ (ORCPT ); Mon, 11 May 2015 10:03:16 -0400 Received: from mail.kernel.org ([198.145.29.136]:41485 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932144AbbEKODN (ORCPT ); Mon, 11 May 2015 10:03:13 -0400 Date: Mon, 11 May 2015 11:03:09 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern Subject: Re: [PATCH 4/3] perf report: Show error message for incompatible UI request Message-ID: <20150511140309.GK28183@kernel.org> References: <20150510171658.GA4587@kernel.org> <1431351983-27080-1-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431351983-27080-1-git-send-email-namhyung@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, May 11, 2015 at 10:46:23PM +0900, Namhyung Kim escreveu: > Currently --header, --header-only and --threads/-T options are supported > on stdio mode only. Show warning if user passes one of --tui or --gtk > option with these like below: > > $ perf report -T --tui > Error: --threads option cannot be used with --tui > > usage: perf report [] > > -T, --threads Show per-thread event counters > --tui Use the TUI interface > > Requested-by: Arnaldo Carvalho de Melo > Signed-off-by: Namhyung Kim So thanks for that! Can you please check that it applies on top of my perf/core branch? I had already applied your patch :-\ Just pushed the branch, should be at git.kernel.org soon. - Arnaldo > --- > tools/perf/builtin-report.c | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c > index 08a4246d6b62..6ac2c7a01a63 100644 > --- a/tools/perf/builtin-report.c > +++ b/tools/perf/builtin-report.c > @@ -815,9 +815,24 @@ repeat: > } > > /* Force tty output for header output and per-thread stat. */ > - if (report.header || report.header_only || report.show_threads) > + if (report.header || report.header_only || report.show_threads) { > use_browser = 0; > > + if (report.use_tui || report.use_gtk) { > + pr_err("Error: %s option cannot be used with %s\n", > + report.header_only ? "--header-only" : > + report.header ? "--header" : "--threads", > + report.use_tui ? "--tui" : "--gtk"); > + > + parse_options_usage(report_usage, options, > + report.header_only ? "header-only" : > + report.header ? "header": "threads", 0); > + parse_options_usage(NULL, options, > + report.use_tui ? "tui" : "gtk", 0); > + goto error; > + } > + } > + > if (strcmp(input_name, "-") != 0) > setup_browser(true); > else > -- > 2.4.0