This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: no access to local variables in function
- From: David Smith <dsmith at redhat dot com>
- To: "Lentes, Bernd" <bernd dot lentes at helmholtz-muenchen dot de>, "'systemtap at sourceware dot org'" <systemtap at sourceware dot org>
- Date: Thu, 28 May 2015 15:46:43 -0500
- Subject: Re: no access to local variables in function
- Authentication-results: sourceware.org; auth=none
- References: <15785B7E063D464C86DD482FCAE4EBA501CAC8896EF4 at XCH11 dot scidom dot de>
On 05/28/2015 07:06 AM, Lentes, Bernd wrote:
> Hi,
>
> i'm new to systemtap. I try to check some local variables of kernel functions. I have a SLES 10 SP4, kernel 2.6.16.60-0.103.1-smp. I'm using systemtap 0.8.
> I'm following the instructions from https://sourceware.org/systemtap/SystemTap_Beginners_Guide/targetvariables.html .
>
> If I try to use the example from this page I get:
> idcc-devel:~/systemtap # stap -L 'kernel.function("vfs_read")'
> kernel.function("vfs_read@fs/read_write.c:248")
>
> Checking other functions with local variables also does not work:
> idcc-devel:~/systemtap # stap -L 'kernel.function("local_bh_enable")'
> kernel.function("local_bh_enable@kernel/softirq.c:139")
>
> idcc-devel:~/systemtap # stap -L 'kernel.function("__tasklet_schedule")'
> kernel.function("__tasklet_schedule@kernel/softirq.c:224")
>
> idcc-devel:~/systemtap # stap -L 'kernel.function("tasklet_kill_immediate")'
> kernel.function("tasklet_kill_immediate@kernel/softirq.c:439")
>
> I don't see any local variable. What can I do ?
On my fedora 21 system, I see this:
# stap -L 'kernel.function("vfs_read")'
kernel.function("vfs_read@fs/read_write.c:478") $file:struct file*
$buf:char* $count:size_t $pos:loff_t*
The first thing I'd do is make sure you've got kernel debuginfo
installed that *exactly* matches that kernel.
Wow, you are using an old kernel (2.6.16) and a *really* old version of
systemtap (0.8). Systemtap 0.8 was released in 2008-11-13. We've had 23
releases since then. Is there any chance you can upgrade to a newer version?
> Btw: is there a chance to monitor the variables of a blacklisted function ?
If you use guru mode ('stap -g'), you can probe blacklisted functions.
However, functions are usually blacklisted for a good reason...
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)