summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Stone <joshua.i.stone@intel.com>2008-10-24 12:32:36 -0700
committerJosh Stone <joshua.i.stone@intel.com>2008-10-24 12:32:36 -0700
commitf7674e54ccb92a1b99af6e930bab75560ff2dfd7 (patch)
tree2f6d1767c07521d7a3086c920e472dff8604cd33
parent2237d27b8146dd25a65e833a5117318c7502a5e9 (diff)
downloadsystemtap-steved-f7674e54ccb92a1b99af6e930bab75560ff2dfd7.tar.gz
systemtap-steved-f7674e54ccb92a1b99af6e930bab75560ff2dfd7.tar.xz
systemtap-steved-f7674e54ccb92a1b99af6e930bab75560ff2dfd7.zip
Fix hrtimer.expires name change.
The field is renamed to _expires starting in 2.6.28-rc1, and it's not meant to be directly manipulated. Instead hrtimer users are supposed to use hrtimer_get_expires and hrtimer_set_expires.
-rw-r--r--ChangeLog8
-rw-r--r--buildrun.cxx1
-rw-r--r--runtime/ChangeLog4
-rw-r--r--runtime/autoconf-hrtimer-getset-expires.c6
-rw-r--r--tapsets.cxx11
5 files changed, 27 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1f995a2c..87688620 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-10-24 Josh Stone <joshua.i.stone@intel.com>
+
+ * tapsets.cxx (hrtimer_derived_probe_group::emit_module_decls): Support
+ the new abstractions around the hrtimer expires field. The field is
+ renamed starting in 2.6.28-rc1, but accessor functions are provided for
+ general access.
+ * buildrun.cxx (compile_pass): Added autoconf-hrtimer-getset-expires.c
+
2008-10-24 Jim Keniston <jkenisto@us.ibm.com>
PR6946
diff --git a/buildrun.cxx b/buildrun.cxx
index 8ec731df..5f31303b 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -100,6 +100,7 @@ compile_pass (systemtap_session& s)
o << module_cflags << " += -Iinclude2/asm/mach-default" << endl;
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-hrtimer-rel.c, -DSTAPCONF_HRTIMER_REL,)" << endl;
+ o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-hrtimer-getset-expires.c, -DSTAPCONF_HRTIMER_GETSET_EXPIRES,)" << endl;
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-inode-private.c, -DSTAPCONF_INODE_PRIVATE,)" << endl;
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-constant-tsc.c, -DSTAPCONF_CONSTANT_TSC,)" << endl;
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-tsc-khz.c, -DSTAPCONF_TSC_KHZ,)" << endl;
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 8aea0411..62ecbec6 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,7 @@
+2008-10-24 Josh Stone <joshua.i.stone@intel.com>
+
+ * autoconf-hrtimer-getset-expires.c: New file.
+
2008-10-17 Wenji Huang <wenji.huang@oracle.com>
* task_finder_vma.c (__stp_tf_vma_get_free_entry): Initialize entry.
diff --git a/runtime/autoconf-hrtimer-getset-expires.c b/runtime/autoconf-hrtimer-getset-expires.c
new file mode 100644
index 00000000..951cb99b
--- /dev/null
+++ b/runtime/autoconf-hrtimer-getset-expires.c
@@ -0,0 +1,6 @@
+#include <linux/hrtimer.h>
+
+void ____autoconf_func(struct hrtimer *t)
+{
+ hrtimer_set_expires(t, hrtimer_get_expires(t));
+}
diff --git a/tapsets.cxx b/tapsets.cxx
index a5cde7ce..d71b2367 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -8729,10 +8729,15 @@ hrtimer_derived_probe_group::emit_module_decls (systemtap_session& s)
s.op->newline() << "if ((atomic_read (&session_state) == STAP_SESSION_STARTING) ||";
s.op->newline() << " (atomic_read (&session_state) == STAP_SESSION_RUNNING)) {";
// Compute next trigger time
- s.op->newline(1) << "timer->expires = ktime_add (timer->expires,";
+ s.op->newline(1) << "#ifdef STAPCONF_HRTIMER_GETSET_EXPIRES";
+ s.op->newline() << "hrtimer_set_expires(timer, ktime_add (hrtimer_get_expires(timer),";
+ s.op->newline() << "#else";
+ s.op->newline() << "timer->expires = (ktime_add (timer->expires,";
+ s.op->newline() << "#endif";
+ s.op->newline(1);
emit_interval (s.op);
- s.op->line() << ");";
- s.op->newline() << "rc = HRTIMER_RESTART;";
+ s.op->line() << "));";
+ s.op->newline(-1) << "rc = HRTIMER_RESTART;";
s.op->newline(-1) << "}";
s.op->newline() << "{";
s.op->indent(1);