diff options
author | Josh Stone <jistone@redhat.com> | 2009-09-15 18:15:20 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-09-15 18:21:45 -0700 |
commit | f09d0d1e7fd437f6a3b8c21e4817de8af458c888 (patch) | |
tree | 9acb76295bb47dfbab153b5bb92a2b92de839de8 /tapsets.cxx | |
parent | da23eceb71cc70668ab9dfd80d318b3837703d9d (diff) | |
download | systemtap-steved-f09d0d1e7fd437f6a3b8c21e4817de8af458c888.tar.gz systemtap-steved-f09d0d1e7fd437f6a3b8c21e4817de8af458c888.tar.xz systemtap-steved-f09d0d1e7fd437f6a3b8c21e4817de8af458c888.zip |
Remove function comparison from label iteration
We already have filtered functions and inlines, so just iterate in each
of those to look for labels.
* dwflpp.cxx (dwflpp::iterate_over_labels): Assume that the die we're
looking at is already a matching function, and don't descend into
inlined functions in this body.
* tapsets.cxx (query_srcfile_label): Iterate through inlines too.
(query_cu): Iterate over functions and inlines instead of the CU.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r-- | tapsets.cxx | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/tapsets.cxx b/tapsets.cxx index f5be7a4e..977a92fa 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -1207,8 +1207,14 @@ query_srcfile_label (const dwarf_line_t& line, void * arg) for (func_info_map_t::iterator i = q->filtered_functions.begin(); i != q->filtered_functions.end(); ++i) if (q->dw.die_has_pc (i->die, addr)) - q->dw.iterate_over_labels (&i->die, q->label_val, q->function, - q, query_label, i->name); + q->dw.iterate_over_labels (&i->die, q->label_val, i->name, + q, query_label); + + for (inline_instance_map_t::iterator i = q->filtered_inlines.begin(); + i != q->filtered_inlines.end(); ++i) + if (q->dw.die_has_pc (i->die, addr)) + q->dw.iterate_over_labels (&i->die, q->label_val, i->name, + q, query_label); } static void @@ -1503,8 +1509,17 @@ query_cu (Dwarf_Die * cudie, void * arg) if (q->has_label) { if (q->line[0] == 0) // No line number specified - q->dw.iterate_over_labels (q->dw.cu, q->label_val, q->function, - q, query_label, ""); + { + for (func_info_map_t::iterator i = q->filtered_functions.begin(); + i != q->filtered_functions.end(); ++i) + q->dw.iterate_over_labels (&i->die, q->label_val, i->name, + q, query_label); + + for (inline_instance_map_t::iterator i = q->filtered_inlines.begin(); + i != q->filtered_inlines.end(); ++i) + q->dw.iterate_over_labels (&i->die, q->label_val, i->name, + q, query_label); + } else for (set<string>::const_iterator i = q->filtered_srcfiles.begin(); i != q->filtered_srcfiles.end(); ++i) |