This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Using kernel global variables
- From: David Wilder <dwilder at us dot ibm dot com>
- To: SystemTAP <systemtap at sources dot redhat dot com>
- Date: Fri, 03 Aug 2007 09:56:12 -0700
- Subject: Using kernel global variables
It is my understanding if we want to access a kernel global variable in
a tap script we must be in a context that is using the variable.
for example the following script will compile:
probe kernel.function("jiffies_to_timeval")
{
printf("%x\n", $jiffies);
}
This works because, jiffies_to_timeval() uses jiffies in the
function, thus in the scope of the probes there exists a DWARF location
information block for the variable jiffies.
If I change the probe point to do_fork() the probe will not build, I
get the error:
"probe do_fork@kernel/fork.c:1369 kernel section=.text pc=0x127b00
semantic error: failed to retrieve location attribute for local
'jiffies' (dieoffset: 0x18309f): identifier '$jiffies' at global.stp:5:17"
This is because do_fork is not using jiffies.
Is this correct?
Dave....