• Yang Guo's avatar
    [compiler] finalize compile jobs asap when compiling on main thread · 0a7e08ef
    Yang Guo authored
    Previously, we finalize all compile jobs at once. This keeps the zone memory
    in every compile job alive until the end. This contributes to a high peak
    memory when many functions are compiled eagerly, for example when producing
    cache data for the ServiceWorker cache.
    
    Memory tracked by the AccountingAllocator in bytes, prior to this change in
    the test case:
    peak memory after init:              8192
    peak memory after lazy compile:     41200
    peak memory after lazy compile:     41200
    peak memory after eager compile:   164256
    
    With this change, if we are compiling on the main thread, we finalize every
    compile job as soon as it is done and dispose the compile job and its zone
    memory.
    
    After this change:
    peak memory after init:              8192
    peak memory after lazy compile:     41200
    peak memory after lazy compile:     41200
    peak memory after eager compile:    41376
    
    R=leszeks@chromium.org, rmcilroy@chromium.org
    
    Bug: chromium:901329
    Change-Id: Iae0c89396c89692c4ecdeec3970d3c62031d2bce
    Reviewed-on: https://chromium-review.googlesource.com/c/1322949
    Commit-Queue: Yang Guo <yangguo@chromium.org>
    Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
    Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#57340}
    0a7e08ef
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...