diff options
author | jistone <jistone> | 2006-06-01 17:05:57 +0000 |
---|---|---|
committer | jistone <jistone> | 2006-06-01 17:05:57 +0000 |
commit | ffb0b3adb38e4d1fdf7c09b9b70ae7baa9ea71b5 (patch) | |
tree | 9f8635d392053cdb42810b0307b6d008ac9f535a /tapsets.cxx | |
parent | f73723169cbb753d04e66acf697c72adc20c6ee0 (diff) | |
download | systemtap-steved-ffb0b3adb38e4d1fdf7c09b9b70ae7baa9ea71b5.tar.gz systemtap-steved-ffb0b3adb38e4d1fdf7c09b9b70ae7baa9ea71b5.tar.xz systemtap-steved-ffb0b3adb38e4d1fdf7c09b9b70ae7baa9ea71b5.zip |
2006-06-01 Josh Stone <joshua.i.stone@intel.com>
* tapsets.cxx (hrtimer_derived_probe::emit_interval): update
API usage of hrtimers in preparation of getting exports from
the kernel.
(hrtimer_derived_probe::emit_probe_entries): ditto
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index e87683f4..048243bb 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -3953,7 +3953,7 @@ void hrtimer_derived_probe::emit_interval (translator_output* o) { o->line() << "({"; - o->newline(1) << "DEFINE_KTIME(kt);"; + o->newline(1) << "unsigned long nsecs;"; o->newline() << "int64_t i = " << interval << "LL;"; if (randomize != 0) { @@ -3967,7 +3967,8 @@ hrtimer_derived_probe::emit_interval (translator_output* o) o->newline(1) << "i = " << min_ns_interval << "LL;"; o->indent(-1); } - o->newline() << "ktime_add_ns(kt, i);"; + o->newline() << "nsecs = do_div(i, NSEC_PER_SEC);"; + o->newline() << "ktime_set(i, nsecs);"; o->newline(-1) << "})"; } @@ -4005,9 +4006,9 @@ hrtimer_derived_probe::emit_probe_entries (translator_output* o) o->newline() << "(void) data;"; - o->newline() << "hrtimer_forward (& timer_" << name << ", "; + o->newline() << "hrtimer_start (& timer_" << name << ", "; emit_interval(o); - o->line() << ");"; + o->line() << ", HRTIMER_REL);"; // NB: locals are initialized by probe function itself o->newline() << name << " (c);"; |