- 13 Sep, 2021 1 commit
-
-
Michael Lippautz authored
The refactoring is triggered by https://crrev.com/c/3121905 where we noticed that a bunch of tricky counter paths could be simplified, making reasoning about corectness easier. In this CL: 1. Use uniqe_ptr instead of Optional to allow moving SweepingJob away from the header file. 2. sweeping_in_progress_ is replaced with simply checking for a job. 3. freed_bytes_ are moved to the job and the dependency is reversed, avoiding the inside-out (Job->Sweeper) dependency completely. 4. Merge() and counter updates are merged into a Finalize() method. 5. FinishIfDone() allows for conditional finization. 6. young_bytes_ and old_bytes_ are removed as they were always updated when the corresponding bytes in the ArrayBufferList was updated. Change-Id: I56e5b04087166ce03d3a9195ac48359122a84c73 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3124776Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#76795}
-
- 07 May, 2021 1 commit
-
-
Dominik Inführ authored
This CL changes the accounting of array buffers, such that Detach deducts the backing store immediately. Previously this was corrected in the next GC cycle. Not updating backing_store_bytes_ immediately could cause an overflow in WasmMemoryObject::Grow. Grow first detaches the backing store from the old JSArrayBuffer and then attaches it to a new one. This results in the backing store being accounted twice temporarily, this could cause overflows on 32-bit systems. Bug: chromium:1204455 Change-Id: I7cf2ca9a12bb5caf7bcffa25a34567774cf155b8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2871458 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#74429}
-
- 23 Nov, 2020 1 commit
-
-
Dominik Inführ authored
Change-Id: I51f2152d8a26fb0b266a41f7d284ced7908eb475 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2554603 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Auto-Submit: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#71338}
-
- 29 Oct, 2020 1 commit
-
-
Dominik Inführ authored
Merge the list of concurrently swept ArrayBufferExtensions sooner back to the main thread. When appending a new ArrayBufferExtension check whether the concurrent sweeping was already finished and merge the lists if it is. In order to reduce the number of GCs in the linked test case, reset young_bytes_ and old_bytes_ to 0 while sweeping the ArrayBufferExtensions. Surviving extensions will be accounted again when merging lists. As a drive-by change remove scavenge.process_array_buffers from GCTracer. GCTracer also printed the wrong value for fast_promote. Bug: v8:11044 Change-Id: I8a772df895c43a69493015f42336c6f33fe52056 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2505764Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#70880}
-
- 11 Feb, 2020 1 commit
-
-
Dominik Inführ authored
Before this CL array buffer counters were only decremented at the next GC. This CL makes freed_bytes_ an atomic variable which is incremented by the concurrent sweeping task. The main thread now also inspects this value when adding new JSArrayBuffers to update counters sooner. Bug: v8:10064 Change-Id: Ibcb245b541e806b95a3c2c42d3cc3affe7739e4d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2047043 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#66221}
-
- 10 Feb, 2020 2 commits
-
-
Dominik Inführ authored
Introduce separate counters for young and old array buffer bytes. They are used to keep the counter stable during sweeping when the array buffer lists are moved to the concurrent thread for sweeping. Bug: v8:10064 Change-Id: I0f11a634341873b4d21759c284c55beb26fe30a5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2045511 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#66204}
-
Dominik Inführ authored
Update external memory counters when using ArrayBufferExtensions. In case the array buffers are swept concurrently, the counters are updated at the beginning of the next minor/full GC. A subsequent GC is going to update counters faster. ArrayBufferExtension now stores the accounting_length such that the sweeper always knows how much memory to deduct from the external memory on destruction. ArrayBufferList now also tracks the size of all ArrayBuffers in it. Bug: v8:10064 Change-Id: I50a8b1180aa837b6932f834df1610255bd2bd9fd Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2041441 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#66195}
-
- 24 Jan, 2020 1 commit
-
-
Dominik Inführ authored
When ArrayBufferExtensions are enabled, sweep the extensions outside of the GC pause concurrently to the application. The following GC will make sure that the previous concurrent sweep operation is finished. This CL introduces Heap::array_buffer_sweeper() that is both responsible for tracking all extensions but also for sweeping. Bug: v8:10064 Change-Id: I113cd625445a7d59ffb7a9de8b25a15a72b02b99 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2010107Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#65984}
-