This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: systemtap question..
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: "Peter Teoh" <htmldeveloper at gmail dot com>
- Cc: systemtap at sources dot redhat dot com, "Om Narasimhan" <om dot turyx at gmail dot com>
- Date: Sat, 23 Aug 2008 10:07:31 -0400
- Subject: Re: systemtap question..
- References: <48ACFC02.3080002@gmail.com> <804dabb00808222127t3606302ds94056e7da6b0f30d@mail.gmail.com>
"Peter Teoh" <htmldeveloper@gmail.com> writes:
> as discovered by narasimhan, the following script will lead to kernel
> freezing and hanged for me:
> I execute via "stap -kvvv script.stp" command.
Please see the "HowToReportBugs" systemtap wiki page.
> Question is: why does he get a compilation error when using the -u
> option? (same for me as well, which goes away when removed?)
>> probe kernel.function ("vfs_read"), kernel.function("vfs_write")
>> {
>> inode = $file->f_dentry->d_inode->i_ino
>> dev_nr = $file->f_dentry->d_inode->i_sb->s_dev
>>
>> }
The reason is that this probe does nothing. The "inode" and "dev_nr"
variables being fetched are not printed, so systemtap figures they
were not needed in the first place, and elides the $-expressions. The
"-u" (unoptimized) flag preserves such code.
- FChE