зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1837944 - Part 2: Remove the option to use a smaller size for GC chunks r=sfink,geckoview-reviewers,owlish
This was added in the B2G days to help with lower spec devices which had less memory. Today's Android devices have much more memory available. Depends on D184687 Differential Revision: https://phabricator.services.mozilla.com/D184688
This commit is contained in:
Родитель
e629c0ae03
Коммит
8a19f7c395
|
@ -403,20 +403,6 @@ option(
|
|||
set_define("JS_GC_ZEAL", depends_if("--enable-gczeal")(lambda _: True))
|
||||
|
||||
|
||||
# Use a smaller chunk size for GC chunks
|
||||
# ========================================================
|
||||
# Use large (1MB) chunks by default. This option can be used to give
|
||||
# smaller (currently 256K) chunks.
|
||||
option(
|
||||
"--enable-small-chunk-size",
|
||||
help="Allocate memory for JS GC things in smaller chunks",
|
||||
)
|
||||
|
||||
set_define(
|
||||
"JS_GC_SMALL_CHUNK_SIZE", depends(when="--enable-small-chunk-size")(lambda: True)
|
||||
)
|
||||
|
||||
|
||||
# Enable breakpoint for artificial OOMs
|
||||
# =======================================================
|
||||
option(
|
||||
|
|
|
@ -51,11 +51,7 @@ const size_t PageShift = 12;
|
|||
const size_t PageSize = size_t(1) << PageShift;
|
||||
constexpr size_t ArenasPerPage = PageSize / ArenaSize;
|
||||
|
||||
#ifdef JS_GC_SMALL_CHUNK_SIZE
|
||||
const size_t ChunkShift = 18;
|
||||
#else
|
||||
const size_t ChunkShift = 20;
|
||||
#endif
|
||||
const size_t ChunkSize = size_t(1) << ChunkShift;
|
||||
const size_t ChunkMask = ChunkSize - 1;
|
||||
|
||||
|
@ -162,16 +158,8 @@ const size_t CalculatedChunkPadSize = ChunkSize - CalculatedChunkSizeRequired;
|
|||
static_assert(CalculatedChunkPadSize * CHAR_BIT < BitsPerArenaWithHeaders,
|
||||
"Calculated ArenasPerChunk is too small");
|
||||
|
||||
// Define a macro for the expected number of arenas so its value appears in the
|
||||
// error message if the assertion fails.
|
||||
#ifdef JS_GC_SMALL_CHUNK_SIZE
|
||||
# define EXPECTED_ARENA_COUNT 63
|
||||
#else
|
||||
# define EXPECTED_ARENA_COUNT 252
|
||||
#endif
|
||||
static_assert(ArenasPerChunk == EXPECTED_ARENA_COUNT,
|
||||
static_assert(ArenasPerChunk == 252,
|
||||
"Do not accidentally change our heap's density.");
|
||||
#undef EXPECTED_ARENA_COUNT
|
||||
|
||||
// Mark bitmaps are atomic because they can be written by gray unmarking on the
|
||||
// main thread while read by sweeping on a background thread. The former does
|
||||
|
|
|
@ -52,9 +52,6 @@
|
|||
entirely too much GC. */
|
||||
#undef JS_GC_ZEAL
|
||||
|
||||
/* Define to 1 if SpiderMonkey should use small chunks. */
|
||||
#undef JS_GC_SMALL_CHUNK_SIZE
|
||||
|
||||
/* Define to 1 to perform extra assertions and heap poisoning. */
|
||||
#undef JS_CRASH_DIAGNOSTICS
|
||||
|
||||
|
|
|
@ -60,7 +60,6 @@ set_config("MOZ_ANDROID_GECKOVIEW_LITE", True, when="--enable-geckoview-lite")
|
|||
imply_option("MOZ_NORMANDY", False)
|
||||
imply_option("MOZ_SERVICES_HEALTHREPORT", True)
|
||||
imply_option("MOZ_ANDROID_HISTORY", True)
|
||||
imply_option("--enable-small-chunk-size", True)
|
||||
|
||||
|
||||
@depends(target)
|
||||
|
|
Загрузка…
Ссылка в новой задаче