mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:17: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
|
@ -11,6 +11,7 @@
|
|||
#include <AK/MappedFile.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibDebug/DebugInfo.h>
|
||||
#include <LibELF/Image.h>
|
||||
|
||||
namespace Profiler {
|
||||
|
@ -29,8 +30,11 @@ public:
|
|||
size_t size;
|
||||
String name;
|
||||
MappedObject* object { nullptr };
|
||||
// This is loaded lazily because we only need it in disassembly view
|
||||
mutable OwnPtr<Debug::DebugInfo> debug_info;
|
||||
|
||||
String symbolicate(FlatPtr, u32* offset) const;
|
||||
const Debug::DebugInfo& load_debug_info(FlatPtr base_address) const;
|
||||
};
|
||||
|
||||
void handle_mmap(FlatPtr base, size_t size, const String& name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue