Problems using the older relay interface

David Wilder dwilder@us.ibm.com
Fri Sep 7 16:15:00 GMT 2007


 Hi-
I have a problem with a client trying to get stap working on 2.6.16 
kernel.  The problem is related to the use of the old relayfs interface 
in the kernel.   These are the areas where I ran into trouble, please 
comment on my purposed changes.

1) Relay changed sometime in the 2.6.16 time frame from relayfs to 
relay.  runtime.h assumes that all 2.6.16 kernels use the new relay 
code. Unfortunately this was not the case.  The 2.6.16 based kernel my 
client was running was still using the old relay_fs code.  Purposed 
change :

to--- runtime.h.orig      2007-09-07 08:32:55.000000000 -0700
+++ runtime.h   2007-09-07 08:35:14.000000000 -0700
@@ -30,7 +30,7 @@
 #include <linux/compat.h>
 #include <linux/mm.h>
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
+#if defined (CONFIG_RELAYFS) || defined (CONFIG_RELAYFS_MODULE)
 #if !defined (CONFIG_DEBUG_FS)  && !defined (CONFIG_DEBUG_FS_MODULE)
 #error "DebugFS is required and was not found in the kernel."
 #endif

#if defined (CONFIG_RELAYFS_FS) || defined (CONFIG_RELAYFS_FS_MODULE)

2)  The same problem exists in staprun.  Stap run uses the kernel 
version not the existence of relay vs relayfs to determine where to look 
for its relay files.  We could check /proc/filesystems for the entries 
debugfs or relayfs, but I not sure how to handle the case of relayFS or 
debugFS being built as a module.  Any ideas?

3) I also had to make the following changes to  
/src/runtime/transport/relayfs.c to get the stap modules to build.    

-------------- next part --------------
A non-text attachment was scrubbed...
Name: relayfs.diff
Type: text/x-patch
Size: 1287 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20070907/e7f69d84/attachment.bin>


More information about the Systemtap mailing list