From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>, Andi Kleen <andi@firstfloor.org>,
Stephane Eranian <eranian@google.com>,
Wang Nan <wangnan0@huawei.com>
Subject: [PATCH v2 6/7] perf tools: Remove nr_sort_keys field
Date: Wed, 9 Mar 2016 22:47:01 +0900 [thread overview]
Message-ID: <1457531222-18130-7-git-send-email-namhyung@kernel.org> (raw)
In-Reply-To: <1457531222-18130-1-git-send-email-namhyung@kernel.org>
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 <namhyung@kernel.org>
---
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 f03c4f70438f..3baeaa6e71b5 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 6870a1bfd762..ead18c82294f 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 59db04d3820e..84c6654b4065 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -2695,29 +2695,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;
@@ -2732,9 +2709,6 @@ int setup_sorting(struct perf_evlist *evlist)
return err;
}
- if (evlist != NULL)
- evlist__set_hists_nr_sort_keys(evlist);
-
reset_dimensions();
/*
--
2.7.2
next prev parent reply other threads:[~2016-03-09 13:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 13:46 [PATCHSET 0/7] perf tools: Fix and cleanups for hierarchy mode (v2) Namhyung Kim
2016-03-09 13:46 ` [PATCH v2 1/7] perf tools: Fix hist_entry__filter() for hierarchy Namhyung Kim
2016-03-11 8:48 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-03-09 13:46 ` [PATCH v2 2/7] perf tools: Add more sort entry check functions Namhyung Kim
2016-03-11 8:48 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-03-09 13:46 ` [PATCH v2 3/7] perf tools: Fix command line filters in hierarchy mode Namhyung Kim
2016-03-11 8:48 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-03-09 13:46 ` [PATCH v2 4/7] perf tools: Remove hist_entry->fmt field Namhyung Kim
2016-03-11 8:49 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-03-09 13:47 ` [PATCH v2 5/7] perf hists browser: Cleanup hist_browser__fprintf_hierarchy_entry() Namhyung Kim
2016-03-11 8:49 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-03-09 13:47 ` Namhyung Kim [this message]
2016-03-11 8:50 ` [tip:perf/core] perf tools: Remove nr_sort_keys field tip-bot for Namhyung Kim
2016-03-09 13:47 ` [PATCH v2 7/7] perf tools: Recalc total periods using top-level entries in hierarchy Namhyung Kim
2016-03-11 8:50 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-03-10 10:33 ` [PATCHSET 0/7] perf tools: Fix and cleanups for hierarchy mode (v2) Jiri Olsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457531222-18130-7-git-send-email-namhyung@kernel.org \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=andi@firstfloor.org \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=wangnan0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).