]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
perf symbols: Accept an alias when looking for "_text"
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 15 Jan 2010 20:08:27 +0000 (18:08 -0200)
committerIngo Molnar <mingo@elte.hu>
Sat, 16 Jan 2010 09:58:50 +0000 (10:58 +0100)
As it is in PARISC64:

parisc:~# uname -a
Linux parisc 2.6.33-rc4-tip+ #1 SMP Thu Jan 14 13:33:34 BRST
2010 parisc64 GNU/Linux parisc:~# grep -w _text /proc/kallsyms
0000000040100000 A _text
parisc:~# grep 0000000040100000 /proc/kallsyms
0000000040100000 T stext
0000000040100000 T _stext
0000000040100000 A _text
parisc:~#

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1263586107-1756-2-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/util/event.c

index 966d207a15096a7bc435fb2a8ed9d2335d469de8..dc13cad828d78b3f7e5825f773e75f7dca319fab 100644 (file)
@@ -227,7 +227,12 @@ static int find_symbol_cb(void *arg, const char *name, char type, u64 start)
 {
        struct process_symbol_args *args = arg;
 
-       if (!symbol_type__is_a(type, MAP__FUNCTION) || strcmp(name, args->name))
+       /*
+        * Must be a function or at least an alias, as in PARISC64, where "_text" is
+        * an 'A' to the same address as "_stext".
+        */
+       if (!(symbol_type__is_a(type, MAP__FUNCTION) ||
+             type == 'A') || strcmp(name, args->name))
                return 0;
 
        args->start = start;