summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-08-28 14:44:06 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-08-28 14:44:06 -0400
commit30f926f0b0a198dd416ea735353e852a7ee79d69 (patch)
tree7c924e8de6a9a38ee904d9793f0bafffc00b8d85 /runtime
parentfb84c077272764f8cb000e9b02572fb7c9cac24f (diff)
parent84f00e279d98edba986225386c7183db3c5968b0 (diff)
downloadsystemtap-steved-30f926f0b0a198dd416ea735353e852a7ee79d69.tar.gz
systemtap-steved-30f926f0b0a198dd416ea735353e852a7ee79d69.tar.xz
systemtap-steved-30f926f0b0a198dd416ea735353e852a7ee79d69.zip
Merge commit 'origin/master' into pr4225
* commit 'origin/master': PR5686: correct regression in semok/optimize.stp trailing whitespace removal, as approved by emacs fix global-var array index rendering fix NEWS to refer to simpler context.stp tapset functions in auto-printing blurb Document written but unread global variable automatic display. 2nd try initial Make _get_sock_addr return correct address in kernel before 2.6.16. Automatically print written but unread globals Make nodwf test passed when CONFIG_QUOTACTL unset Uses STAPCONF_DPATH_PATH instead of a kernel version check. Simplified "rpm" target a bit. Moved tar archive creation step from "rpm" target to "dist-gzip" target. remove support for "make dist" since git-archive does as well; Examples html files moved into subdir. 2008-08-25 David Smith <dsmith@redhat.com> ChangeLog Entries Robustness improvements for the stap client/server
Diffstat (limited to 'runtime')
-rw-r--r--runtime/ChangeLog10
-rw-r--r--runtime/autoconf-dpath-path.c7
-rw-r--r--runtime/task_finder.c20
3 files changed, 27 insertions, 10 deletions
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 146ce06f..b8a0ae7f 100644
--- a/runtime/task_finder.c
+++ b/runtime/task_finder.c
@@ -336,11 +336,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 {
@@ -731,12 +731,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) {
@@ -865,11 +865,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);