Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1342118 > unrolled thread
| Started by | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| First post | 2016-02-24 16:20 +0100 |
| Last post | 2016-02-25 08:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v7 08/18] perf hists: Count number of sort keys Namhyung Kim <namhyung@kernel.org> - 2016-02-24 16:20 +0100
[tip:perf/core] perf hists: Count number of sort keys tip-bot for Namhyung Kim <tipbot@zytor.com> - 2016-02-25 08:50 +0100
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2016-02-24 16:20 +0100 |
| Subject | [PATCH v7 08/18] perf hists: Count number of sort keys |
| Message-ID | <r5Jon-6qY-35@gated-at.bofh.it> |
It'll be used for hierarchy output mode to indent entries properly.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/ui/hist.c | 3 +++
tools/perf/util/hist.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
index 12223d791e9f..edbf854e8e1c 100644
--- a/tools/perf/ui/hist.c
+++ b/tools/perf/ui/hist.c
@@ -514,6 +514,9 @@ 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 480d2eb26001..d08e4f36f193 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -237,6 +237,7 @@ 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;
--
2.7.1
[toc] | [next] | [standalone]
| From | tip-bot for Namhyung Kim <tipbot@zytor.com> |
|---|---|
| Date | 2016-02-25 08:50 +0100 |
| Subject | [tip:perf/core] perf hists: Count number of sort keys |
| Message-ID | <r5YQq-um-5@gated-at.bofh.it> |
| In reply to | #1342118 |
Commit-ID: 1f2d72cf3258eacd667cd1920e64c9b64b9984d5
Gitweb: http://git.kernel.org/tip/1f2d72cf3258eacd667cd1920e64c9b64b9984d5
Author: Namhyung Kim <namhyung@kernel.org>
AuthorDate: Thu, 25 Feb 2016 00:13:40 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 24 Feb 2016 20:21:11 -0300
perf hists: Count number of sort keys
It'll be used for hierarchy output mode to indent entries properly.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1456326830-30456-9-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/ui/hist.c | 3 +++
tools/perf/util/hist.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
index 12223d7..edbf854 100644
--- a/tools/perf/ui/hist.c
+++ b/tools/perf/ui/hist.c
@@ -514,6 +514,9 @@ 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 480d2eb..d08e4f3 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -237,6 +237,7 @@ 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;
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web