• Michael Lippautz's avatar
    heap: Account marked bytes when processing an object · f0798027
    Michael Lippautz authored
    During marking, (a) marking an object and (b) processing it currently
    happen on the main thread. In future, concurrent marking will move both
    steps to helper tasks.
    
    Even with concurrent marking, the write barrier remains on the main
    thread and will require at least (a) to be executed right away. It is
    thus beneficial to increment live bytes counters in (b) which can be
    offloaded to helper tasks.
    
    Output on Z840 (down from ~13.1x):
    [ RUN      ] WriteBarrierPerfTest.MemberWritePerformance
    *RESULT WriteBarrierPerfTest writes during GC: = 46497.21016738996 writes/ms
    *RESULT WriteBarrierPerfTest writes outside GC: = 541516.2454873646 writes/ms
    *RESULT WriteBarrierPerfTest relative speed difference: = 11.646209386281587 times
    [       OK ] WriteBarrierPerfTest.MemberWritePerformance (67 ms)
    
    Bug: 1014414
    Change-Id: I5295e4738fce9410fbfbed51829c04b2e25f2d9e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1883719
    Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
    Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
    Reviewed-by: default avatarOmer Katz <omerkatz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#710262}
    f0798027
heap.cc 23.1 KB