From: Jake Maul <jakemaul@gmail.com>
To: Josh Stone <jistone@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: Linux VFS cache hit rate script
Date: Fri, 22 Apr 2011 21:47:00 -0000 [thread overview]
Message-ID: <BANLkTiny5EKO=yv-L7Kiag5+S0feRTx_nw@mail.gmail.com> (raw)
In-Reply-To: <4DB1E4D2.70200@redhat.com>
On Fri, Apr 22, 2011 at 1:28 PM, Josh Stone <jistone@redhat.com> wrote:
> That should do it. I should have been more clear - the effect I
> intended was just to relieve the need for MAXMAPENTRIES. The
> "__devnames" map should now only contain the real device names, and not
> waste any time/space on "N/A" entries. Your script's output would not
> be affected though.
>
> Josh
>
Ah. Well, in that case, sorry, still no good. I cut out that bit of
the output, but:
# time stap -DSTP_NO_OVERLOAD devnames.stp -c "sleep 35" | sort | uniq -c
ERROR: Array overflow, check MAXMAPENTRIES near identifier '$file' at
/usr/share/systemtap/tapset/vfs.stp:780:9
WARNING: Number of errors: 1, skipped probes: 2126
Pass 5: run failed. Try again with another '--vp 00001' option.
Here's an interesting note though: the line numbers are different. The
only difference between the runs is which of the 2 functions is
commented out.
With stock function:
ERROR: Array overflow, check MAXMAPENTRIES near identifier '$file' at
/usr/share/systemtap/tapset/vfs.stp:769:9
With your function:
ERROR: Array overflow, check MAXMAPENTRIES near identifier '$file' at
/usr/share/systemtap/tapset/vfs.stp:780:9
Here's that snippet in vfs.stp (pasting here because the line numbers
are going to be off now, as compared to the stock file):
761 probe vfs.read = kernel.function("vfs_read")
762 {
763 file = $file
764 pos = $pos
765 buf = $buf
766 bytes_to_read = $count
767 dev = __file_dev($file)
768 devname = __find_bdevname(dev, __file_bdev($file))
769 ino = __file_ino($file)
770
771 name = "vfs.read"
772 argstr = sprintf("%d, %d, %p", $count, $pos, $buf)
773 }
774
775 probe vfs.read.return = kernel.function("vfs_read").return
776 {
777 name = "vfs.read"
778 retstr = sprintf("%d", $return)
779
780 file = $file
781 pos = $pos
782 buf = $buf
783 bytes_to_read = $count
784 dev = __file_dev($file)
785 devname = __find_bdevname(dev, __file_bdev($file))
786 ino = __file_ino($file)
787
788 ret = $return
789 bytes_read = $return > 0 ? $return : 0
790 error = $return < 0 ? $return : 0
791 error_str = error ? errno_str(error) : ""
792 }
So as you can see, one errors in vfs.read, the other in
vfs.read.return. In both cases something to do with $file gets
assigned to a normal variable.
Side note: I wonder if the "name" variables are messed up... vfs.read*
and vfs.write* don't follow quite the same pattern:
probe vfs.read = kernel.function("vfs_read")
name = "vfs.read"
probe vfs.read.return = kernel.function("vfs_read").return
name = "vfs.read"
probe vfs.readv = kernel.function("vfs_readv")
name = "vfs.read"
probe vfs.readv.return = kernel.function("vfs_readv").return
name = "vfs.readv"
probe vfs.write = kernel.function("vfs_write")
name = "vfs.write"
probe vfs.write.return = kernel.function("vfs_write").return
name = "vfs.write"
probe vfs.writev = kernel.function("vfs_writev")
name = "vfs.writev"
probe vfs.writev.return = kernel.function("vfs_writev").return
name = "vfs.writev"
Jake
next prev parent reply other threads:[~2011-04-22 21:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 19:04 Jake Maul
2011-04-20 20:09 ` William Cohen
2011-04-20 20:46 ` Jake Maul
2011-04-20 20:57 ` Josh Stone
2011-04-20 22:25 ` Jake Maul
2011-04-21 20:17 ` Jake Maul
2011-04-21 22:31 ` William Cohen
2011-04-21 23:02 ` Jake Maul
2011-04-21 23:46 ` Josh Stone
2011-04-22 19:17 ` Jake Maul
2011-04-22 20:28 ` Josh Stone
2011-04-22 21:47 ` Jake Maul [this message]
2011-04-25 21:54 ` Josh Stone
2011-04-26 2:11 ` Jake Maul
2011-04-25 22:53 ` Josh Stone
2011-04-26 1:59 ` Jake Maul
2011-04-26 2:44 ` Josh Stone
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='BANLkTiny5EKO=yv-L7Kiag5+S0feRTx_nw@mail.gmail.com' \
--to=jakemaul@gmail.com \
--cc=jistone@redhat.com \
--cc=systemtap@sourceware.org \
/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).