summaryrefslogtreecommitdiffstats
path: root/tapset-timers.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-09-02 16:14:08 -0700
committerJosh Stone <jistone@redhat.com>2009-09-02 16:14:08 -0700
commitaca66a36681ac7cbf7fcc2eac4dafc83d6559ef9 (patch)
tree0e8f39ae14f5793b37b0565c4a17811b696c9f9b /tapset-timers.cxx
parentd185503c723ded087ff987e8fa08c2418e60006b (diff)
downloadsystemtap-steved-aca66a36681ac7cbf7fcc2eac4dafc83d6559ef9.tar.gz
systemtap-steved-aca66a36681ac7cbf7fcc2eac4dafc83d6559ef9.tar.xz
systemtap-steved-aca66a36681ac7cbf7fcc2eac4dafc83d6559ef9.zip
Unify lex_cast* and avoid string copies
We always use lex_cast either to string or from string, so I made that explicit, and got rid of some string copies in the process. There was also stringify(), which was redundant to lex_cast<string>. We also always used lex_cast_hex to string, so that's now hard-coded and again eliminated a string copy. For lex_cast_qstring<string>, there's no need to write the streamify the input, so a specialization now operates directly on the input. Hopefully this is a bit cleaner, and I do measure it to be a little faster on scripts with many probes.
Diffstat (limited to 'tapset-timers.cxx')
-rw-r--r--tapset-timers.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/tapset-timers.cxx b/tapset-timers.cxx
index 565a54e8..16dcefcb 100644
--- a/tapset-timers.cxx
+++ b/tapset-timers.cxx
@@ -193,10 +193,10 @@ struct hrtimer_derived_probe: public derived_probe
{
if ((i < min_ns_interval) || (i > max_ns_interval))
throw semantic_error(string("interval value out of range (")
- + lex_cast<string>(scale < min_ns_interval
+ + lex_cast(scale < min_ns_interval
? min_ns_interval/scale : 1)
+ ","
- + lex_cast<string>(max_ns_interval/scale) + ")");
+ + lex_cast(max_ns_interval/scale) + ")");
// randomize = 0 means no randomization
if ((r < 0) || (r > i))