diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-10-20 06:02:30 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-10-20 06:02:30 -0400 |
commit | cc02c921a01794f85ad53b396133f11d4ddd17ff (patch) | |
tree | 30ba8419813f01d1928735e2a0c3ab53d9870ce7 /tools | |
parent | d197fd5d743289e90c160c8c17460b390d862b98 (diff) |
perf hists browser: Elide DSO column when it is set to just one DSO, ditto for threads
And also no leed to show the [.] (level: k, . for userspace) when
showing just one DSO.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-4h3f6ro5o7ebepjbssxf0dd3@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/sort.c | 4 | ||||
-rw-r--r-- | tools/perf/util/ui/browsers/hists.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index 1ee8f1e40f18..16da30d8d765 100644 --- a/tools/perf/util/sort.c +++ b/tools/perf/util/sort.c | |||
@@ -177,7 +177,9 @@ static int hist_entry__sym_snprintf(struct hist_entry *self, char *bf, | |||
177 | BITS_PER_LONG / 4, self->ip, o); | 177 | BITS_PER_LONG / 4, self->ip, o); |
178 | } | 178 | } |
179 | 179 | ||
180 | ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", self->level); | 180 | if (!sort_dso.elide) |
181 | ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", self->level); | ||
182 | |||
181 | if (self->ms.sym) | 183 | if (self->ms.sym) |
182 | ret += repsep_snprintf(bf + ret, size - ret, "%s", | 184 | ret += repsep_snprintf(bf + ret, size - ret, "%s", |
183 | self->ms.sym->name); | 185 | self->ms.sym->name); |
diff --git a/tools/perf/util/ui/browsers/hists.c b/tools/perf/util/ui/browsers/hists.c index 9e23bce98827..a06e7d936ec1 100644 --- a/tools/perf/util/ui/browsers/hists.c +++ b/tools/perf/util/ui/browsers/hists.c | |||
@@ -1007,12 +1007,14 @@ zoom_dso: | |||
1007 | zoom_out_dso: | 1007 | zoom_out_dso: |
1008 | ui_helpline__pop(); | 1008 | ui_helpline__pop(); |
1009 | browser->hists->dso_filter = NULL; | 1009 | browser->hists->dso_filter = NULL; |
1010 | sort_dso.elide = false; | ||
1010 | } else { | 1011 | } else { |
1011 | if (dso == NULL) | 1012 | if (dso == NULL) |
1012 | continue; | 1013 | continue; |
1013 | ui_helpline__fpush("To zoom out press <- or -> + \"Zoom out of %s DSO\"", | 1014 | ui_helpline__fpush("To zoom out press <- or -> + \"Zoom out of %s DSO\"", |
1014 | dso->kernel ? "the Kernel" : dso->short_name); | 1015 | dso->kernel ? "the Kernel" : dso->short_name); |
1015 | browser->hists->dso_filter = dso; | 1016 | browser->hists->dso_filter = dso; |
1017 | sort_dso.elide = true; | ||
1016 | pstack__push(fstack, &browser->hists->dso_filter); | 1018 | pstack__push(fstack, &browser->hists->dso_filter); |
1017 | } | 1019 | } |
1018 | hists__filter_by_dso(self); | 1020 | hists__filter_by_dso(self); |
@@ -1024,11 +1026,13 @@ zoom_thread: | |||
1024 | zoom_out_thread: | 1026 | zoom_out_thread: |
1025 | ui_helpline__pop(); | 1027 | ui_helpline__pop(); |
1026 | browser->hists->thread_filter = NULL; | 1028 | browser->hists->thread_filter = NULL; |
1029 | sort_thread.elide = false; | ||
1027 | } else { | 1030 | } else { |
1028 | ui_helpline__fpush("To zoom out press <- or -> + \"Zoom out of %s(%d) thread\"", | 1031 | ui_helpline__fpush("To zoom out press <- or -> + \"Zoom out of %s(%d) thread\"", |
1029 | thread->comm_set ? thread->comm : "", | 1032 | thread->comm_set ? thread->comm : "", |
1030 | thread->pid); | 1033 | thread->pid); |
1031 | browser->hists->thread_filter = thread; | 1034 | browser->hists->thread_filter = thread; |
1035 | sort_thread.elide = true; | ||
1032 | pstack__push(fstack, &browser->hists->thread_filter); | 1036 | pstack__push(fstack, &browser->hists->thread_filter); |
1033 | } | 1037 | } |
1034 | hists__filter_by_thread(self); | 1038 | hists__filter_by_thread(self); |