summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfche <fche>2008-02-15 19:26:48 +0000
committerfche <fche>2008-02-15 19:26:48 +0000
commit275f40a6d612f94e5272eeed772e9c9294cb8e1f (patch)
tree79bf8b7b328e87e8c30cc64e64a1bea9a6f2dca5
parenta8c9be6f3914af63a30e1566cd5895be5980b39f (diff)
downloadsystemtap-steved-275f40a6d612f94e5272eeed772e9c9294cb8e1f.tar.gz
systemtap-steved-275f40a6d612f94e5272eeed772e9c9294cb8e1f.tar.xz
systemtap-steved-275f40a6d612f94e5272eeed772e9c9294cb8e1f.zip
dwarf speedup
* tapsets.cxx (function_name_last_match): New function. (query_dwarf_func): Call it to stop unnecessary further iteration.
-rw-r--r--ChangeLog5
-rw-r--r--tapsets.cxx10
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 89eb1c7f..5da56d49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-15 Frank Ch. Eigler <fche@elastic.org>
+
+ * tapsets.cxx (function_name_last_match): New function.
+ (query_dwarf_func): Call it to stop unnecessary further iteration.
+
2008-02-13 Frank Ch. Eigler <fche@elastic.org>
PR 5759
diff --git a/tapsets.cxx b/tapsets.cxx
index 66fb8bde..4ff53e6f 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -660,6 +660,10 @@ struct dwflpp
<< "function '" << function_name << "'" << "\n";
return t;
}
+ bool function_name_final_match(string pattern)
+ {
+ return module_name_final_match (pattern);
+ }
bool cu_name_matches(string pattern)
@@ -2887,6 +2891,9 @@ query_dwarf_func (Dwarf_Die * func, void * arg)
clog << "checking instances of inline " << q->dw.function_name
<< "\n";
q->dw.iterate_over_inline_instances (query_dwarf_inline_instance, arg);
+
+ if (q->dw.function_name_final_match (q->function))
+ return DWARF_CB_ABORT;
}
else if (!q->dw.func_is_inline () && (! q->has_inline))
{
@@ -2923,6 +2930,9 @@ query_dwarf_func (Dwarf_Die * func, void * arg)
q->dw.function_file (&func.decl_file);
q->dw.function_line (&func.decl_line);
q->filtered_functions[entrypc] = func;
+
+ if (q->dw.function_name_final_match (q->function))
+ return DWARF_CB_ABORT;
}
else
throw semantic_error("no entrypc found for function '"