mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:37:35 +00:00
Profiler: Cache parsed DWARF debug information in disassembly view
This changes browsing through disassembled functions in Profiler from a painfully sluggish experience into quite a swift one. It's especially true for profiling the kernel, as it has more than 10 megabytes of DWARF data to churn through.
This commit is contained in:
parent
8e1f882ac9
commit
b883652a83
5 changed files with 19 additions and 4 deletions
|
@ -102,10 +102,17 @@ void LibraryMetadata::handle_mmap(FlatPtr base, size_t size, const String& name)
|
|||
if (!mapped_object)
|
||||
return;
|
||||
}
|
||||
m_libraries.set(path_string, adopt_own(*new Library { base, size, path_string, mapped_object }));
|
||||
m_libraries.set(path_string, adopt_own(*new Library { base, size, path_string, mapped_object, {} }));
|
||||
}
|
||||
}
|
||||
|
||||
const Debug::DebugInfo& LibraryMetadata::Library::load_debug_info(FlatPtr base_address) const
|
||||
{
|
||||
if (debug_info == nullptr)
|
||||
debug_info = make<Debug::DebugInfo>(object->elf, String::empty(), base_address);
|
||||
return *debug_info.ptr();
|
||||
}
|
||||
|
||||
String LibraryMetadata::Library::symbolicate(FlatPtr ptr, u32* offset) const
|
||||
{
|
||||
if (!object)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue