From: "Peter Teoh" <htmldeveloper@gmail.com>
To: systemtap@sources.redhat.com
Cc: "Om Narasimhan" <om.turyx@gmail.com>
Subject: Re: systemtap question..
Date: Sat, 23 Aug 2008 04:28:00 -0000 [thread overview]
Message-ID: <804dabb00808222127t3606302ds94056e7da6b0f30d@mail.gmail.com> (raw)
In-Reply-To: <48ACFC02.3080002@gmail.com>
as discovered by narasimhan, the following script will lead to kernel
freezing and hanged for me:
I execute via "stap -kvvv script.stp" command.
Question is: why does he get a compilation error when using the -u
option? (same for me as well, which goes away when removed?)
On Thu, Aug 21, 2008 at 1:24 PM, Om Narasimhan <om.turyx@gmail.com> wrote:
> --script begin--
> [om@testserv ~]$ cat /space/stap/inode-watch.stp
> # Usage:
> # taps the vfs_write and vfs_read
> #
>
> 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
>
> }
> -- script end--
> --errors begin--
> [om@testserv ~]$ stap -vv -u /space/stap/inode-watch.stp
> SystemTap translator/driver (version 0.6.2/0.127 built 2008-03-27)
> Copyright (C) 2005-2008 Red Hat, Inc. and others
> This is free software; see the source for copying conditions.
> Created temporary directory "/tmp/stap6uzgp4"
> Searched '/usr/share/systemtap/tapset/x86_64/*.stp', found 1
> Searched '/usr/share/systemtap/tapset/*.stp', found 37
> Pass 1: parsed user script and 38 library script(s) in 130usr/0sys/134real
> ms.
> probe vfs_read@fs/read_write.c:257 kernel section=.text
> pc=0xffffffff81098064
> probe vfs_write@fs/read_write.c:315 kernel section=.text
> pc=0xffffffff81097eed
> semantic error: field 'f_dentry' not found (alternatives: f_u f_path f_op
> f_count f_flags f_mode f_pos f_owner f_uid f_gid f_ra f_version f_security
> private_data f_ep_links f_ep_lock f_mapping): identifier '$file' at
> /space/stap/inode-watch.stp:7:10
> semantic error: field 'f_dentry' not found (alternatives: f_u f_path f_op
> f_count f_flags f_mode f_pos f_owner f_uid f_gid f_ra f_version f_security
> private_data f_ep_links f_ep_lock f_mapping): identifier '$file' at
> /space/stap/inode-watch.stp:8:11
> semantic error: probe_1063 with unresolved type: identifier 'inode' at
> /space/stap/inode-watch.stp:7:2
> semantic error: probe_1063 with unresolved type: identifier 'dev_nr' at
> /space/stap/inode-watch.stp:8:2
> semantic error: probe_1064 with unresolved type: identifier 'inode' at
> /space/stap/inode-watch.stp:7:2
> semantic error: probe_1064 with unresolved type: identifier 'dev_nr' at
> /space/stap/inode-watch.stp:8:2
> Pass 2: analyzed script: 2 probe(s), 0 function(s), 0 embed(s), 0 global(s)
> in 230usr/70sys/306real ms.
> Pass 2: analysis failed. Try again with more '-v' (verbose) options.
> Running rm -rf /tmp/stap6uzgp4
> --errors end--
>
> I know why the error occur.
> From include/linux/fs.h,
> #define f_dentry f_path.dentry
>
> Apparently f_dentry cannot be used from systemtap.
> If I replace f_dentry with fpath.dentry, systemtap complains about string
> operations because `.` is string concatenation operator.
>
> Any idea? Any pointers?
>
> Thanks,
> Om.
--
Regards,
Peter Teoh
next parent reply other threads:[~2008-08-23 4:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <48ACFC02.3080002@gmail.com>
2008-08-23 4:28 ` Peter Teoh [this message]
2008-08-23 12:51 ` Mark Wielaard
2008-08-23 14:09 ` Frank Ch. Eigler
2006-09-06 18:41 Stone, Joshua I
[not found] <1157546598.2847.28.camel@localhost.localdomain>
2006-09-06 13:36 ` Frank Ch. Eigler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=804dabb00808222127t3606302ds94056e7da6b0f30d@mail.gmail.com \
--to=htmldeveloper@gmail.com \
--cc=om.turyx@gmail.com \
--cc=systemtap@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).