diff options
author | Andreas Kling <kling@serenityos.org> | 2020-11-19 21:45:10 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-19 21:46:01 +0100 |
commit | da413a464a10ac8da93869c8fbe559cf66a66df8 (patch) | |
tree | 220834dda9295c0de50166f421c786c614f3bdff /DevTools/UserspaceEmulator/MallocTracer.cpp | |
parent | 1b9a85e4f1eabc702e276924fb04ae4d570a67f6 (diff) | |
download | serenity-da413a464a10ac8da93869c8fbe559cf66a66df8.zip |
UserspaceEmulator: Inline some very hot functions
This improves the browser's load time on welcome.html by ~2%.
Diffstat (limited to 'DevTools/UserspaceEmulator/MallocTracer.cpp')
-rw-r--r-- | DevTools/UserspaceEmulator/MallocTracer.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/DevTools/UserspaceEmulator/MallocTracer.cpp b/DevTools/UserspaceEmulator/MallocTracer.cpp index e0c6803ba5..1a9b1d4077 100644 --- a/DevTools/UserspaceEmulator/MallocTracer.cpp +++ b/DevTools/UserspaceEmulator/MallocTracer.cpp @@ -162,22 +162,6 @@ void MallocTracer::target_did_realloc(Badge<SoftCPU>, FlatPtr address, size_t si existing_mallocation->malloc_backtrace = m_emulator.raw_backtrace(); } -Mallocation* MallocTracer::find_mallocation(const Region& region, FlatPtr address) -{ - if (!region.is_mmap()) - return nullptr; - if (!static_cast<const MmapRegion&>(region).is_malloc_block()) - return nullptr; - auto* malloc_data = static_cast<MmapRegion&>(const_cast<Region&>(region)).malloc_metadata(); - if (!malloc_data) - return nullptr; - auto& mallocation = malloc_data->mallocation_for_address(address); - if (!mallocation.used) - return nullptr; - ASSERT(mallocation.contains(address)); - return &mallocation; -} - Mallocation* MallocTracer::find_mallocation(FlatPtr address) { auto* region = m_emulator.mmu().find_region({ 0x23, address }); |