diff options
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp | 64 |
1 files changed, 7 insertions, 57 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp index 08bfe37fd92f..7637726892a0 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp @@ -237,7 +237,7 @@ SymbolFile *SymbolFileDWARFDebugMap::CreateInstance(ObjectFileSP objfile_sp) { } SymbolFileDWARFDebugMap::SymbolFileDWARFDebugMap(ObjectFileSP objfile_sp) - : SymbolFile(std::move(objfile_sp)), m_flags(), m_compile_unit_infos(), + : SymbolFileCommon(std::move(objfile_sp)), m_flags(), m_compile_unit_infos(), m_func_indexes(), m_glob_indexes(), m_supports_DW_AT_APPLE_objc_complete_type(eLazyBoolCalculate) {} @@ -409,7 +409,6 @@ Module *SymbolFileDWARFDebugMap::GetModuleByCompUnitInfo( FileSpec oso_file(oso_path); ConstString oso_object; if (FileSystem::Instance().Exists(oso_file)) { - FileSystem::Instance().Collect(oso_file); // The modification time returned by the FS can have a higher precision // than the one from the CU. auto oso_mod_time = std::chrono::time_point_cast<std::chrono::seconds>( @@ -1185,25 +1184,13 @@ void SymbolFileDWARFDebugMap::FindTypes( llvm::ArrayRef<CompilerContext> context, LanguageSet languages, llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files, TypeMap &types) { + LLDB_SCOPED_TIMER(); ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool { oso_dwarf->FindTypes(context, languages, searched_symbol_files, types); return false; }); } -// -// uint32_t -// SymbolFileDWARFDebugMap::FindTypes (const SymbolContext& sc, const -// RegularExpression& regex, bool append, uint32_t max_matches, Type::Encoding -// encoding, lldb::user_id_t udt_uid, TypeList& types) -//{ -// SymbolFileDWARF *oso_dwarf = GetSymbolFile (sc); -// if (oso_dwarf) -// return oso_dwarf->FindTypes (sc, regex, append, max_matches, encoding, -// udt_uid, types); -// return 0; -//} - CompilerDeclContext SymbolFileDWARFDebugMap::FindNamespace( lldb_private::ConstString name, const CompilerDeclContext &parent_decl_ctx) { @@ -1430,53 +1417,16 @@ SymbolFileDWARFDebugMap::AddOSOARanges(SymbolFileDWARF *dwarf2Data, return num_line_entries_added; } -uint64_t SymbolFileDWARFDebugMap::GetDebugInfoSize() { - uint64_t debug_info_size = 0; - ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool { - ObjectFile *oso_objfile = oso_dwarf->GetObjectFile(); - if (!oso_objfile) - return false; // Keep iterating - ModuleSP module_sp = oso_objfile->GetModule(); - if (!module_sp) - return false; // Keep iterating - SectionList *section_list = module_sp->GetSectionList(); - if (section_list) - debug_info_size += section_list->GetDebugInfoSize(); - return false; // Keep iterating - }); - return debug_info_size; -} - -StatsDuration::Duration SymbolFileDWARFDebugMap::GetDebugInfoParseTime() { - StatsDuration::Duration elapsed(0.0); +ModuleList SymbolFileDWARFDebugMap::GetDebugInfoModules() { + ModuleList oso_modules; ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool { ObjectFile *oso_objfile = oso_dwarf->GetObjectFile(); if (oso_objfile) { ModuleSP module_sp = oso_objfile->GetModule(); - if (module_sp) { - SymbolFile *symfile = module_sp->GetSymbolFile(); - if (symfile) - elapsed += symfile->GetDebugInfoParseTime(); - } - } - return false; // Keep iterating - }); - return elapsed; -} - -StatsDuration::Duration SymbolFileDWARFDebugMap::GetDebugInfoIndexTime() { - StatsDuration::Duration elapsed(0.0); - ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool { - ObjectFile *oso_objfile = oso_dwarf->GetObjectFile(); - if (oso_objfile) { - ModuleSP module_sp = oso_objfile->GetModule(); - if (module_sp) { - SymbolFile *symfile = module_sp->GetSymbolFile(); - if (symfile) - elapsed += symfile->GetDebugInfoIndexTime(); - } + if (module_sp) + oso_modules.Append(module_sp); } return false; // Keep iterating }); - return elapsed; + return oso_modules; } |
