https://chromium.googlesource.com/v8/v8/+/94ca8fa8c163902736df2401f1b53e551bd663d5commit 94ca8fa8c163902736df2401f1b53e551bd663d5
Author: Dominik Inführ <
dinf...@chromium.org>
Date: Tue May 31 08:02:41 2022
[heap] Drop UPDATE_WEAK_WRITE_BARRIER write barrier mode
Replace all usages of UPDATE_WEAK_WRITE_BARRIER with
UPDATE_WRITE_BARRIER. The barrier wasn't hot, so the additional branch
for the marking barrier shouldn't be a problem.
Performing the marking barrier could in theory cause more floating
garbage. However in this case the write barrier is only run once
directly after e.g. allocating a Code or NativeContext object. Since
UPDATE_WEAK_WRITE_BARRIER only skips the marking barrier, we should only
observe different behavior when marking is on. But since we already
have black allocation for objects in old space, we will not cause
additional floating garbage.
In case of performance regression, we should also be able to replace
those usages with SKIP_WRITE_BARRIER, since NativeContext and Code
objects are never allocated in the young generation, so running the
generational barrier shouldn't be necessary. It's just hard to DCHECK
that SKIP_WRITE_BARRIER is valid here.
Bug: v8:11708
Change-Id: I25d760a46d1d7ec973cc589f51ddf80ca3b5419d
Reviewed-on:
https://chromium-review.googlesource.com/c/v8/v8/+/3663080Reviewed-by: Leszek Swirski <
les...@chromium.org>
Reviewed-by: Igor Sheludko <
ish...@chromium.org>