1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00

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.
This commit is contained in:
Andreas Kling 2021-03-03 21:17:32 +01:00
parent faed0e63dc
commit 0fc3983c8d
Notes: sideshowbarker 2024-07-18 21:44:44 +09:00
3 changed files with 44 additions and 13 deletions

View file

@ -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;
}