This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Function tree
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Domenico Di Leo <domenico dot dileo at unina dot it>
- Cc: systemtap at sourceware dot org
- Date: Fri, 27 Jul 2012 13:03:24 -0400
- Subject: Re: Function tree
- References: <5012B1F0.4070900@unina.it>
Domenico Di Leo <domenico.dileo@unina.it> writes:
> [...]
> Something like this:
> __kmalloc <- expand_files (fs/file.c line 248) <-load_elf_binary
> (fs_bimfmt.c line 554) ...
> [...]
To map PC values that make up the raw backtrace to symbols, one needs
only a symbol table. To map them further to source files and specific
line numbers, one needs further information, in the form of the DWARF
.debug_line and perhaps some extra stuff.
One option is to extend systemtap to search this data at script
processing time, and expose it to scripts. This actually shouldn't be
too difficult to do, we just haven't gotten to it yet (sorry).
http://sourceware.org/bugzilla/show_bug.cgi?id=12276
Another option is to post-process PC values from the raw backtrace,
outside the data gathering stage. This is what perf does, or what you
can do for yourself by some script that runs binutils' addr2line on
the raw backtrace() addresses that stap can print.
- FChE