[prev in list] [next in list] [prev in thread] [next in thread]
List: oprofile-list
Subject: BUG: callgraph profiling not working on x86-64 linux-2.6.20
From: John Ruttenberg <rutt () ruttenberg ! org>
Date: 2007-04-30 20:33:58
Message-ID: 17974.21174.438294.244658 () weegee ! hollyrd
[Download RAW message or body]
At least I haven't been able to make it work much.
Here is the simplest example program I could think of:
#include <stdio.h>
#include <limits.h>
int ac = 0;
void foo()
{
ac += 1;
}
main()
{
int i;
for (i = INT_MAX; i > 0; --i)
foo();
}
I compiled it with -O0 -fno-omit-frame-pointer -g -m32, ran it, and then ran
opreport:
fedora-1:tmp$ /usr/local/bin/opreport -cl a.out
CPU: P4 / Xeon, speed 3391.49 MHz (estimated)
Counted GLOBAL_POWER_EVENTS events (time during which processor is not
stopped) with a unit mask of 0x01 (mandatory) count 100000
samples % image name symbol name
-------------------------------------------------------------------------------
185294 80.6275 a.out foo
185294 100.000 a.out foo [self]
-------------------------------------------------------------------------------
44516 19.3704 a.out main
44516 100.000 a.out main [self]
-------------------------------------------------------------------------------
1 4.4e-04 ld-2.5.so _dl_cache_libcmp
1 100.000 ld-2.5.so _dl_cache_libcmp [self]
-------------------------------------------------------------------------------
1 4.4e-04 ld-2.5.so _dl_check_map_versions
1 100.000 ld-2.5.so _dl_check_map_versions [self]
-------------------------------------------------------------------------------
1 4.4e-04 ld-2.5.so _dl_lookup_symbol_x
1 100.000 ld-2.5.so _dl_lookup_symbol_x [self]
-------------------------------------------------------------------------------
1 4.4e-04 ld-2.5.so do_lookup_x
1 100.000 ld-2.5.so do_lookup_x [self]
-------------------------------------------------------------------------------
1 4.4e-04 libc-2.5.so strrchr
1 100.000 libc-2.5.so strrchr [self]
-------------------------------------------------------------------------------
fedora-1:tmp$
which shows that it is somehow failing to follow the call graph arc from foo
to main. The backtrace depth is big enough:
fedora-1:tmp$ cat /dev/oprofile/backtrace_depth
100
If I compile it without -m32 I get similar (but even wronger looking) results:
opreport --callgraph a.out
CPU: P4 / Xeon, speed 3391.49 MHz (estimated)
Counted GLOBAL_POWER_EVENTS events (time during which processor is not
stopped) with a unit mask of 0x01 (mandatory) count 100000
warning: /lib64 could not be found.
warning: /{cg} could not be found.
warning: /{anon} could not be found.
samples % image name symbol name
-------------------------------------------------------------------------------
146306 65.8268 a.out main
146306 95.4290 a.out main [self]
7008 4.5710 {cg} (no symbols)
-------------------------------------------------------------------------------
75949 34.1714 a.out foo
75949 100.000 a.out foo [self]
-------------------------------------------------------------------------------
1 4.5e-04 ld-2.5.so _dl_lookup_symbol_x
1 100.000 ld-2.5.so _dl_lookup_symbol_x [self]
-------------------------------------------------------------------------------
1 4.5e-04 ld-2.5.so _dl_map_object_from_fd
1 100.000 ld-2.5.so _dl_map_object_from_fd [self]
-------------------------------------------------------------------------------
1 4.5e-04 ld-2.5.so check_match.8134
1 100.000 ld-2.5.so check_match.8134 [self]
-------------------------------------------------------------------------------
1 4.5e-04 libc-2.5.so fork
1 100.000 libc-2.5.so fork [self]
-------------------------------------------------------------------------------
0 0 ld-2.5.so _dl_map_object
1 100.000 lib64 (no symbols)
0 0 ld-2.5.so _dl_map_object [self]
-------------------------------------------------------------------------------
0 0 ld-2.5.so _dl_relocate_object
1 100.000 lib64 (no symbols)
0 0 ld-2.5.so _dl_relocate_object [self]
-------------------------------------------------------------------------------
0 0 ld-2.5.so _dl_sysdep_start
1 100.000 lib64 (no symbols)
0 0 ld-2.5.so _dl_sysdep_start [self]
-------------------------------------------------------------------------------
0 0 ld-2.5.so dl_main
1 100.000 lib64 (no symbols)
0 0 ld-2.5.so dl_main [self]
-------------------------------------------------------------------------------
1 25.0000 ld-2.5.so dl_main
1 25.0000 ld-2.5.so _dl_map_object
1 25.0000 ld-2.5.so _dl_relocate_object
1 25.0000 ld-2.5.so _dl_sysdep_start
0 0 lib64 (no symbols)
0 0 lib64 (no symbols) [self]
-------------------------------------------------------------------------------
0 0 libc-2.5.so __libc_start_main
222255 100.000 {cg} (no symbols)
0 0 libc-2.5.so __libc_start_main [self]
-------------------------------------------------------------------------------
7008 3.0568 a.out main
222255 96.9432 libc-2.5.so __libc_start_main
0 0 {cg} (no symbols)
0 0 {cg} (no symbols) [self]
-------------------------------------------------------------------------------
I'd enter this bug myself, but I'm not a member of the project. I'd really
like to know if anyone out there gets better results. Thanks.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
oprofile-list mailing list
oprofile-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic