diff options
author | Anton Blanchard <anton@samba.org> | 2009-06-30 19:00:49 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-30 19:25:20 -0400 |
commit | fb9c818873a788c5c01c9868cc6050df96e2c7df (patch) | |
tree | 21104da26e2cfaad96b1bf10256fe5d635e4e6b8 /tools/perf/builtin-report.c | |
parent | d8db1b57d31a6b30ea2f0df318eab50fc92b38d6 (diff) |
perf report: Add hypervisor dso
Add a dso for hypervisor samples. We don't get any symbol
information on the ppc64 hypervisor but this at least gives
us a high level summary of the time spent in there.
Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
LKML-Reference: <20090630230141.182536873@samba.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 88e88c510ae5..3f5d8ea05ff0 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -121,6 +121,7 @@ typedef union event_union { | |||
121 | static LIST_HEAD(dsos); | 121 | static LIST_HEAD(dsos); |
122 | static struct dso *kernel_dso; | 122 | static struct dso *kernel_dso; |
123 | static struct dso *vdso; | 123 | static struct dso *vdso; |
124 | static struct dso *hypervisor_dso; | ||
124 | 125 | ||
125 | static void dsos__add(struct dso *dso) | 126 | static void dsos__add(struct dso *dso) |
126 | { | 127 | { |
@@ -202,6 +203,11 @@ static int load_kernel(void) | |||
202 | 203 | ||
203 | dsos__add(vdso); | 204 | dsos__add(vdso); |
204 | 205 | ||
206 | hypervisor_dso = dso__new("[hypervisor]", 0); | ||
207 | if (!hypervisor_dso) | ||
208 | return -1; | ||
209 | dsos__add(hypervisor_dso); | ||
210 | |||
205 | return err; | 211 | return err; |
206 | } | 212 | } |
207 | 213 | ||
@@ -640,7 +646,8 @@ sort__sym_print(FILE *fp, struct hist_entry *self) | |||
640 | 646 | ||
641 | if (self->sym) { | 647 | if (self->sym) { |
642 | ret += fprintf(fp, "[%c] %s", | 648 | ret += fprintf(fp, "[%c] %s", |
643 | self->dso == kernel_dso ? 'k' : '.', self->sym->name); | 649 | self->dso == kernel_dso ? 'k' : |
650 | self->dso == hypervisor_dso ? 'h' : '.', self->sym->name); | ||
644 | } else { | 651 | } else { |
645 | ret += fprintf(fp, "%#016llx", (u64)self->ip); | 652 | ret += fprintf(fp, "%#016llx", (u64)self->ip); |
646 | } | 653 | } |
@@ -963,6 +970,9 @@ hist_entry__add(struct thread *thread, struct map *map, struct dso *dso, | |||
963 | } | 970 | } |
964 | 971 | ||
965 | switch (context) { | 972 | switch (context) { |
973 | case PERF_CONTEXT_HV: | ||
974 | dso = hypervisor_dso; | ||
975 | break; | ||
966 | case PERF_CONTEXT_KERNEL: | 976 | case PERF_CONTEXT_KERNEL: |
967 | dso = kernel_dso; | 977 | dso = kernel_dso; |
968 | break; | 978 | break; |
@@ -1275,6 +1285,9 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head) | |||
1275 | } else { | 1285 | } else { |
1276 | show = SHOW_HV; | 1286 | show = SHOW_HV; |
1277 | level = 'H'; | 1287 | level = 'H'; |
1288 | |||
1289 | dso = hypervisor_dso; | ||
1290 | |||
1278 | dprintf(" ...... dso: [hypervisor]\n"); | 1291 | dprintf(" ...... dso: [hypervisor]\n"); |
1279 | } | 1292 | } |
1280 | 1293 | ||