• Michael Lippautz's avatar
    [api, global-handles] Add TracedGlobal · 76c93685
    Michael Lippautz authored
    TracedGlobal integrates with the use case of EmbedderHeapTracer and replaces
    regular weak Global or Persistent nodes for such cases. This allows to simplify
    the case for regular weak handles in a sense that they follow regular weak
    semantics (if the underlying object is otherwise unreachable the weak handle
    will be reset).
    
    TracedGlobal requires slightly different semantics in the sense that it can be
    required to keep them alive on Scavenge garbage collections because there's a
    transitive path that is only known when using the EmbedderHeapTracer.
    TracedGlobal accomodates that use case.
    
    TracedGlobal follows move semantics and can thus be used in regular std
    containers without wrapping data structure.
    
    The internal state uses 20% less memory and allows for only iterating those
    nodes when necessary. The design trades the virtual call when iterating
    interesting persistents in the GC prologue with calling out through the
    EmbedderHeapTracer for each node which is also a virtual call. There is one less
    iteration over the set of handles required though and the design is robust
    against recursive GCs that mutate the embedder state during the prologue
    callback.
    
    Bug: chromium:923361
    Change-Id: Idbacfbe4723cd12af9de21058a4792e51dc4df74
    Reviewed-on: https://chromium-review.googlesource.com/c/1425523
    Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
    Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#59183}
    76c93685
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...