Reduce external memory jank in V8 GC |
||
Issue descriptionCurrently external.mc_epilogue and external.weak_global_handles phases can take up to 5ms each on the v8.infinite_scroll benchmark. This issue tracks improvements for these phases.
,
May 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/a6da98d86ffab7e1e50319ed12b57fcb366e24ee commit a6da98d86ffab7e1e50319ed12b57fcb366e24ee Author: ulan <ulan@chromium.org> Date: Mon May 09 07:15:43 2016 Introduce a new phantom weakness type without finalization callback. Handles of this type are automatically reset by the garbage collector when their objects are not longer reachable. The motivation is to reduce pause time of external.weak_global_handles phase of the garbage collector by not maintaing the list of pending callbacks and not calling the callbacks. Local testing on discourse page of the v8.inifinite_scroll benchmark shows 7x improvement for this GC phase. Before: external.weak_global_handles len: 21 min: 0.0 max: 4.5 avg: 0.757142857143 After: external.weak_global_handles len: 21 min: 0.0 max: 0.5 avg: 0.109523809524 A follow-up patch will enable the new phantom handles in Chromium. BUG= chromium:608333 LOG=NO Review-Url: https://codereview.chromium.org/1950963002 Cr-Commit-Position: refs/heads/master@{#36095} [modify] https://crrev.com/a6da98d86ffab7e1e50319ed12b57fcb366e24ee/include/v8.h [modify] https://crrev.com/a6da98d86ffab7e1e50319ed12b57fcb366e24ee/src/api.cc [modify] https://crrev.com/a6da98d86ffab7e1e50319ed12b57fcb366e24ee/src/global-handles.cc [modify] https://crrev.com/a6da98d86ffab7e1e50319ed12b57fcb366e24ee/src/global-handles.h [modify] https://crrev.com/a6da98d86ffab7e1e50319ed12b57fcb366e24ee/test/cctest/test-global-handles.cc
,
May 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b19982c4431d0e8994b74992727e05cfb2e4ce37 commit b19982c4431d0e8994b74992727e05cfb2e4ce37 Author: ulan <ulan@chromium.org> Date: Tue May 10 15:28:16 2016 Use a new type of weak phantom handle for ScriptWrappable. The new phantom handle does not require a callback and is reset automatically by the garbage collector. Since we do not have finalization callback anymore, we account for the freed wrappers in GC epilogue by using a new V8 API function. This drastically reduces time spent in callback handling phases of V8 GC on v8.infinite_scroll benchmark. See the related CL in V8 for more motivation and results: https://codereview.chromium.org/1950963002 BUG= 608333 Review-Url: https://codereview.chromium.org/1944363002 Cr-Commit-Position: refs/heads/master@{#392613} [modify] https://crrev.com/b19982c4431d0e8994b74992727e05cfb2e4ce37/third_party/WebKit/Source/bindings/core/v8/ScriptWrappable.h [modify] https://crrev.com/b19982c4431d0e8994b74992727e05cfb2e4ce37/third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp
,
Jul 24 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by u...@chromium.org
, May 4 2016