• Dominik Inführ's avatar
    [heap] Drop UPDATE_WEAK_WRITE_BARRIER write barrier mode · 94ca8fa8
    Dominik Inführ authored
    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: 's avatarLeszek Swirski <leszeks@chromium.org>
    Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
    Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#80839}
    94ca8fa8
contexts-inl.h 10.7 KB