• jgruber's avatar
    [builtins] Implement lazy deserialization for TFJ builtins · 79aee245
    jgruber authored
    This adds support for lazy deserialization of JS-linkage (TFJ) builtins,
    still gated behind the --lazy-deserialization flag. If enabled, we
    proceed as follows:
    
    During isolate initialization, only eager builtins are deserialized. All
    references to lazy builtins are replaced by the DeserializeLazy builtin.
    In particular, this happens in the builtin table (Builtins::builtins_)
    and in SharedFunctionInfo objects.
    
    When calling into a not-yet deserialized function (i.e. the JSFunction's
    code object is the DeserializeLazy builtin), the DeserializeLazy builtin
    takes over.  It checks the builtin table to see if the target builtin
    (determined by looking at the builtin id stored on the
    SharedFunctionInfo) has already been deserialized. If so, it simply
    copies the builtin code object to the JSFunction and SharedFunctionInfo.
    Otherwise, we enter Runtime::kDeserializeLazy to deserialize the
    builtin.
    
    With --lazy-deserialization, isolate deserialization is 11% faster
    (1.5ms vs.  1.7ms), and code_space->Size() is 33% lower (984K vs.
    1475K).
    
    Moving relocation infos & handler tables out of the partial snapshot
    cache would additionally let us save up to 30K per isolate. Adding code
    stubs to that list increases further potential savings to 262K.
    
    Bug: v8:6624
    Change-Id: I0ac7d05d165d2466998269bd431ac076a311cbeb
    Reviewed-on: https://chromium-review.googlesource.com/649166
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#47818}
    79aee245
Name
Last commit
Last update
..
runtime-array.cc Loading commit data...
runtime-atomics.cc Loading commit data...
runtime-classes.cc Loading commit data...
runtime-collections.cc Loading commit data...
runtime-compiler.cc Loading commit data...
runtime-date.cc Loading commit data...
runtime-debug.cc Loading commit data...
runtime-error.cc Loading commit data...
runtime-forin.cc Loading commit data...
runtime-function.cc Loading commit data...
runtime-futex.cc Loading commit data...
runtime-generator.cc Loading commit data...
runtime-internal.cc Loading commit data...
runtime-interpreter.cc Loading commit data...
runtime-intl.cc Loading commit data...
runtime-literals.cc Loading commit data...
runtime-liveedit.cc Loading commit data...
runtime-maths.cc Loading commit data...
runtime-module.cc Loading commit data...
runtime-numbers.cc Loading commit data...
runtime-object.cc Loading commit data...
runtime-operators.cc Loading commit data...
runtime-promise.cc Loading commit data...
runtime-proxy.cc Loading commit data...
runtime-regexp.cc Loading commit data...
runtime-scopes.cc Loading commit data...
runtime-strings.cc Loading commit data...
runtime-symbol.cc Loading commit data...
runtime-test.cc Loading commit data...
runtime-typedarray.cc Loading commit data...
runtime-utils.h Loading commit data...
runtime-wasm.cc Loading commit data...
runtime.cc Loading commit data...
runtime.h Loading commit data...