diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | buildrun.cxx | 1 | ||||
-rw-r--r-- | runtime/ChangeLog | 10 | ||||
-rw-r--r-- | runtime/autoconf-dpath-path.c | 7 | ||||
-rw-r--r-- | runtime/task_finder.c | 20 |
5 files changed, 30 insertions, 10 deletions
@@ -1,5 +1,7 @@ 2008-08-26 David Smith <dsmith@redhat.com> + * buildrun.cxx (compile_pass): Added autoconf-dpath-path.c. + * Makefile.am: Simplified "rpm" target a bit. * Makefile.in: Regenerated. diff --git a/buildrun.cxx b/buildrun.cxx index a265e4db..6b2b779d 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -110,6 +110,7 @@ compile_pass (systemtap_session& s) o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-real-parent.c, -DSTAPCONF_REAL_PARENT,)" << endl; o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-uaccess.c, -DSTAPCONF_LINUX_UACCESS_H,)" << endl; o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-oneachcpu-retry.c, -DSTAPCONF_ONEACHCPU_RETRY,)" << endl; + o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-dpath-path.c, -DSTAPCONF_DPATH_PATH,)" << endl; #if 0 /* NB: For now, the performance hit of probe_kernel_read/write (vs. our * homegrown safe-access functions) is deemed undesireable, so we'll skip diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 3e1e400a..926e05d9 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,13 @@ +2008-08-26 David Smith <dsmith@redhat.com> + + * autoconf-d_path-path.c: New file. + + * task_finder.c (__stp_get_mm_path): Uses STAPCONF_DPATH_PATH + instead of a kernel version check to determine how to call + d_path(). + (__stp_utrace_task_finder_target_quiesce): Ditto. + (__stp_target_call_vm_callback): Ditto. + 2008-08-21 David Smith <dsmith@redhat.com> * task_finder.c (__stp_tf_vm_cb): Added task finder target diff --git a/runtime/autoconf-dpath-path.c b/runtime/autoconf-dpath-path.c new file mode 100644 index 00000000..c3654604 --- /dev/null +++ b/runtime/autoconf-dpath-path.c @@ -0,0 +1,7 @@ +#include <linux/path.h> +#include <linux/dcache.h> + +void ____autoconf_func(struct path *p) +{ + (void)d_path(p, NULL, 0); +} diff --git a/runtime/task_finder.c b/runtime/task_finder.c index d81ad115..af2345be 100644 --- a/runtime/task_finder.c +++ b/runtime/task_finder.c @@ -326,11 +326,11 @@ __stp_get_mm_path(struct mm_struct *mm, char *buf, int buflen) vma = vma->vm_next; } if (vma) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) +#ifdef STAPCONF_DPATH_PATH + rc = d_path(&(vma->vm_file->f_path), buf, buflen); +#else rc = d_path(vma->vm_file->f_dentry, vma->vm_file->f_vfsmnt, buf, buflen); -#else - rc = d_path(&(vma->vm_file->f_path), buf, buflen); #endif } else { @@ -721,12 +721,12 @@ __stp_utrace_task_finder_target_quiesce(enum utrace_resume_action action, vma = mm->mmap; while (vma) { if (vma->vm_file) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) - mmpath = d_path(vma->vm_file->f_dentry, - vma->vm_file->f_vfsmnt, +#ifdef STAPCONF_DPATH_PATH + mmpath = d_path(&(vma->vm_file->f_path), mmpath_buf, PATH_MAX); #else - mmpath = d_path(&(vma->vm_file->f_path), + mmpath = d_path(vma->vm_file->f_dentry, + vma->vm_file->f_vfsmnt, mmpath_buf, PATH_MAX); #endif if (mmpath) { @@ -855,11 +855,11 @@ __stp_target_call_vm_callback(struct stap_task_finder_target *tgt, } // Grab the path associated with this vma. -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) +#ifdef STAPCONF_DPATH_PATH + mmpath = d_path(&(vma->vm_file->f_path), mmpath_buf, PATH_MAX); +#else mmpath = d_path(vma->vm_file->f_dentry, vma->vm_file->f_vfsmnt, mmpath_buf, PATH_MAX); -#else - mmpath = d_path(&(vma->vm_file->f_path), mmpath_buf, PATH_MAX); #endif if (mmpath == NULL || IS_ERR(mmpath)) { rc = -PTR_ERR(mmpath); |