]> git.baikalelectronics.ru Git - kernel.git/commit
perf symbols: Fix vsyscall symbol lookup
authorAndrew Lutomirski <luto@mit.edu>
Thu, 24 Mar 2011 04:36:56 +0000 (00:36 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 28 Mar 2011 17:44:15 +0000 (14:44 -0300)
commitf758f6c1dffb94d38b5a78f5c66e27af94370819
treebb5a8a79c24f7f9f41b0ca076b9800cb3a840d7a
parent4401d4fea3274161cbd034f9428add1b122c7468
perf symbols: Fix vsyscall symbol lookup

Perf can't currently trace into the vsyscall page.  It looks like it was
meant to work.

Tested on 2.6.38 and today's -git.

The bug is easy to reproduce.  Compile this:

int main()
{
int i;
struct timespec t;
for(i = 0; i < 10000000; i++)
clock_gettime(CLOCK_MONOTONIC, &t);
return 0;
}

and run it through perf record; perf report.  The top entry shows
"[unknown]" and you can't zoom in.

It looks like there are two issues.  The first is a that a test for user
mode executing in kernel space is backwards.  (That's the first hunk
below).  The second (I think) is that something's wrong with the code
that generates lots of little struct dso objects for different sections
-- when it runs on vmlinux it results in bogus long_name values which
cause objdump to fail.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LPU-Reference: <AANLkTikxSw5+wJZUWNz++nL7mgivCh_Zf=2Kq6=f9Ce_@mail.gmail.com>
Signed-off-by: Andy Lutomirski <luto@mit.edu>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/event.c
tools/perf/util/symbol.c