• Toon Verwaest's avatar
    Reland^4 "[runtime] Amortize descriptor array growing for fast-mode prototypes" · fd2548f3
    Toon Verwaest authored
    This CL:
     - stops tracking transitions for fast maps that are known to be detached
     - reuses descriptor arrays when transitioning detached maps to avoid O(n^2) performance and garbage creation
    
    Fix2 in reland: constructor_or_backpointer can be a smi since it can also hold a user-provided function.prototype
    Fix in reland: check whether the map of the back pointer is the metamap rather than reading the map of the constructor-or-backpointer slot. If the slot contains a constructor, it's possible that the object transitions while the concurrent marker is reading the map (from which it's reading the instance type); and it's possible that the transitioned map isn't set up yet fully when we read the instance type. An acquire load for the constructor-or-backpointer map would also fix it by serializing stores, but is more expensive. Checking the metamap is faster.
    
    Original commit message:
    > This avoids an O(n^2) algorithm that creates an equal amount of garbage.
    > Even though the actual final descriptor array might be a little bigger,
    > it reduces peak memory usage by allocating less.
    
    Change-Id: Id99dc76a369057e5c4d76a31163605cb38a66867
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2172080Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Commit-Queue: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#67501}
    fd2548f3
Name
Last commit
Last update
..
arm Loading commit data...
arm64 Loading commit data...
ia32 Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc Loading commit data...
s390 Loading commit data...
x64 Loading commit data...
DEPS Loading commit data...
OWNERS Loading commit data...
basic-block-profiler.cc Loading commit data...
basic-block-profiler.h Loading commit data...
code-tracer.h Loading commit data...
compilation-statistics.cc Loading commit data...
compilation-statistics.h Loading commit data...
disasm.h Loading commit data...
disassembler.cc Loading commit data...
disassembler.h Loading commit data...
eh-frame.cc Loading commit data...
eh-frame.h Loading commit data...
gdb-jit.cc Loading commit data...
gdb-jit.h Loading commit data...
objects-debug.cc Loading commit data...
objects-printer.cc Loading commit data...
perf-jit.cc Loading commit data...
perf-jit.h Loading commit data...
unwinder.cc Loading commit data...
unwinding-info-win64.cc Loading commit data...
unwinding-info-win64.h Loading commit data...