1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

Kernel: Use a raw VM region for sorting ELF symbols instead of a Vector.

This avoids putting pressure on kmalloc() during backtrace symbolication.
Since we dump backtrace for every process that exits, this is actually a
decent performance improvement for things like GCC that chain a lot of
processes together.
This commit is contained in:
Andreas Kling 2019-06-27 10:49:49 +02:00
parent 7a3f59ae3f
commit f83263a72b
2 changed files with 36 additions and 6 deletions

View file

@ -4,11 +4,13 @@
#include <AK/HashMap.h>
#include <AK/OwnPtr.h>
#include <AK/Vector.h>
#if defined(KERNEL)
# include <Kernel/VirtualAddress.h>
#endif
#include <AK/ELF/ELFImage.h>
#ifdef KERNEL
#include <Kernel/VirtualAddress.h>
class Region;
#endif
class ELFLoader {
public:
explicit ELFLoader(const byte*);
@ -50,5 +52,9 @@ private:
dword address;
const char* name;
};
#ifdef KERNEL
mutable RefPtr<Region> m_sorted_symbols_region;
#else
mutable Vector<SortedSymbol> m_sorted_symbols;
#endif
};