/* XXX: Is this hashing really that helpful? The call to bdevname()
* isn't very involved... */
global __devnames
-function __find_bdevname(dev, bdev)
+function __find_bdevname:string(dev:long, bdev:long)
{
# return ""
CATCH_DEREF_FAULT();
%}
+function __page_index:long (page:long) %{ /* pure */
+ struct page *page = (struct page *)(long)THIS->page;
+ THIS->__retvalue = (long)kread(&(page->index));
+ CATCH_DEREF_FAULT();
+%}
+
function __file_dev:long (file:long) %{ /* pure */
struct file *file = (struct file *)(long)THIS->file;
struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
retstr = sprintf("%d", $return)
}
+%( kernel_v < "2.6.23" %?
probe generic.fop.sendfile = kernel.function ("generic_file_sendfile")
{
dev = __file_dev($in_file)
units = "bytes"
}
}
+%)
probe generic.fop.splice_read = kernel.function ("generic_file_splice_read") ?
{
devname = __find_bdevname(dev, __page_bdev(__page))
ino = __page_ino(__page)
- page_index = $page->index
+ page_index = __page_index(__page)
name = "block_sync_page"
argstr = sprintf("%d", page_index)
probe vfs.buffer_migrate_page = kernel.function ("buffer_migrate_page")?
{
- dev = __page_dev($page)
- ino = __page_ino($page)
- devname = __find_bdevname(dev,__page_bdev($page))
+ __page = $page
+ dev = __page_dev(__page)
+ ino = __page_ino(__page)
+ devname = __find_bdevname(dev,__page_bdev(__page))
- page_index = $page->index
+ page_index = __page_index(__page)
name = "buffer_migrate_page"
argstr = sprintf("%d", page_index)
devname = __find_bdevname(dev, __page_bdev(__page))
ino = __page_ino(__page)
- index = $page->index
+ index = __page_index(__page)
name = "__set_page_dirty_buffers"
argstr = sprintf("%d", page_index)
devname = __find_bdevname(dev, __page_bdev(__page))
ino = __page_ino(__page)
- index = $page->index
+ index = __page_index(__page)
name = "do_mpage_readpage"
argstr = sprintf("%d", index)
probe vfs.remove_from_page_cache = kernel.function ("__remove_from_page_cache")
{
- dev = __page_dev($page)
- devname = __find_bdevname(dev, __page_bdev($page))
- ino = __page_ino($page)
+ __page = $page
+ dev = __page_dev(__page)
+ devname = __find_bdevname(dev, __page_bdev(__page))
+ ino = __page_ino(__page)
- index = $page->index
+ index = __page_index(__page)
name = "vfs.remove_from_page_cache"
argstr = sprintf("%d", ino)