From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755569AbcBCKNT (ORCPT ); Wed, 3 Feb 2016 05:13:19 -0500 Received: from terminus.zytor.com ([198.137.202.10]:54500 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753578AbcBCKNQ (ORCPT ); Wed, 3 Feb 2016 05:13:16 -0500 Date: Wed, 3 Feb 2016 02:12:39 -0800 From: tip-bot for Namhyung Kim Message-ID: Cc: tglx@linutronix.de, andi@firstfloor.org, dsahern@gmail.com, mingo@kernel.org, peterz@infradead.org, eranian@google.com, hpa@zytor.com, linux-kernel@vger.kernel.org, wangnan0@huawei.com, acme@redhat.com, namhyung@kernel.org Reply-To: andi@firstfloor.org, dsahern@gmail.com, tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org, eranian@google.com, linux-kernel@vger.kernel.org, hpa@zytor.com, wangnan0@huawei.com, acme@redhat.com, namhyung@kernel.org In-Reply-To: <1452960197-5323-9-git-send-email-namhyung@kernel.org> References: <1452960197-5323-9-git-send-email-namhyung@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf hists browser: Offer non-symbol specific menu options for --sort without 'sym' Git-Commit-ID: 4056132e1072f02bbad77f2071770271cc5b58fc 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: 4056132e1072f02bbad77f2071770271cc5b58fc Gitweb: http://git.kernel.org/tip/4056132e1072f02bbad77f2071770271cc5b58fc Author: Namhyung Kim AuthorDate: Fri, 22 Jan 2016 12:26:06 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 26 Jan 2016 11:52:51 -0300 perf hists browser: Offer non-symbol specific menu options for --sort without 'sym' Now that we check more strictly what each of the menu entries need, we can stop bailing out when 'sym' is not in the --sort order, instead we let each option be added if what it needs is present. This way, for instance, we can run scripts on all samples, see DSO map details when 'dso' is in the --sort provided, etc. Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: David Ahern Cc: Jiri Olsa , Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/1452960197-5323-9-git-send-email-namhyung@kernel.org [ Carved out from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/ui/browsers/hists.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index b919582..d07e6be 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c @@ -2263,10 +2263,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, continue; } - if (!sort__has_sym) - goto add_exit_option; - - if (browser->selection == NULL) + if (!sort__has_sym || browser->selection == NULL) goto skip_annotation; if (sort__mode == SORT_MODE__BRANCH) { @@ -2333,7 +2330,6 @@ skip_annotation: &options[nr_options], NULL, NULL); nr_options += add_switch_opt(browser, &actions[nr_options], &options[nr_options]); -add_exit_option: nr_options += add_exit_opt(browser, &actions[nr_options], &options[nr_options]);