summaryrefslogtreecommitdiffstats
path: root/tapset-utrace.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-utrace.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-utrace.cxx')
-rw-r--r--tapset-utrace.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/tapset-utrace.cxx b/tapset-utrace.cxx
index 6872c87c..c6214e70 100644
--- a/tapset-utrace.cxx
+++ b/tapset-utrace.cxx
@@ -224,7 +224,7 @@ utrace_var_expanding_visitor::visit_target_symbol_cached (target_symbol* e)
// _utrace_tvar_{name}_{num}
string aname = (string("_utrace_tvar_")
+ e->base_name.substr(1)
- + "_" + lex_cast<string>(tick++));
+ + "_" + lex_cast(tick++));
vardecl* vd = new vardecl;
vd->name = aname;
vd->tok = e->tok;
@@ -429,10 +429,10 @@ utrace_var_expanding_visitor::visit_target_symbol_arg (target_symbol* e)
{
if (i > 0)
pf->raw_components += " ";
- pf->raw_components += "$arg" + lex_cast<string>(i+1);
+ pf->raw_components += "$arg" + lex_cast(i+1);
target_symbol *tsym = new target_symbol;
tsym->tok = e->tok;
- tsym->base_name = "$arg" + lex_cast<string>(i+1);
+ tsym->base_name = "$arg" + lex_cast(i+1);
tsym->saved_conversion_error = 0;
pf->raw_components += "=%#x"; //FIXME: missing type info