Commit fb9c8188 authored by Anton Blanchard's avatar Anton Blanchard Committed by Ingo Molnar

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: default avatarAnton Blanchard <anton@samba.org>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
LKML-Reference: <20090630230141.182536873@samba.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent d8db1b57
...@@ -121,6 +121,7 @@ typedef union event_union { ...@@ -121,6 +121,7 @@ typedef union event_union {
static LIST_HEAD(dsos); static LIST_HEAD(dsos);
static struct dso *kernel_dso; static struct dso *kernel_dso;
static struct dso *vdso; static struct dso *vdso;
static struct dso *hypervisor_dso;
static void dsos__add(struct dso *dso) static void dsos__add(struct dso *dso)
{ {
...@@ -202,6 +203,11 @@ static int load_kernel(void) ...@@ -202,6 +203,11 @@ static int load_kernel(void)
dsos__add(vdso); dsos__add(vdso);
hypervisor_dso = dso__new("[hypervisor]", 0);
if (!hypervisor_dso)
return -1;
dsos__add(hypervisor_dso);
return err; return err;
} }
...@@ -640,7 +646,8 @@ sort__sym_print(FILE *fp, struct hist_entry *self) ...@@ -640,7 +646,8 @@ sort__sym_print(FILE *fp, struct hist_entry *self)
if (self->sym) { if (self->sym) {
ret += fprintf(fp, "[%c] %s", ret += fprintf(fp, "[%c] %s",
self->dso == kernel_dso ? 'k' : '.', self->sym->name); self->dso == kernel_dso ? 'k' :
self->dso == hypervisor_dso ? 'h' : '.', self->sym->name);
} else { } else {
ret += fprintf(fp, "%#016llx", (u64)self->ip); ret += fprintf(fp, "%#016llx", (u64)self->ip);
} }
...@@ -963,6 +970,9 @@ hist_entry__add(struct thread *thread, struct map *map, struct dso *dso, ...@@ -963,6 +970,9 @@ hist_entry__add(struct thread *thread, struct map *map, struct dso *dso,
} }
switch (context) { switch (context) {
case PERF_CONTEXT_HV:
dso = hypervisor_dso;
break;
case PERF_CONTEXT_KERNEL: case PERF_CONTEXT_KERNEL:
dso = kernel_dso; dso = kernel_dso;
break; break;
...@@ -1275,6 +1285,9 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head) ...@@ -1275,6 +1285,9 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
} else { } else {
show = SHOW_HV; show = SHOW_HV;
level = 'H'; level = 'H';
dso = hypervisor_dso;
dprintf(" ...... dso: [hypervisor]\n"); dprintf(" ...... dso: [hypervisor]\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment