From ae2552daf405ab1f59ddc862cfe0fcb4d90f8174 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 7 Jul 2009 14:36:53 -0400 Subject: PR3498: speed up pass-2 and pass-3 for kernel offline dwfl module searching * dwflpp.cxx (dwflpp ctor): Parametrize for user/kernel modes. Update callers. (dwfl_report_offline_predicate): New function. Filter and abort searches early if possible. (setup_kernel): Use new predicate. * dwflpp.h: Corresponding changes. * tapsets.cxx (dwfl_report_offline_predicate): Remove this shared implementation. (dwarf_builder): Turn kern_dw into module_name->dwflpp* map, just like user_dw. (get_kern_dw): Adapt. (dwarf_build_no_more): Adapt. * tapsets.h: Remove old shared predicate. * translate.cxx (dwfl_report_offline_predicate2): New function. Filter and abort searches early if possible. (emit_symbol_data): Use it. --- dwflpp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dwflpp.h') diff --git a/dwflpp.h b/dwflpp.h index ec6c5a0c..d6d97cd0 100644 --- a/dwflpp.h +++ b/dwflpp.h @@ -166,7 +166,7 @@ struct dwflpp std::string cu_name; std::string function_name; - dwflpp(systemtap_session & session, const std::string& user_module=""); + dwflpp(systemtap_session & session, const std::string& user_module, bool kernel_p); ~dwflpp(); void get_module_dwarf(bool required = false, bool report = true); @@ -280,7 +280,7 @@ private: Dwarf * module_dwarf; Dwarf_Die * function; - void setup_kernel(bool debuginfo_needed = true); + void setup_kernel(const std::string& module_name, bool debuginfo_needed = true); void setup_user(const std::string& module_name, bool debuginfo_needed = true); typedef std::map*> module_cu_cache_t; -- cgit