diff options
author | Josh Stone <jistone@redhat.com> | 2009-09-03 12:00:10 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-09-03 12:00:10 -0700 |
commit | 789448a36f57e53cc6a1878f7637998b0f15652c (patch) | |
tree | 790e6f8631684a1c99ead9c79c8d009025cd0165 /dwflpp.cxx | |
parent | 7fdd3e2c61874abd631de5038d846dffb6f5bc5f (diff) | |
download | systemtap-steved-789448a36f57e53cc6a1878f7637998b0f15652c.tar.gz systemtap-steved-789448a36f57e53cc6a1878f7637998b0f15652c.tar.xz systemtap-steved-789448a36f57e53cc6a1878f7637998b0f15652c.zip |
Fetch the blacklist section only when needed
We only check blacklisting on kernel probes, so it's a waste to dig up
the section name otherwise.
* dwflpp.cxx (dwflpp::blacklisted_p): Lookup the section directly.
(relocate_address::relocate_address): Don't do blacklisting here.
* tapsets.cxx (dwarf_query::add_probe_point): Don't carry the blacklist
section directly anymore.
Diffstat (limited to 'dwflpp.cxx')
-rw-r--r-- | dwflpp.cxx | 16 |
1 files changed, 3 insertions, 13 deletions
@@ -2302,13 +2302,13 @@ dwflpp::blacklisted_p(const string& funcname, const string& filename, int, const string& module, - const string& section, Dwarf_Addr addr, bool has_return) { if (!blacklist_enabled) return false; // no blacklist for userspace + string section = get_blacklist_section(addr); if (section.substr(0, 6) == string(".init.") || section.substr(0, 6) == string(".exit.") || section.substr(0, 9) == string(".devinit.") || @@ -2533,9 +2533,7 @@ dwflpp::get_blacklist_section(Dwarf_Addr addr) Dwarf_Addr -dwflpp::relocate_address(Dwarf_Addr dw_addr, - string& reloc_section, - string& blacklist_section) +dwflpp::relocate_address(Dwarf_Addr dw_addr, string& reloc_section) { // PR10273 // libdw address, so adjust for bias gotten from dwfl_module_getdwarf @@ -2544,7 +2542,6 @@ dwflpp::relocate_address(Dwarf_Addr dw_addr, { assert(module_name == TOK_KERNEL); reloc_section = ""; - blacklist_section = ""; } else if (dwfl_module_relocations (module) > 0) { @@ -2554,19 +2551,12 @@ dwflpp::relocate_address(Dwarf_Addr dw_addr, const char* r_s = dwfl_module_relocation_info (module, idx, NULL); if (r_s) reloc_section = r_s; - blacklist_section = reloc_section; if (reloc_section == "" && dwfl_module_relocations (module) == 1) - { - blacklist_section = get_blacklist_section(dw_addr); reloc_section = ".dynamic"; - } } else - { - blacklist_section = get_blacklist_section(dw_addr); - reloc_section = ".absolute"; - } + reloc_section = ".absolute"; return reloc_addr; } |