]> sourceware.org Git - systemtap.git/commitdiff
* applying kernel drift patches
authorfche <fche>
Tue, 20 Mar 2007 16:22:34 +0000 (16:22 +0000)
committerfche <fche>
Tue, 20 Mar 2007 16:22:34 +0000 (16:22 +0000)
2007-03-09  Pierre Peiffer  <pierre.peiffer@bull.net>

* nfsd.stp (nfsd.dispatch): Change initialization of variable
client_ip with a call to addr_from_rqst.
* rpc.stp (addr_from_rqst): - update with changes in struct svc_rqst
- __rpc_execute returns void now.  struct rpc_xprt modified since
kernel 2.6.19.
* nfs.stp, vfs.stp: Local variables f_dentry renamed, because
conflicting with a new #define in kernel header linux/fs.h in 2.6.20.

2007-03-09  Pierre Peiffer  <pierre.peiffer@bull.net>

* nfs.stp: Local variables f_dentry renamed, because conflicting
with a new #define in kernel header linux/fs.h in 2.6.20.

* rpc.stp (_addevent.sunrpc.sched.execute.return):
update with __rpc_execute which returns void since kernel 2.6.21.

tapset/ChangeLog
tapset/LKET/Changelog
tapset/LKET/nfs.stp
tapset/LKET/rpc.stp
tapset/nfs.stp
tapset/nfsd.stp
tapset/rpc.stp
tapset/vfs.stp

index 20cbc82f4d428730fe73f118e4ea58fd1e455150..4b122b56a27867dbe3b6a95a75720e9518c797a6 100644 (file)
@@ -1,3 +1,13 @@
+2007-03-09  Pierre Peiffer  <pierre.peiffer@bull.net>
+
+       * nfsd.stp (nfsd.dispatch): Change initialization of variable
+       client_ip with a call to addr_from_rqst.
+       * rpc.stp (addr_from_rqst): - update with changes in struct svc_rqst
+       - __rpc_execute returns void now.  struct rpc_xprt modified since
+       kernel 2.6.19.
+       * nfs.stp, vfs.stp: Local variables f_dentry renamed, because
+       conflicting with a new #define in kernel header linux/fs.h in 2.6.20.
+
 2007-02-29 David Wilder <dwilder@us.ibm.com>
 
        *conversions.stp (kernel_int) added goto success; (PR 4419)
index 9f26763603d3b52c784930ccc8e807a0663a2d99..342e2a54ece039975872d4bdb6f9e63da58a762e 100644 (file)
@@ -1,3 +1,11 @@
+2007-03-09  Pierre Peiffer  <pierre.peiffer@bull.net>
+
+       * nfs.stp: Local variables f_dentry renamed, because conflicting
+       with a new #define in kernel header linux/fs.h in 2.6.20.
+
+       * rpc.stp (_addevent.sunrpc.sched.execute.return):
+       update with __rpc_execute which returns void since kernel 2.6.21.
+
 2007-02-06  Josh Stone  <joshua.i.stone@intel.com>
 
        * nfs.stp, nfs_proc.stp, nfsd.stp, process.stp, tskdispatch.stp:
