summaryrefslogtreecommitdiffstats
path: root/main.cxx
diff options
context:
space:
mode:
authorjistone <jistone>2006-09-28 01:48:59 +0000
committerjistone <jistone>2006-09-28 01:48:59 +0000
commit197a4d6270c59a00030a33735865262a157edc24 (patch)
treee6dc1c31b7a8355124aaefdaea987f4590d7b65a /main.cxx
parenta0ccc04fd2b9744facb48e779d6357d3b7096ee0 (diff)
downloadsystemtap-steved-197a4d6270c59a00030a33735865262a157edc24.tar.gz
systemtap-steved-197a4d6270c59a00030a33735865262a157edc24.tar.xz
systemtap-steved-197a4d6270c59a00030a33735865262a157edc24.zip
2006-09-27 Josh Stone <joshua.i.stone@intel.com>
* session.h (struct systemtap_session): Add kernel_base_release to store the kernel version without the -NNN suffix. * main.cxx (main): Generate and use kernel_base_release. * parse.cxx (eval_pp_conditional): Use kernel_base_release. * tapsets.cxx (profile_derived_probe::profile_derived_probe): Use kernel_base_release. * tapsets.cxx (timer_builder::build): Support a wide variety of timer varients -- jiffies, s/sec, ms/msec, us/usec, ns/nsec, and hz. Use hrtimers automatically on kernels that have it. (timer_builder::register_patterns): Bind all of the new timer varients in one easy place. (register_standard_tapsets): Call timer_builder::register_patterns. (struct hrtimer_builder): Removed since timer_builder is generic. * stapprobes.5.in: Document new timer.* functionality. * tapsets.cxx (hrtimer_derived_probe_group::emit_probes): Add a shared global for the actual hrtimer resolution, _stp_hrtimer_res. (hrtimer_derived_probe_group::emit_module): Init _stp_hrtimer_res. (hrtimer_derived_probe::emit_interval): Limit intervals at a minimum to the hrtimer's actual resolution. (hrtimer_derived_probe::emit_probe_entries): Forward timers based on previous expiration instead of restarting relative. testsuite/ * buildok/fourteen.stp: Test new timer functionality.
Diffstat (limited to 'main.cxx')
-rw-r--r--main.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.cxx b/main.cxx
index 8f084024..12cca4c7 100644
--- a/main.cxx
+++ b/main.cxx
@@ -311,6 +311,8 @@ main (int argc, char * const argv [])
<< e << endl;
}
+ s.kernel_base_release.assign(s.kernel_release, 0, s.kernel_release.find('-'));
+
// arguments parsed; get down to business
@@ -366,9 +368,8 @@ main (int argc, char * const argv [])
version_suffixes.push_back ("/" + kvr + "/" + arch);
version_suffixes.push_back ("/" + kvr);
// add kernel version (2.6.NN) + arch
- string::size_type dash_index = kvr.find ('-');
- if (dash_index > 0 && dash_index != string::npos) {
- kvr.erase(dash_index);
+ if (kvr != s.kernel_base_release) {
+ kvr = s.kernel_base_release;
version_suffixes.push_back ("/" + kvr + "/" + arch);
version_suffixes.push_back ("/" + kvr);
}