On Thu, 02 Sep 2004 at 00:08 +0000, Yaoping Ruan wrote:
> Hi,
>
> I am wondering if it is possible to identify which line of the image
> causes each interrupt based on the sampling data. Currently, using
> opreport and symbols, one can get what symbols (function names)
> contribute to the sampling data. for example:
>
> #opreport --merge=tgid --symbols
> CPU: P4 / Xeon with 2 hyper-threads, speed 1601.4 MHz (estimated)
> Counted GLOBAL_POWER_EVENTS events (time during which processor is not
> stopped) with a unit mask of 0x01 (mandatory) count 1000000
> samples cum. samples% cum. % image name app name symbol name
> 716 716 3.4211 3.4211 vmlinux httpd tcp_v4_rcv
> 589 1305 2.8143 6.2354 vmlinux httpd __d_lookup
> 582 1887 2.7808 9.0162 vmlinux httpd sysenter_past_esp
> 565 2452 2.6996 11.7158 vmlinux httpd e1000_intr
> ...
options -g add filename and line
>
> In other words, the question is if it is possible to get further detail in
> each "symbol name", such as "tcp_v4_rcv", "__d_lookup" etc.? I looked at
> source code in pp and libpp, such as
> symbol_container.cpp, sample_container.cpp etc. but wasn't really sure if
> it could and how. I'd appreciate if any one can give me some advice.
opreport -g add filename and line number for each symbols if the binary
contain debug info.
opannotate can annotate source file with samples (require debug info too)
If I remember correctly, for kernel profiling there is a CONFIG_ option to
add to get debug info..
regards, phe
|