You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9c5e8c5
Browse filesBrowse the repository at this point in the historyBrowse files
[CMake] Optimize bmalloc and FastMalloc.cpp in Debug builds
https://bugs.webkit.org/show_bug.cgi?id=328481
Reviewed by Nikolas Zimmermann and Ian Grunert.
Debug builds compile bmalloc, and FastMalloc.cpp, which inlines the libpas
allocation fast paths, at -O0, so every allocation in a Debug build runs
unoptimized allocator code. 322547@main added -O3 for both on Cocoa; move the
rules to the shared CMake files so that every CMake port gets them. Windows is
left out because clang-cl ignores -O3. FastMalloc.cpp also skips the
precompiled header, since clang rejects a PCH built at -O0 from an -O3 compile.
An A/B comparison on a WPE Debug build ran 4989 layout tests from fast/dom,
fast/css, js/dom, imported/w3c/web-platform-tests/dom, editing/execCommand and
media/modern-media-controls with 16 workers, twice per variant:
before after
run 1 wall time 814s 583s
run 2 wall time 803s 609s
All tests ran as expected in every run, and the sum of the per-test times
dropped by 27%. editing/execCommand/delete-non-editable-range-crash.html, which
timed out after 60s in Debug, now passes in under a second, so its expectation
is removed.
The cost is detail in the allocator frames of Debug crash logs. Faults injected
into fastFree() and fastMalloc() were compared using the gdb command the bots
run on core dumps. All frames from the allocator's caller outward are
identical. WTF::fastMalloc(), WTF::fastFree() and the bmalloc::api wrappers no
longer appear because they become tail calls, and most libpas frames between
them and the panic disappear: an invalid free goes from 13 allocator frames to 4
and an allocation failure from 9 to 5. Some allocator locals print as
<optimized out>. The panic message, the faulting pointer and the requested size
are still reported.
* LayoutTests/platform/glib/TestExpectations:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/PlatformCocoa.cmake:
* Source/bmalloc/CMakeLists.txt:
* Source/bmalloc/PlatformCocoa.cmake:
Canonical link: https://commits.webkit.org/324626@main
0 commit comments