* tapset corrections
@ 2007-02-13 12:01 Pierre Peiffer
2007-02-13 16:59 ` Frank Ch. Eigler
0 siblings, 1 reply; 3+ messages in thread
From: Pierre Peiffer @ 2007-02-13 12:01 UTC (permalink / raw)
To: systemtap; +Cc: Jean-Pierre Dion
[-- Attachment #1: Type: text/plain, Size: 547 bytes --]
Hi,
I'm currently discovering systemtap. When running the testsuite, I've found that
some tapset need some updates in order to run correctly with recent kernels
(2.6.19 or 2.6.20)
I've done some minor corrections, but I don't know exactly where I should post
them, so I attach a patch here, to this mail. It should apply on recent cvs tree.
Let me know if I need to proceed in another way.
There are two small things corrected:
1. redefinition of f_dentry in "struct file"
2. change of structure "struct rpc_xprt"
Thanks,
--
Pierre P.
[-- Attachment #2: fixup_kernel_2620.patch --]
[-- Type: text/x-patch, Size: 10491 bytes --]
Signed-off-by: Pierre Peiffer <Pierre.Peiffer@bull.net>
---
tapset/LKET/nfs.stp | 4 !!!!
tapset/nfs.stp | 22 !!!!!!!!!!!!!!!!!!!!!!
tapset/rpc.stp | 8 ++++++++
tapset/vfs.stp | 28 !!!!!!!!!!!!!!!!!!!!!!!!!!!!
4 files changed, 8 insertions(+), 54 modifications(!)
Index: src/tapset/LKET/nfs.stp
===================================================================
*** src.orig/tapset/LKET/nfs.stp 2007-02-09 08:31:48.000000000 +0100
--- src/tapset/LKET/nfs.stp 2007-02-09 17:09:21.000000000 +0100
***************
*** 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;
if (d_inode == NULL)
strlcpy(THIS->__retvalue, "NULL", MAXSTRINGLEN);
else {
--- 1,8 ----
/* Helper functions */
function __file_fsname:string (file:long) %{ /* pure */
struct file *file = (struct file *)(long)THIS->file;
! 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: src/tapset/nfs.stp
===================================================================
*** src.orig/tapset/nfs.stp 2007-02-09 08:31:49.000000000 +0100
--- src/tapset/nfs.stp 2007-02-09 16:58:19.000000000 +0100
*************** function __d_loff_t :long (ppos :long) %
*** 197,217 ****
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)
THIS->__retvalue = 0;
else
! THIS->__retvalue = (long)kread(&(f_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)
THIS->__retvalue = 0;
else {
! struct inode *d_inode = kread(&(f_dentry->d_inode));
struct super_block *i_sb = kread(&(d_inode->i_sb));
THIS->__retvalue = (long)&(i_sb->s_id);
}
--- 197,217 ----
function __file_inode:long (file:long) %{ /* pure */
struct file *file = (struct file *)(long)THIS->file;
! struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
! if (dentry == NULL)
THIS->__retvalue = 0;
else
! 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 *dentry = file? kread(&(file->f_dentry)) : NULL;
! if (dentry == NULL)
THIS->__retvalue = 0;
else {
! 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);
}
*************** function __file_id:long (file:long) %{ /
*** 220,230 ****
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)
THIS->__retvalue = 0;
else {
! struct inode *d_inode = kread(&(f_dentry->d_inode));
THIS->__retvalue = kread(&(d_inode->i_mode));
}
CATCH_DEREF_FAULT();
--- 220,230 ----
function __file_mode:long (file:long) %{ /* pure */
struct file *file = (struct file *)(long)THIS->file;
! struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
! if (dentry == NULL)
THIS->__retvalue = 0;
else {
! struct inode *d_inode = kread(&(dentry->d_inode));
THIS->__retvalue = kread(&(d_inode->i_mode));
}
CATCH_DEREF_FAULT();
*************** function __file_mode:long (file:long) %{
*** 232,239 ****
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;
if (d_parent == NULL)
strlcpy(THIS->__retvalue, "NULL", MAXSTRINGLEN);
else {
--- 232,239 ----
function __file_parentname:string (file:long) %{ /* pure */
struct file *file = (struct file *)(long)THIS->file;
! 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: src/tapset/rpc.stp
===================================================================
*** src.orig/tapset/rpc.stp 2007-02-09 08:31:49.000000000 +0100
--- src/tapset/rpc.stp 2007-02-12 13:11:51.000000000 +0100
*************** function port_from_clnt:long(clnt:long)
*** 879,887 ****
--- 879,895 ----
%{
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();
Index: src/tapset/vfs.stp
===================================================================
*** src.orig/tapset/vfs.stp 2007-02-09 08:31:50.000000000 +0100
--- src/tapset/vfs.stp 2007-02-09 16:52:34.000000000 +0100
*************** function __page_bdev:long (page:long) %{
*** 81,91 ****
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) {
THIS->__retvalue = 0;
} else {
! struct inode *d_inode = kread(&(f_dentry->d_inode));
struct super_block *i_sb = kread(&(d_inode->i_sb));
THIS->__retvalue = kread(&(i_sb->s_dev));
}
--- 81,91 ----
function __file_dev:long (file:long) %{ /* pure */
struct file *file = (struct file *)(long)THIS->file;
! struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
! if (dentry == NULL) {
THIS->__retvalue = 0;
} else {
! 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));
}
*************** function __file_dev:long (file:long) %{
*** 94,104 ****
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) {
THIS->__retvalue = 0;
} else {
! struct inode *d_inode = kread(&(f_dentry->d_inode));
struct super_block *i_sb = kread(&(d_inode->i_sb));
THIS->__retvalue = (long)kread(&(i_sb->s_bdev));
}
--- 94,104 ----
function __file_bdev:long (file:long) %{ /* pure */
struct file *file = (struct file *)(long)THIS->file;
! struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
! if (dentry == NULL) {
THIS->__retvalue = 0;
} else {
! 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));
}
*************** function __file_bdev:long (file:long) %{
*** 107,117 ****
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) {
THIS->__retvalue = 0;
} else {
! struct inode *d_inode = kread(&(f_dentry->d_inode));
THIS->__retvalue = kread(&(d_inode->i_ino));
}
CATCH_DEREF_FAULT();
--- 107,117 ----
function __file_ino:long (file:long) %{ /* pure */
struct file *file = (struct file *)(long)THIS->file;
! struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
! if (dentry == NULL) {
THIS->__retvalue = 0;
} else {
! struct inode *d_inode = kread(&(dentry->d_inode));
THIS->__retvalue = kread(&(d_inode->i_ino));
}
CATCH_DEREF_FAULT();
*************** function __file_ino:long (file:long) %{
*** 119,129 ****
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) {
THIS->__retvalue = 0;
} else {
! struct inode *d_inode = kread(&(f_dentry->d_inode));
struct super_block *i_sb = kread(&(d_inode->i_sb));
THIS->__retvalue = kread(&(i_sb->s_maxbytes));
}
--- 119,129 ----
function __file_maxbytes:long (file:long) %{ /* pure */
struct file *file = (struct file *)(long)THIS->file;
! struct dentry *dentry = file? kread(&(file->f_dentry)) : NULL;
! if (dentry == NULL) {
THIS->__retvalue = 0;
} else {
! 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));
}
*************** function __file_maxbytes:long (file:long
*** 132,139 ****
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;
if (name == NULL) {
strlcpy(THIS->__retvalue, "NULL", MAXSTRINGLEN);
} else {
--- 132,139 ----
function __file_filename:string (file:long) %{ /* pure */
struct file *file = (struct file *)(long)THIS->file;
! 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 {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: tapset corrections
2007-02-13 12:01 tapset corrections Pierre Peiffer
@ 2007-02-13 16:59 ` Frank Ch. Eigler
2007-02-15 14:36 ` tapset + testsuite corrections Pierre Peiffer
0 siblings, 1 reply; 3+ messages in thread
From: Frank Ch. Eigler @ 2007-02-13 16:59 UTC (permalink / raw)
To: Pierre Peiffer; +Cc: systemtap, Jean-Pierre Dion
Pierre Peiffer <pierre.peiffer@bull.net> writes:
> I'm currently discovering systemtap. When running the testsuite,
> I've found that some tapset need some updates in order to run
> correctly with recent kernels (2.6.19 or 2.6.20)
Since we have some interest in keeping tapsets working with older
kernels, we generally need to use kernel version-sensitive
#if/#else/#endif conditional compilation in embedded-C code. (An
analogous %( %? %: %) construct exists for script code, and is
documented in the man pages.)
> I've done some minor corrections, but I don't know exactly where I
> should post them, so I attach a patch here, to this mail. [...]
That is fine. Please also see src/HACKING for additional guidelines,
such as designation of a copyright holder for your changes.
- FChE
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: tapset + testsuite corrections
2007-02-13 16:59 ` Frank Ch. Eigler
@ 2007-02-15 14:36 ` Pierre Peiffer
0 siblings, 0 replies; 3+ messages in thread
From: Pierre Peiffer @ 2007-02-15 14:36 UTC (permalink / raw)
To: Frank Ch. Eigler; +Cc: systemtap, Jean-Pierre Dion
[-- Attachment #1: Type: text/plain, Size: 1175 bytes --]
Frank Ch. Eigler a écrit :
>
> Since we have some interest in keeping tapsets working with older
> kernels, we generally need to use kernel version-sensitive
> #if/#else/#endif conditional compilation in embedded-C code.
Yes, I had it in mind and took care of this where it was needed.
So normally, it should work for both old and new kernels.
> (An
> analogous %( %? %: %) construct exists for script code, and is
> documented in the man pages.)
Thanks for the tip, I did not discover this yet.
>
> That is fine. Please also see src/HACKING for additional guidelines,
> such as designation of a copyright holder for your changes.
Ok, thanks.
I've attached the same patch, with updates, and unified style this time.
Here is the Changelog:
* tapset/LKET/nfs.stp, tapset/nfs.stp, tapset/vfs.stp: local variables
f_dentry renamed, because conflicting with a new #define in kernel
header linux/fs.h in 2.6.20.
* tapset/rpc.stp: struct rpc_xprt modified since kernel 2.6.19.
* testsuite/buildok/twenty.stp: updated with new struct file since
kernel 2.6.20
* testsuite/semok/seventeen.stp: updated with new function name
since kernel 2.6.19
--
Pierre Peiffer
[-- Attachment #2: fixup_kernel_2620.patch --]
[-- Type: text/x-patch, Size: 9919 bytes --]
---
tapset/ChangeLog | 7 +++++++
tapset/LKET/nfs.stp | 4 ++--
tapset/nfs.stp | 22 +++++++++++-----------
tapset/rpc.stp | 8 ++++++++
tapset/vfs.stp | 28 ++++++++++++++--------------
testsuite/ChangeLog | 7 +++++++
testsuite/buildok/twenty.stp | 4 ++++
testsuite/semok/seventeen.stp | 3 ++-
8 files changed, 55 insertions(+), 28 deletions(-)
Index: src/tapset/LKET/nfs.stp
===================================================================
--- src.orig/tapset/LKET/nfs.stp 2007-02-15 13:10:23.000000000 +0100
+++ src/tapset/LKET/nfs.stp 2007-02-15 13:14:35.000000000 +0100
@@ -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: src/tapset/nfs.stp
===================================================================
--- src.orig/tapset/nfs.stp 2007-02-15 13:10:24.000000000 +0100
+++ src/tapset/nfs.stp 2007-02-15 13:14:35.000000000 +0100
@@ -197,21 +197,21 @@ function __d_loff_t :long (ppos :long) %
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 +220,11 @@ function __file_id:long (file:long) %{ /
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 +232,8 @@ function __file_mode:long (file:long) %{
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: src/tapset/rpc.stp
===================================================================
--- src.orig/tapset/rpc.stp 2007-02-15 13:10:25.000000000 +0100
+++ src/tapset/rpc.stp 2007-02-15 13:14:35.000000000 +0100
@@ -879,9 +879,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();
Index: src/tapset/vfs.stp
===================================================================
--- src.orig/tapset/vfs.stp 2007-02-15 13:10:25.000000000 +0100
+++ src/tapset/vfs.stp 2007-02-15 13:14:35.000000000 +0100
@@ -81,11 +81,11 @@ function __page_bdev:long (page:long) %{
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 +94,11 @@ function __file_dev:long (file:long) %{
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 +107,11 @@ function __file_bdev:long (file:long) %{
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 +119,11 @@ function __file_ino:long (file:long) %{
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 +132,8 @@ function __file_maxbytes:long (file:long
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 {
Index: src/testsuite/buildok/twenty.stp
===================================================================
--- src.orig/testsuite/buildok/twenty.stp 2007-02-15 13:10:31.000000000 +0100
+++ src/testsuite/buildok/twenty.stp 2007-02-15 14:01:49.000000000 +0100
@@ -4,5 +4,9 @@
probe kernel.function("vfs_readdir")
{
+%( kernel_v >= "2.6.20" %?
+ $file->f_path->dentry->d_name->len = 1
+%:
$file->f_dentry->d_name->len = 1
+%)
}
Index: src/testsuite/semok/seventeen.stp
===================================================================
--- src.orig/testsuite/semok/seventeen.stp 2007-02-15 13:10:41.000000000 +0100
+++ src/testsuite/semok/seventeen.stp 2007-02-15 14:41:57.000000000 +0100
@@ -1,7 +1,8 @@
#! stap -p2
global foo
-probe kernel.function("pipe_writev")
+probe kernel.function(
+%( kernel_v < "2.6.19" %? "pipe_writev" %: "pipe_write" %) )
{
a = $nr_segs
foo [a] = 1
Index: src/tapset/ChangeLog
===================================================================
--- src.orig/tapset/ChangeLog 2007-02-15 13:10:23.000000000 +0100
+++ src/tapset/ChangeLog 2007-02-15 15:26:47.000000000 +0100
@@ -1,3 +1,10 @@
+2007-02-15 Pierre Peiffer <pierre.peiffer@bull.net>
+
+ * LKET/nfs.stp, nfs.stp, vfs.stp: rename local variables f_dentry:
+ to dentry, because conflicting with a new #define in kernel
+ header linux/fs.h in 2.6.20.
+ * rpc.stp: Fix use of struct rpc_xprt: modified since kernel 2.6.19.
+
2007-02-09 Frank Ch. Eigler <fche@elastic.org>
* conversions.stp (*): Make errmsg usage uniform.
Index: src/testsuite/ChangeLog
===================================================================
--- src.orig/testsuite/ChangeLog 2007-02-15 13:10:29.000000000 +0100
+++ src/testsuite/ChangeLog 2007-02-15 15:27:47.000000000 +0100
@@ -1,3 +1,10 @@
+2007-02-15 Pierre Peiffer <pierre.peiffer@bull.net>
+
+ * buildok/twenty.stp: updated with new struct file since
+ kernel 2.6.20
+ * semok/seventeen.stp: updated with new function name
+ since kernel 2.6.19
+
2007-02-09 Frank Ch. Eigler <fche@elastic.org>
* systemtap.base/prologue.*: New test case.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-15 14:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-13 12:01 tapset corrections Pierre Peiffer
2007-02-13 16:59 ` Frank Ch. Eigler
2007-02-15 14:36 ` tapset + testsuite corrections Pierre Peiffer
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).