From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965155AbcCKIvH (ORCPT ); Fri, 11 Mar 2016 03:51:07 -0500 Received: from torg.zytor.com ([198.137.202.12]:33496 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935344AbcCKIu6 (ORCPT ); Fri, 11 Mar 2016 03:50:58 -0500 Date: Fri, 11 Mar 2016 00:50:01 -0800 From: tip-bot for Namhyung Kim Message-ID: Cc: jolsa@kernel.org, peterz@infradead.org, mingo@kernel.org, dsahern@gmail.com, wangnan0@huawei.com, linux-kernel@vger.kernel.org, eranian@google.com, hpa@zytor.com, andi@firstfloor.org, namhyung@kernel.org, acme@redhat.com, tglx@linutronix.de Reply-To: linux-kernel@vger.kernel.org, wangnan0@huawei.com, dsahern@gmail.com, mingo@kernel.org, peterz@infradead.org, jolsa@kernel.org, tglx@linutronix.de, namhyung@kernel.org, acme@redhat.com, andi@firstfloor.org, hpa@zytor.com, eranian@google.com In-Reply-To: <1457531222-18130-7-git-send-email-namhyung@kernel.org> References: <1457531222-18130-7-git-send-email-namhyung@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Remove nr_sort_keys field Git-Commit-ID: 86e3ee5224c17b7967aac39aa15539393c144de7 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: 86e3ee5224c17b7967aac39aa15539393c144de7 Gitweb: http://git.kernel.org/tip/86e3ee5224c17b7967aac39aa15539393c144de7 Author: Namhyung Kim AuthorDate: Wed, 9 Mar 2016 22:47:01 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 10 Mar 2016 16:46:08 -0300 perf tools: Remove nr_sort_keys field The nr_sort_keys field is to carry the number of sort entries in a hpp_list or hists to determine the depth of indentation of a hist entry. As it's only used in hierarchy mode and now we have used nr_hpp_node for this reason, there's no need to keep it anymore. Let's get rid of it. Signed-off-by: Namhyung Kim Tested-by: Jiri Olsa Cc: Andi Kleen Cc: David Ahern Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Wang Nan Link: http://lkml.kernel.org/r/1457531222-18130-7-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/ui/hist.c | 3 --- tools/perf/util/hist.h | 2 -- tools/perf/util/sort.c | 26 -------------------------- 3 files changed, 31 deletions(-) diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c index f03c4f7..3baeaa6 100644 --- a/tools/perf/ui/hist.c +++ b/tools/perf/ui/hist.c @@ -515,9 +515,6 @@ void perf_hpp_list__column_register(struct perf_hpp_list *list, void perf_hpp_list__register_sort_field(struct perf_hpp_list *list, struct perf_hpp_fmt *format) { - if (perf_hpp__is_sort_entry(format) || perf_hpp__is_dynamic_entry(format)) - list->nr_sort_keys++; - list_add_tail(&format->sort_list, &list->sorts); } diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index 6870a1b..ead18c8 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h @@ -79,7 +79,6 @@ struct hists { int socket_filter; struct perf_hpp_list *hpp_list; struct list_head hpp_formats; - int nr_sort_keys; int nr_hpp_node; }; @@ -241,7 +240,6 @@ struct perf_hpp_fmt { struct perf_hpp_list { struct list_head fields; struct list_head sorts; - int nr_sort_keys; }; extern struct perf_hpp_list perf_hpp_list; diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 61c7402..ced849e 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c @@ -2703,29 +2703,6 @@ out: return ret; } -static void evlist__set_hists_nr_sort_keys(struct perf_evlist *evlist) -{ - struct perf_evsel *evsel; - - evlist__for_each(evlist, evsel) { - struct perf_hpp_fmt *fmt; - struct hists *hists = evsel__hists(evsel); - - hists->nr_sort_keys = perf_hpp_list.nr_sort_keys; - - /* - * If dynamic entries were used, it might add multiple - * entries to each evsel for a single field name. Set - * actual number of sort keys for each hists. - */ - perf_hpp_list__for_each_sort_list(&perf_hpp_list, fmt) { - if (perf_hpp__is_dynamic_entry(fmt) && - !perf_hpp__defined_dynamic_entry(fmt, hists)) - hists->nr_sort_keys--; - } - } -} - int setup_sorting(struct perf_evlist *evlist) { int err; @@ -2740,9 +2717,6 @@ int setup_sorting(struct perf_evlist *evlist) return err; } - if (evlist != NULL) - evlist__set_hists_nr_sort_keys(evlist); - reset_dimensions(); /*