• Michael Lippautz's avatar
    cppgc-js,heap: Implement snapshots for embedder fields · 142dd775
    Michael Lippautz authored
    https://crrev.com/c/3293410 added concurrent processing of C++ objects
    found through V8 embedder fields. The CL missed that those embedder
    fields are not read atomically from JS objects. The problem is that
    embedder fields are only aligned to kTaggedSize on builds with pointer
    compression and are as such mis-aligned for atomic ops. This is not a
    problem for on-heap values as the upper 32bits are anyways computed
    from the cage. Is is a problem for generic C++ values though, as they
    are used with Oilpan.
    
    This CL adds the standard marker snapshot protocol for embedder fields.
    
    Marker:
    1. Snapshot embedder fields
    2. Try to mark host object
    3. On success: process snapshot
    
    Main thread:
    1. On setting embedder fields mark the object black first
    2. Emit a write barrier for the embedder fields
    
    This will get simpler with the heap sandbox that uses a separate table
    for embedder fields. Once the sandbox is the default configuration, we
    	can use it as dependency for the concurrent fast path.
    
    Bug: chromium:1285706
    Change-Id: I6b975ea561be08cda840ef0dd27a11627de93900
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3380983Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
    Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#78604}
    142dd775
Name
Last commit
Last update
..
api Loading commit data...
asmjs Loading commit data...
assembler Loading commit data...
base Loading commit data...
codegen Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
date Loading commit data...
debug Loading commit data...
diagnostics Loading commit data...
execution Loading commit data...
heap Loading commit data...
interpreter Loading commit data...
libplatform Loading commit data...
logging Loading commit data...
numbers Loading commit data...
objects Loading commit data...
parser Loading commit data...
profiler Loading commit data...
regexp Loading commit data...
regress Loading commit data...
runtime Loading commit data...
sandbox Loading commit data...
strings Loading commit data...
tasks Loading commit data...
torque Loading commit data...
utils Loading commit data...
wasm Loading commit data...
zone Loading commit data...
BUILD.gn Loading commit data...
DEPS Loading commit data...
avoid-windows-h-includes.cc Loading commit data...
run-all-unittests.cc Loading commit data...
test-helpers.cc Loading commit data...
test-helpers.h Loading commit data...
test-utils.cc Loading commit data...
test-utils.h Loading commit data...
testcfg.py Loading commit data...
unittests.status Loading commit data...