* [PATCH 1/2] perf sort: Improve dso sort output by separating unresolved samples by type
@ 2011-08-31 1:49 Anton Blanchard
2011-08-31 12:33 ` emunson
0 siblings, 1 reply; 2+ messages in thread
From: Anton Blanchard @ 2011-08-31 1:49 UTC (permalink / raw)
To: Peter Zijlstra, Paul Mackerras, Ingo Molnar,
Arnaldo Carvalho de Melo, Frederic Weisbecker, emunson, imunsie
Cc: linux-kernel
We currently roll up all unresolved kernel, user, hypervisor and guest
samples into the one bucket:
59.64% [unknown]
22.71% [kernel.kallsyms]
9.40% libj9jit26.so
We can get a much better high level view by separating these unresolved
samples by symbol type:
56.64% [unknown:.]
22.71% [kernel.kallsyms]
9.40% libj9jit26.so
2.81% [unknown:H]
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-2.6-tip/tools/perf/util/sort.c
===================================================================
--- linux-2.6-tip.orig/tools/perf/util/sort.c 2011-08-31 11:34:53.070439428 +1000
+++ linux-2.6-tip/tools/perf/util/sort.c 2011-08-31 11:37:57.543628167 +1000
@@ -111,6 +111,9 @@ sort__dso_cmp(struct hist_entry *left, s
struct dso *dso_r = right->ms.map ? right->ms.map->dso : NULL;
const char *dso_name_l, *dso_name_r;
+ if (!dso_l && !dso_r)
+ return right->level - left->level;
+
if (!dso_l || !dso_r)
return cmp_null(dso_l, dso_r);
@@ -128,13 +131,16 @@ sort__dso_cmp(struct hist_entry *left, s
static int hist_entry__dso_snprintf(struct hist_entry *self, char *bf,
size_t size, unsigned int width)
{
+ char unknown[] = "[unknown:.]";
+
if (self->ms.map && self->ms.map->dso) {
const char *dso_name = !verbose ? self->ms.map->dso->short_name :
self->ms.map->dso->long_name;
return repsep_snprintf(bf, size, "%-*s", width, dso_name);
}
- return repsep_snprintf(bf, size, "%-*s", width, "[unknown]");
+ unknown[strlen(unknown) - 2] = self->level;
+ return repsep_snprintf(bf, size, "%-*s", width, unknown);
}
struct sort_entry sort_dso = {
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] perf sort: Improve dso sort output by separating unresolved samples by type
2011-08-31 1:49 [PATCH 1/2] perf sort: Improve dso sort output by separating unresolved samples by type Anton Blanchard
@ 2011-08-31 12:33 ` emunson
0 siblings, 0 replies; 2+ messages in thread
From: emunson @ 2011-08-31 12:33 UTC (permalink / raw)
To: Anton Blanchard
Cc: Peter Zijlstra, Paul Mackerras, Ingo Molnar,
Arnaldo Carvalho de Melo, Frederic Weisbecker, imunsie,
linux-kernel
On Wed, 31 Aug 2011 11:49:44 +1000, Anton Blanchard wrote:
> We currently roll up all unresolved kernel, user, hypervisor and
> guest
> samples into the one bucket:
>
> 59.64% [unknown]
> 22.71% [kernel.kallsyms]
> 9.40% libj9jit26.so
>
> We can get a much better high level view by separating these
> unresolved
> samples by symbol type:
>
> 56.64% [unknown:.]
> 22.71% [kernel.kallsyms]
> 9.40% libj9jit26.so
> 2.81% [unknown:H]
>
> Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Eric B Munson <emunson@mgebm.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-31 12:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-31 1:49 [PATCH 1/2] perf sort: Improve dso sort output by separating unresolved samples by type Anton Blanchard
2011-08-31 12:33 ` emunson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.