This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: Stap is translating to functions in __exit sections...and later module load fails
- From: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>
- To: "Eugeniy Meshcheryakov" <eugeniy dot meshcheryakov at googlemail dot com>, "Keshavamurthy, Anil S" <anil dot s dot keshavamurthy at intel dot com>
- Cc: "Systemtap" <systemtap at sources dot redhat dot com>
- Date: Fri, 13 Oct 2006 15:28:46 -0700
- Subject: RE: Stap is translating to functions in __exit sections...and later module load fails
On Friday, October 13, 2006 2:29 PM, Eugeniy Meshcheryakov wrote:
> It is strange that translator sees it at all. The code is
>
> static void __exit
> exit_pfm_fs(void)
> {
> unregister_filesystem(&pfm_fs_type);
> mntput(pfmfs_mnt);
> }
>
> and this function is never used...
If the function is static and never used, then the linker will probably
remove it...
On Friday, October 13, 2006 2:38 PM, Keshavamurthy, Anil S wrote:
> Looks like this is in .exit.text section
> [root@csdor-tiger1 linux-2.6.19-rc1]# objdump -t
> arch/ia64/kernel/perfmon.o |grep exit_pfm_fs 0000000000000000 l F
> .exit.text 0000000000000070 exit_pfm_fs
>
> However "objdump -t vmlinux| grep exit_pfm_fs" did not show any thing.
This seems to support the notion that the linker elided that function.
So, as Eugeniy wondered, why did the translator pick up that function at
all? I'm also curious what IP it chose for the kprobe, if the function
no longer exists... Please try this command:
$ stap -p2 -vv -e 'probe kernel.function("exit_pfm_fs"){}' 2>&1 | grep
'pc='
I suspect that either elfutils is giving 'stale' debug information, or
the translator is misinterpreting its results.
Josh