index 7267da740f2266b75dbc879e876c2c2c3b51c2f6..63852d616729d7a96579a83befb2dd91c7da88a6 100755 (executable)
@@ -1,8 +1,8 @@
 /* Helper functions */
 function __file_fsname:string (file:long) %{ /* pure */
        struct file *file = (struct file *)(long)THIS->file;
-       struct dentry *f_dentry = file? kread(&(file->f_dentry)) : NULL;
-       struct inode *d_inode = f_dentry? kread(&(f_dentry->d_inode)) : NULL;
+       struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
+       struct inode *d_inode = dentry? kread(&(dentry->d_inode)) : NULL;
        if (d_inode == NULL)
                strlcpy(THIS->__retvalue, "NULL", MAXSTRINGLEN);
        else {
index f78b585d0df98a465b4edb7f5c13c44df15cdb7a..b9c8ca6022d29aabec63cb32788337912d45195c 100755 (executable)
@@ -697,7 +697,11 @@ probe addevent.sunrpc.sched.execute.return
 probe _addevent.sunrpc.sched.execute.return
        = sunrpc.sched.execute.return
 {
+%( kernel_v <= "2.6.20" %?
        log_sunrpc_return_int64(HOOKID_SUNRPC_SCHED_EXECUTE_RETURN, $return)
+%:
+       log_sunrpc_return_void(HOOKID_SUNRPC_SCHED_EXECUTE_RETURN)
+%)
 }
 
 function log_sunrpc_execute(hookid:long, xid:long, prog:long, vers:long,
index 083688ca359e845e26aa135550cc3d507b1504a3..cbbaf78e6ecbd2862502c48d7e2b44f253ac2faf 100644 (file)
@@ -1,3 +1,13 @@
+// nfs tapset
+// Copyright (C) 2006-2007 IBM Corp.
+// Copyright (C) 2007 Intel Corporation.
+// Copyright (C) 2007 Bull S.A.S
+//
+// This file is part of systemtap, and is free software.  You can
+// redistribute it and/or modify it under the terms of the GNU General
+// Public License (GPL); either version 2, or (at your option) any
+// later version.
+
 %{
 #include <linux/kernel.h>
 #include <linux/nfs_fs.h>
@@ -197,21 +207,21 @@ function __d_loff_t :long (ppos :long) %{ /* pure */
 
 function __file_inode:long (file:long) %{ /* pure */
     struct file *file = (struct file *)(long)THIS->file;
-    struct dentry *f_dentry = file? kread(&(file->f_dentry)) : NULL;
-    if (f_dentry == NULL)
+    struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
+    if (dentry == NULL)
         THIS->__retvalue = 0;
     else
-        THIS->__retvalue = (long)kread(&(f_dentry->d_inode));
+        THIS->__retvalue = (long)kread(&(dentry->d_inode));
     CATCH_DEREF_FAULT();
 %}
 
 function __file_id:long (file:long) %{ /* pure */
     struct file *file = (struct file *)(long)THIS->file;
-    struct dentry *f_dentry = file? kread(&(file->f_dentry)) : NULL;
-    if (f_dentry == NULL)
+    struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
+    if (dentry == NULL)
         THIS->__retvalue = 0;
     else {
-        struct inode *d_inode = kread(&(f_dentry->d_inode));
+        struct inode *d_inode = kread(&(dentry->d_inode));
         struct super_block *i_sb = kread(&(d_inode->i_sb));
         THIS->__retvalue = (long)&(i_sb->s_id);
     }
@@ -220,11 +230,11 @@ function __file_id:long (file:long) %{ /* pure */
 
 function __file_mode:long (file:long) %{ /* pure */
     struct file *file = (struct file *)(long)THIS->file;
-    struct dentry *f_dentry = file? kread(&(file->f_dentry)) : NULL;
-    if (f_dentry == NULL)
+    struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
+    if (dentry == NULL)
         THIS->__retvalue = 0;
     else {
-        struct inode *d_inode = kread(&(f_dentry->d_inode));
+        struct inode *d_inode = kread(&(dentry->d_inode));
         THIS->__retvalue = kread(&(d_inode->i_mode));
     }
     CATCH_DEREF_FAULT();
@@ -232,8 +242,8 @@ function __file_mode:long (file:long) %{ /* pure */
 
 function __file_parentname:string (file:long) %{ /* pure */
     struct file *file = (struct file *)(long)THIS->file;
-    struct dentry *f_dentry = file? kread(&(file->f_dentry)) : NULL;
-    struct dentry *d_parent = f_dentry? kread(&(f_dentry->d_parent)) : NULL;
+    struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
+    struct dentry *d_parent = dentry? kread(&(dentry->d_parent)) : NULL;
     if (d_parent == NULL)
         strlcpy(THIS->__retvalue, "NULL", MAXSTRINGLEN);
     else {
index 49f04f51fa87ad2e6281c140ec6f3126dcaac0d2..699ab17effc8a3e1780a5eff27b336a6819ed5a6 100644 (file)
@@ -1,3 +1,14 @@
+// nfs tapset
+// Copyright (C) 2006-2007 IBM Corp.
+// Copyright (C) 2007 Intel Corporation.
+// Copyright (C) 2007 Bull S.A.S
+//
+// This file is part of systemtap, and is free software.  You can
+// redistribute it and/or modify it under the terms of the GNU General
+// Public License (GPL); either version 2, or (at your option) any
+// later version.
+
+
 %{
 #include <linux/sunrpc/svc.h>
 #include <linux/nfsd/nfsd.h>
@@ -131,7 +142,7 @@ function p_long:long(cnt:long) %{ /* pure */
 probe nfsd.dispatch = kernel.function("nfsd_dispatch")?,
                       module("nfsd").function("nfsd_dispatch") ?
 {
-       client_ip = $rqstp->rq_addr->sin_addr->s_addr
+       client_ip = addr_from_rqst($rqstp)
        proto = $rqstp->rq_prot
        version = $rqstp->rq_vers
 
index 7a1c978d287cbeec0f59c85996afb21ac063ae26..d3b0606fad4fd488a0f3f6a64e20a78e87134a92 100644 (file)
@@ -1,9 +1,11 @@
-# Copyright (C) 2006 IBM Corp.
-#
-# This file is part of systemtap, and is free software.  You can
-# redistribute it and/or modify it under the terms of the GNU General
-# Public License (GPL); either version 2, or (at your option) any
-# later version.
+// rpc tapset
+// Copyright (C) 2006 IBM Corp.
+// Copyright (C) 2007 Bull S.A.S
+//
+// This file is part of systemtap, and is free software.  You can
+// redistribute it and/or modify it under the terms of the GNU General
+// Public License (GPL); either version 2, or (at your option) any
+// later version.
 
 %{
 #include <linux/kernel.h>
@@ -777,7 +779,12 @@ probe sunrpc.sched.execute.return = kernel.function("__rpc_execute").return ?,
        module("sunrpc").function("__rpc_execute").return ?
 {
        name = "sunrpc.sched.execute"
+
+%( kernel_v <= "2.6.20" %?
        retstr = returnstr($return)
+%:
+       retstr = "N/A"
+%)
 }
 
 /*
@@ -879,9 +886,17 @@ function port_from_clnt:long(clnt:long)
 %{
        struct rpc_clnt *clnt = (struct rpc_clnt *)(long)THIS->clnt;
        struct rpc_xprt *cl_xprt = clnt? kread(&(clnt->cl_xprt)) : NULL;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
+       if (cl_xprt && kread(&(cl_xprt->addr.ss_family)) == AF_INET) {
+               /* Now consider ipv4 only */
+               struct sockaddr_in *sap = (struct sockaddr_in *) &cl_xprt->addr;
+
+               THIS->__retvalue = ntohs(kread(&(sap->sin_port)));
+#else
        if (cl_xprt && kread(&(cl_xprt->addr.sin_family)) == AF_INET) {
                /* Now consider ipv4 only */
                THIS->__retvalue = ntohs(kread(&(cl_xprt->addr.sin_port)));
+#endif
        } else
                THIS->__retvalue = 0;
        CATCH_DEREF_FAULT();
@@ -926,7 +941,13 @@ function vers_from_prog:long(program:long, vers:long)
 function addr_from_rqst:long(rqstp:long)
 %{
        struct svc_rqst *rqstp = (struct svc_rqst *)(long)THIS->rqstp;
-       THIS->__retvalue = rqstp ? kread(&(rqstp->rq_addr.sin_addr.s_addr)) : 0;
+
+       if (rqstp) {
+               struct sockaddr_in *sin = (struct sockaddr_in *) &rqstp->rq_addr;
+
+               THIS->__retvalue = kread(&sin->sin_addr.s_addr);
+       } else
+               THIS->__retvalue = 0;
        CATCH_DEREF_FAULT();
 %}
 
index e10a2ed505d673914e99af4bb466abde8642e0c9..9ecce3cbd575a098d294e6182813045467eeeeb6 100644 (file)
@@ -1,3 +1,13 @@
+// vfs tapset
+// Copyright (C) 2006-2007 IBM Corp.
+// Copyright (C) 2007 Intel Corporation.
+// Copyright (C) 2007 Bull S.A.S
+//
+// This file is part of systemtap, and is free software.  You can
+// redistribute it and/or modify it under the terms of the GNU General
+// Public License (GPL); either version 2, or (at your option) any
+// later version.
+
 /* generic vfs probes */
 
 /* helper functions */
@@ -81,11 +91,11 @@ function __page_bdev:long (page:long) %{ /* pure */
 
 function __file_dev:long (file:long) %{ /* pure */
        struct file *file = (struct file *)(long)THIS->file;
-       struct dentry *f_dentry = file? kread(&(file->f_dentry)) : NULL;
-       if (f_dentry == NULL) {
+       struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
+       if (dentry == NULL) {
                THIS->__retvalue = 0;
        } else {
-               struct inode *d_inode = kread(&(f_dentry->d_inode));
+               struct inode *d_inode = kread(&(dentry->d_inode));
                struct super_block *i_sb = kread(&(d_inode->i_sb));
                THIS->__retvalue = kread(&(i_sb->s_dev));
        }
@@ -94,11 +104,11 @@ function __file_dev:long (file:long) %{ /* pure */
 
 function __file_bdev:long (file:long) %{ /* pure */
        struct file *file = (struct file *)(long)THIS->file;
-       struct dentry *f_dentry = file? kread(&(file->f_dentry)) : NULL;
-       if (f_dentry == NULL) {
+       struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
+       if (dentry == NULL) {
                THIS->__retvalue = 0;
        } else {
-               struct inode *d_inode = kread(&(f_dentry->d_inode));
+               struct inode *d_inode = kread(&(dentry->d_inode));
                struct super_block *i_sb = kread(&(d_inode->i_sb));
                THIS->__retvalue = (long)kread(&(i_sb->s_bdev));
        }
@@ -107,11 +117,11 @@ function __file_bdev:long (file:long) %{ /* pure */
 
 function __file_ino:long (file:long) %{ /* pure */
        struct file *file = (struct file *)(long)THIS->file;
-       struct dentry *f_dentry = file? kread(&(file->f_dentry)) : NULL;
-       if (f_dentry == NULL) {
+       struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
+       if (dentry == NULL) {
                THIS->__retvalue = 0;
        } else {
-               struct inode *d_inode = kread(&(f_dentry->d_inode));
+               struct inode *d_inode = kread(&(dentry->d_inode));
                THIS->__retvalue = kread(&(d_inode->i_ino));
        }
        CATCH_DEREF_FAULT();
@@ -119,11 +129,11 @@ function __file_ino:long (file:long) %{ /* pure */
 
 function __file_maxbytes:long (file:long) %{ /* pure */
        struct file *file = (struct file *)(long)THIS->file;
-       struct dentry *f_dentry = file? kread(&(file->f_dentry)) : NULL;
-       if (f_dentry == NULL) {
+       struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
+       if (dentry == NULL) {
                THIS->__retvalue = 0;
        } else {
-               struct inode *d_inode = kread(&(f_dentry->d_inode));
+               struct inode *d_inode = kread(&(dentry->d_inode));
                struct super_block *i_sb = kread(&(d_inode->i_sb));
                THIS->__retvalue = kread(&(i_sb->s_maxbytes));
        }
@@ -132,8 +142,8 @@ function __file_maxbytes:long (file:long) %{ /* pure */
 
 function __file_filename:string (file:long) %{ /* pure */
        struct file *file = (struct file *)(long)THIS->file;
-       struct dentry *f_dentry = file? kread(&(file->f_dentry)) : NULL;
-       const unsigned char *name = f_dentry? kread(&(f_dentry->d_name.name)) : NULL;
+       struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
+       const unsigned char *name = dentry? kread(&(dentry->d_name.name)) : NULL;
        if (name == NULL) {
                strlcpy(THIS->__retvalue, "NULL", MAXSTRINGLEN);
        } else {
This page took 0.041291 seconds and 5 git commands to generate.