JSC should put bmalloc's scavenger into mini mode
authorsbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 May 2018 18:56:05 +0000 (18:56 +0000)
committersbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 May 2018 18:56:05 +0000 (18:56 +0000)
commit5e731a641614956bf2577f6108d534f97770a2db
treec9262e66d0ca3d9cf7ea8ce93d2eba27f4dd12cd
parentd70e2694d55da8c2f3163f2f26c1ccc986961a12
JSC should put bmalloc's scavenger into mini mode
https://bugs.webkit.org/show_bug.cgi?id=185988

Reviewed by Michael Saboff.

Source/bmalloc:

We expose an API for putting bmalloc into mini mode. All that means now
is that we'll run the scavenger more aggressively.

* bmalloc/Scavenger.cpp:
(bmalloc::Scavenger::enableMiniMode):
(bmalloc::Scavenger::threadRunLoop):
* bmalloc/Scavenger.h:
* bmalloc/Sizes.h:
* bmalloc/bmalloc.cpp:
(bmalloc::api::enableMiniMode):
* bmalloc/bmalloc.h:

Source/JavaScriptCore:

When we InitializeThreading, we'll now enable bmalloc's mini mode
if the VM is in mini mode. This is an 8-10% progression on the footprint
at end score in run-testmem, making it a 4-5% memory score progression.
It's between a 0-1% regression in its time score.

* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):

Source/WTF:

* wtf/FastMalloc.cpp:
(WTF::fastEnableMiniMode):
* wtf/FastMalloc.h:

Tools:

This patch makes it so that we turn off the JIT when running run-testmem
that way we make JSC use its mini mode.

* Scripts/run-testmem:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@232269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/InitializeThreading.cpp
Source/WTF/ChangeLog
Source/WTF/wtf/FastMalloc.cpp
Source/WTF/wtf/FastMalloc.h
Source/bmalloc/ChangeLog
Source/bmalloc/bmalloc/Scavenger.cpp
Source/bmalloc/bmalloc/Scavenger.h
Source/bmalloc/bmalloc/Sizes.h
Source/bmalloc/bmalloc/bmalloc.cpp
Source/bmalloc/bmalloc/bmalloc.h
Tools/ChangeLog
Tools/Scripts/run-testmem