summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-09-10 17:21:44 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-09-10 17:21:44 -0400
commitf76427a2bf80e4451e5e8d0c26b06aca65e4e2c4 (patch)
tree0c90ae0cf7b3c2758226feab577d6273528b2ef1 /tapsets.cxx
parente0c72583f8fb7a61d052c58b8e9c6df0925bc234 (diff)
downloadsystemtap-steved-f76427a2bf80e4451e5e8d0c26b06aca65e4e2c4.tar.gz
systemtap-steved-f76427a2bf80e4451e5e8d0c26b06aca65e4e2c4.tar.xz
systemtap-steved-f76427a2bf80e4451e5e8d0c26b06aca65e4e2c4.zip
PR6876: translator speedup for many $vars
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index 28f945fe..308cef1f 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -1090,6 +1090,7 @@ struct dwflpp
for (unsigned i=0; i<v->size(); i++)
{
+ if (pending_interrupts) return;
Dwarf_Die die = v->at(i);
int rc = (*callback)(& die, data);
if (rc != DWARF_CB_OK) break;
@@ -2659,6 +2660,7 @@ dwflpp::iterate_over_functions (int (* callback)(Dwarf_Die * func, void * arg),
{
for (cu_function_cache_t::iterator it = v->begin(); it != v->end(); it++)
{
+ if (pending_interrupts) return DWARF_CB_ABORT;
string func_name = it->first;
Dwarf_Die die = it->second;
if (function_name_matches_pattern (func_name, subkey))
@@ -4428,6 +4430,8 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e)
}
const char *diename = dwarf_diename (&result);
+ if (! diename) continue;
+
tsym->tok = e->tok;
tsym->base_name = "$";
tsym->base_name += diename;
@@ -4526,7 +4530,7 @@ dwarf_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e)
v->tok = e->tok;
fdecl->formal_args.push_back(v);
}
- q.sess.functions.push_back(fdecl);
+ q.sess.functions[fdecl->name]=fdecl;
// Synthesize a functioncall.
functioncall* n = new functioncall;
@@ -7684,7 +7688,7 @@ procfs_var_expanding_copy_visitor::visit_target_symbol (target_symbol* e)
v->tok = e->tok;
fdecl->formal_args.push_back(v);
}
- sess.functions.push_back(fdecl);
+ sess.functions[fdecl->name]=fdecl;
// Synthesize a functioncall.
functioncall* n = new functioncall;
@@ -7930,7 +7934,7 @@ mark_var_expanding_copy_visitor::visit_target_symbol_arg (target_symbol* e)
fdecl->name = fname;
fdecl->body = ec;
fdecl->type = mark_args[argnum-1]->stp_type;
- sess.functions.push_back(fdecl);
+ sess.functions[fdecl->name]=fdecl;
// Synthesize a functioncall.
functioncall* n = new functioncall;
@@ -8838,7 +8842,7 @@ perfmon_var_expanding_copy_visitor::visit_target_symbol (target_symbol *e)
fdecl->name = fname;
fdecl->body = ec;
fdecl->type = pe_long;
- sess.functions.push_back(fdecl);
+ sess.functions[fdecl->name]=fdecl;
// Synthesize a functioncall.
functioncall* n = new functioncall;