summaryrefslogtreecommitdiff
path: root/Userland/DevTools/Profiler/DisassemblyModel.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-03 21:17:32 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-03 22:57:45 +0100
commit0fc3983c8d25ce897ac8606815eea26919aa1c02 (patch)
treee0c233594a61300c5d7cdcc095650c198ed2ce0d /Userland/DevTools/Profiler/DisassemblyModel.cpp
parentfaed0e63dc7adc502006a480bc07be15ff78575f (diff)
downloadserenity-0fc3983c8d25ce897ac8606815eea26919aa1c02.zip
Profiler: Cache and reuse mapped ELF objects
In multi-process profiles, the same ELF objects tend to occur many times (everyone has libc.so for example) so we will quickly run out of VM if we map each object once per process that uses it. Fix this by adding a "mapped object cache" that maps the path of an ELF object to a cached memory mapping and wrapping ELF::Image.
Diffstat (limited to 'Userland/DevTools/Profiler/DisassemblyModel.cpp')
-rw-r--r--Userland/DevTools/Profiler/DisassemblyModel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/Profiler/DisassemblyModel.cpp b/Userland/DevTools/Profiler/DisassemblyModel.cpp
index b058df6152..10d29b8cf1 100644
--- a/Userland/DevTools/Profiler/DisassemblyModel.cpp
+++ b/Userland/DevTools/Profiler/DisassemblyModel.cpp
@@ -74,7 +74,7 @@ DisassemblyModel::DisassemblyModel(Profile& profile, ProfileNode& node)
dbgln("no library data");
return;
}
- elf = &library_data->elf;
+ elf = &library_data->object->elf;
base_address = library_data->base;
}