This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to track the functions in self-written module using SystemTap?


On  Mon  2015-12-07  13:53 , David Smith wrote:
> 1) Make sure your kernel was compiled with frame pointer support (which
> it should if it is a standard RHEL kernel):
> 
> # fgrep FRAME_POINTER /boot/config-`uname -r`
> CONFIG_SCHED_OMIT_FRAME_POINTER=y
> CONFIG_ARCH_WANT_FRAME_POINTERS=y
> CONFIG_FRAME_POINTER=y
> 
> 2) Let's make sure your module still has debuginfo present. First, run
> "file" on your module, making sure it says "not stripped". Then go a bit
> deeper and run "readelf --sections" on your module - there should be
> several sections that start with '.debug', including one called
> '.debug_frame'.

I'm traying to trace my own stap module too.  I'm using stap -B
CONFIG_DEBUG_INFO=y to put the dfebuginfo into the module.
However, this way I seem to get the '.debug_frame' section on
RHEL6, but not on RHEL7 or recent Fedora.  Because of this I'm
failing to get reasonable backtraces.  Any workaround?

Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]