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: no access to local variables in function


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)


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