From 776327be9ecf95e15fbc561f14aa8eb202d4ea33 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 3 Jun 2009 10:39:26 +0200 Subject: [PATCH] --- yaml --- r: 147623 b: refs/heads/master c: ed966aac335a63083d3125198479447248637d9e h: refs/heads/master i: 147621: 4474f4c65fbb7a3ad261f52661eb1522c11763a7 147619: b24cd3565cb33ff3b1a0ecd06ae9f3e790ae003d 147615: dc50df1f7a678b9198d8cf68baf2c5cba818d234 v: v3 --- [refs] | 2 +- trunk/Documentation/perf_counter/builtin-report.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 261a3d15ef49..b1f461cd8867 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5352f35d6ae7b8b981d77137fb268bc54d10624f +refs/heads/master: ed966aac335a63083d3125198479447248637d9e diff --git a/trunk/Documentation/perf_counter/builtin-report.c b/trunk/Documentation/perf_counter/builtin-report.c index a8d390596d8d..0f88d9ebb34a 100644 --- a/trunk/Documentation/perf_counter/builtin-report.c +++ b/trunk/Documentation/perf_counter/builtin-report.c @@ -728,6 +728,8 @@ static int __cmd_report(void) event->ip.pid, (void *)(long)ip); + dprintf(" ... thread: %s:%d\n", thread->comm, thread->pid); + if (thread == NULL) { fprintf(stderr, "problem processing %d event, skipping it.\n", event->header.type); @@ -740,6 +742,8 @@ static int __cmd_report(void) dso = kernel_dso; + dprintf(" ...... dso: %s\n", dso->name); + } else if (event->header.misc & PERF_EVENT_MISC_USER) { show = SHOW_USER; @@ -749,11 +753,22 @@ static int __cmd_report(void) if (map != NULL) { dso = map->dso; ip -= map->start + map->pgoff; + } else { + /* + * If this is outside of all known maps, + * and is a negative address, try to look it + * up in the kernel dso, as it might be a + * vsyscall (which executes in user-mode): + */ + if ((long long)ip < 0) + dso = kernel_dso; } + dprintf(" ...... dso: %s\n", dso ? dso->name : ""); } else { show = SHOW_HV; level = 'H'; + dprintf(" ...... dso: [hypervisor]\n"); } if (show & show_mask) {