heap: Optimize write barrier when not bailing out
- Fetch ThreadState from page header instead of TLS. - Avoid virtual call when checking for large object pages. - Directly go through object_start_bitmap() instead of using FromInnerAddress, as we know that the address is neither null, nor in the linear allocation area or pointing to free space. - Fold TryMark and Mark at the expense of an Unmark() for the rare case where an object is in construction. Output on Z840 (down from ~21.8x): [ RUN ] WriteBarrierPerfTest.MemberWritePerformance *RESULT WriteBarrierPerfTest writes during GC: = 28129.39521800281 writes/ms *RESULT WriteBarrierPerfTest writes outside GC: = 480769.2307692308 writes/ms *RESULT WriteBarrierPerfTest relative speed difference: = 17.091346153846157 times [ OK ] WriteBarrierPerfTest.MemberWritePerformance (32 ms) Bug: 1014414 Change-Id: I9319a312a94a4fbafd4d87145414e7b2f4acd583 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865163 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Anton Bikineev <bikineev@chromium.org> Cr-Commit-Position: refs/heads/master@{#706666}
Showing
Please register or sign in to comment