summaryrefslogtreecommitdiffstats
path: root/runtime/task_finder_map.c
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-09-10 17:06:11 -0700
committerJosh Stone <jistone@redhat.com>2009-09-10 17:06:11 -0700
commit729455a739d4755269f20b73d2db231db2a1fdd7 (patch)
tree8b09cc7f762877b2daa4cb2c436a67a283e8e9cd /runtime/task_finder_map.c
parentc9efa5c99498ccb3d2f0f87bc373da7dfd1cc067 (diff)
downloadsystemtap-steved-729455a739d4755269f20b73d2db231db2a1fdd7.tar.gz
systemtap-steved-729455a739d4755269f20b73d2db231db2a1fdd7.tar.xz
systemtap-steved-729455a739d4755269f20b73d2db231db2a1fdd7.zip
PR10594 cont'd: Use parent die cache for variable lookup
Variable lookup is usually done through the scopes from dwarf_getscopes at a particular pc. This requires an expensive traversal to find the inner-most die containing the pc. For cases where that containing die is known, e.g. at a particular function entry, we can do much better with our die_parent_cache. This may also help get more accurate variable scopes in cases where multiple dies contain a pc and the innermost isn't what we're trying to probe. For example, an inlined call chain of foo->bar->baz may all have the same entry pc, but if the probe was on function("bar"), we would want the variables in bar's scope, not baz's. * dwflpp.h (struct dwflpp): Remove pc_cached_scopes, num_cached_scopes, and cached_scopes, as they are now remembered by the caller. * dwflpp.cxx (dwflpp::getscopes): New - the DIE version uses the parent cache, and the pc version just defers to dwarf_getscopes. (dwflpp::print_locals, literal_stmt_for_local): Take a scopes vector. (dwflpp::find_variable_and_frame_base): Take a scopes vector from the caller instead of computing it every time. (dwflpp::dwarf_getscopes_cached): Removed. * tapsets.cxx (dwarf_var_expanding_visitor::getscopes): New cached lookup function which gets the scopes from the DIE if possible. (dwarf_var_expanding_visitor::visit_target_symbol): Call getscopes.
Diffstat (limited to 'runtime/task_finder_map.c')
0 files changed, 0 insertions, 0 deletions