This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Linux VFS cache hit rate script
On Thu, Apr 21, 2011 at 4:45 PM, Josh Stone <jistone@redhat.com> wrote:
> Oy - it's possible that the "dev" is meaningless (or means something
> different) when the name is returned "N/A" (bdev==0), so we may be
> caching noise as the index. ?Or in any case, caching "N/A" in so many
> different forms is not helpful. ?Would you be willing to try this
> modified function?
>
> function __find_bdevname:string(dev:long, bdev:long)
> {
> ? ? ? ?if (bdev == 0)
> ? ? ? ? ? ? ? ?return "N/A"
> ? ? ? ?if (dev in __devnames)
> ? ? ? ? ? ? ? ?return __devnames[dev]
> ? ? ? ?return __devnames[dev] = bdevname(bdev)
> }
No problem... seems to have no effect though:
339869 dev: 16 devname: N/A
345 dev: 18 devname: N/A
4569 dev: 22 devname: N/A
5 dev: 23 devname: N/A
798 dev: 265289728 devname: dm-0
640 dev: 3 devname: N/A
2594 dev: 5 devname: N/A
250861 dev: 6 devname: N/A
I just commented out the existing version in
/usr/share/systemtap/tapsets/vfs.stp, and put your function in
instead. Do I need to do anything more than that, like rebuild
something? (not a systemtap dev)
Jake