- 14 Aug, 2020 1 commit
-
-
Leszek Swirski authored
This patch introduces a new LocalIsolate and LocalFactory, which use LocalHeap and replace OffThreadIsolate and OffThreadFactory. This allows us to remove those classes, as well as the related OffThreadSpace, OffThreadLargeObjectSpace, OffThreadHeap, and OffThreadTransferHandle. OffThreadLogger becomes LocalLogger. LocalHeap behaves more like Heap than OffThreadHeap did, so this allows us to additionally remove the concept of "Finish" and "Publish" that the OffThreadIsolate had, and allows us to internalize strings directly with the newly-concurrent string table (where the implementation can now move to FactoryBase). This patch also removes the off-thread support from the deserializer entirely, as well as removing the LocalIsolateWrapper which allowed run-time distinction between Isolate and OffThreadIsolate. LocalHeap doesn't support the reservation model used by the deserializer, and we will likely move the deserializer to use LocalIsolate unconditionally once we figure out the details of how to do this. Bug: chromium:1011762 Change-Id: I1a1a0a72952b19a8a4c167c11a863c153a1252fc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2315990 Commit-Queue: Andreas Haas <ahaas@chromium.org> Auto-Submit: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#69397}
-
- 13 Aug, 2020 2 commits
-
-
Dominik Inführ authored
Remove allocation_mutex_ and use the already existing space_mutex to protect the free list from concurrent allocation. Bug: v8:10315 Change-Id: I8d823bcb80dfa49c6431a6db875488bc8d6ee8b6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352783Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#69384}
-
Dominik Inführ authored
Locks the allocation mutex if SupportsConcurrentAllocation() returns true. Unifies code/condition from multiple usages. Bug: v8:10315 Change-Id: I684d12284e862df5d68986841e04ff25527422eb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2352775 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#69379}
-
- 12 Aug, 2020 1 commit
-
-
Dominik Inführ authored
ArrayBufferTracker was superseded by ArrayBufferList and ArrayBufferSweeper. Now that ArrayBufferSweeper is used in production, we can remove the unused ArrayBufferTracker mechanism. Bug: v8:10064 Change-Id: I479169c76b6c5c634672024f77e689bb64a36504 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339105Reviewed-by: Simon Zünd <szuend@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#69351}
-
- 11 Aug, 2020 2 commits
-
-
Dominik Inführ authored
Isolate::GetHeapStatistics uses PagedSpace::Available, which races with allocating background threads. Bug: v8:10315 Change-Id: I6e0dc37d90e0c7a3e3dd2b8bdb77f2ea82372c13 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2349294Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#69337}
-
Dominik Inführ authored
Now that background threads participate in sweeping, this method races because multiple threads now want to update that counter. We could either make this counter atomic or remove it entirely. This CL removes this counter since it isn't strictly necessary, it is only used when sweeper finds more garbage than markers. This happens e.g. with right-trimming but should be rare and is eventually fixed in the next GC. Bug: v8:10315 Change-Id: Iebae8937860160a3b49bedd03c2e21e41f7dfe76 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2349296Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#69334}
-
- 05 Aug, 2020 1 commit
-
-
Dominik Inführ authored
PagedSpace::SizeOfObjects() then returns exactly the same value as PagedSpace::Size(). SizeOfObjects() used to deduct the current LAB, however this is now more difficult with local heaps. Accessing the main thread LAB from concurrent threads causes a data race. Also LocalHeaps have their own LAB, which should be deducted as well to be uniform with the main thread. However this would be tricky and expensive. The simpler solution is to do not deduct the main thread LAB anymore. Bug: v8:10315 Change-Id: I3c47e1a65caca9395737251aa694b295e78c7fb5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2336090 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#69245}
-
- 04 Aug, 2020 1 commit
-
-
Dominik Inführ authored
This is a reland of b354e344 This CL adds 3 fixes: * Unprotect code object before creating filler * Allows AllocationObserver::Step to add more AllocationObservers * Update limit in NewSpace::UpdateLinearAllocationArea Original change's description: > [heap] Refactor allocation observer in AllocationCounter > > Moves accounting of allocation observers into the AllocationCounter > class. This CL removes top_on_previous_step_ for counters that are > increased regularly in the slow path of the allocation functions. > > AdvanceAllocationObservers() informs the AllocationCounter about > allocated bytes, InvokeAllocationObservers() needs to be invoked when > an allocation step is reached. NextBytes() returns the number of bytes > until the next AllocationObserver::Step needs to run. > > Bug: v8:10315 > Change-Id: I8b6eb8719ab032d44ee0614d2a0f2645bfce9df6 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2320650 > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Cr-Commit-Position: refs/heads/master@{#69170} Bug: v8:10315 Change-Id: I89ab4d5069a234a293471f613dab16b47d8fff89 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332805Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#69216}
-
- 01 Aug, 2020 1 commit
-
-
Dominik Inführ authored
This reverts commit b354e344. Reason for revert: Clusterfuzz found issues with this CL. Original change's description: > [heap] Refactor allocation observer in AllocationCounter > > Moves accounting of allocation observers into the AllocationCounter > class. This CL removes top_on_previous_step_ for counters that are > increased regularly in the slow path of the allocation functions. > > AdvanceAllocationObservers() informs the AllocationCounter about > allocated bytes, InvokeAllocationObservers() needs to be invoked when > an allocation step is reached. NextBytes() returns the number of bytes > until the next AllocationObserver::Step needs to run. > > Bug: v8:10315 > Change-Id: I8b6eb8719ab032d44ee0614d2a0f2645bfce9df6 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2320650 > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Cr-Commit-Position: refs/heads/master@{#69170} TBR=ulan@chromium.org,dinfuehr@chromium.org Change-Id: Icd713207bfb2085421fd82009be24a0211ae86da No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:10315 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2332667Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#69187}
-
- 31 Jul, 2020 1 commit
-
-
Dominik Inführ authored
Moves accounting of allocation observers into the AllocationCounter class. This CL removes top_on_previous_step_ for counters that are increased regularly in the slow path of the allocation functions. AdvanceAllocationObservers() informs the AllocationCounter about allocated bytes, InvokeAllocationObservers() needs to be invoked when an allocation step is reached. NextBytes() returns the number of bytes until the next AllocationObserver::Step needs to run. Bug: v8:10315 Change-Id: I8b6eb8719ab032d44ee0614d2a0f2645bfce9df6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2320650 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#69170}
-
- 28 Jul, 2020 1 commit
-
-
Dominik Inführ authored
On 32-bit systems the calculation could overflow, leading to an illegal limit of the LAB. Cast to uint64_t to avoid this. Add DCHECKs to catch this earlier. Bug: chromium:1110214, v8:10315 Change-Id: I73679a2daeb3b83bb303d411c77782a2172e98cc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2320654Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#69101}
-
- 27 Jul, 2020 1 commit
-
-
Dominik Inführ authored
Add methods NotifyBytes(), NotifyObject() and NextBytes() to AllocationCounter. Methods are unused for now. Move AllocationObserver::Step after AllocationCounter methods as well. Use SetTopAndLimit as bottleneck instead of allocation_info_.Reset. Bug: v8:10315 Change-Id: I30049cb02e873bb08ebce606a491d99130421227 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2316103 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#69060}
-
- 16 Jul, 2020 1 commit
-
-
Dominik Inführ authored
Replacing EnsureSweepingCompleted() with DrainSweepingWorklistForSpace() caused sweeping to be completed later. This resulted in longer scavenger pauses, since the scavenger had to stop & resume sweeping more often. To avoid this, the scavenger now completes sweeping when all pages are swept. Bug: chromium:1106295, v8:10315 Change-Id: Ia46efdfb1f2492e9228f0349936be32a467f502b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2301935Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#68900}
-
- 15 Jul, 2020 1 commit
-
-
Dominik Inführ authored
This is a reland of 273f4e42 Original change's description: > [heap] Avoid ParkedMutexGuard during allocation > > Since main thread allocation does not start incremental marking anymore > while holding allocation_mutex_, background allocation does not need > ParkedMutexGuard anymore to avoid deadlocks. > > This also means background thread allocation isn't paused anymore to > perform a GC, which already resulted in subtle bugs (e.g. in > ExpandBackground with incremental marking). We also do not > stop-the-world anymore while holding allocation_mutex_. > > Bug: v8:10315 > Change-Id: Iadf00bc26434c765722b82a10497ab06151f15cc > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2289771 > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Cr-Commit-Position: refs/heads/master@{#68754} Bug: v8:10315 Change-Id: If5aec78370685369ad0f1d7a76002d45f149ddfb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2297468Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#68873}
-
- 14 Jul, 2020 2 commits
-
-
Dominik Inführ authored
Before actually failing to allocate, let the background thread help to sweep all pages of that space. As a drive-by also rename allocation functions to make background and main thread allocation more similar. Bug: v8:10315 Change-Id: I26d4b622de949d4943e35071cee1df8b3d2889c2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2297383Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#68843}
-
Dominik Inführ authored
This is a reland of fc48a228 Original change's description: > Reland "[heap] Move start of incremental marking in allocation" > > This is a reland of d6a14abe > > Test wasn't written with incremental/concurrent marking in mind, so > simply disabling it for this particular unittest. > > Original change's description: > > [heap] Move start of incremental marking in allocation > > > > Move start of incremental marking out of > > RefillLinearAllocationAreaFromFreeList. This avoids a potential > > safepoint while holding allocation_mutex_. > > > > Bug: v8:10315 > > Change-Id: Ieb60ac68f26199eea7b6b7ad6d874851382f3d69 > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287496 > > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#68751} > > Bug: v8:10315 > Change-Id: I2a665400d9a784b1557474a051839d5c8b45e9e2 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2292241 > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Cr-Commit-Position: refs/heads/master@{#68818} Bug: v8:10315 Change-Id: I7873c6c20e39d6636bd95a26d0c1cfc8f89366bd Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2295363Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#68839}
-
- 13 Jul, 2020 4 commits
-
-
Dominik Inführ authored
Rename functions for main thread allocation to indicate that they are used for main thread allocation. Bug: v8:10315 Change-Id: Idd359a7a439ec2e93f0bdc2f1bed987755790bbe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2292308Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#68828}
-
Sathya Gunasekaran authored
This reverts commit fc48a228. Reason for revert: fails tsan: https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20concurrent%20marking/13871 Original change's description: > Reland "[heap] Move start of incremental marking in allocation" > > This is a reland of d6a14abe > > Test wasn't written with incremental/concurrent marking in mind, so > simply disabling it for this particular unittest. > > Original change's description: > > [heap] Move start of incremental marking in allocation > > > > Move start of incremental marking out of > > RefillLinearAllocationAreaFromFreeList. This avoids a potential > > safepoint while holding allocation_mutex_. > > > > Bug: v8:10315 > > Change-Id: Ieb60ac68f26199eea7b6b7ad6d874851382f3d69 > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287496 > > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#68751} > > Bug: v8:10315 > Change-Id: I2a665400d9a784b1557474a051839d5c8b45e9e2 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2292241 > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Cr-Commit-Position: refs/heads/master@{#68818} TBR=ulan@chromium.org,dinfuehr@chromium.org Change-Id: I9063a942c050b79cd3b66226dc25651ccf9fa60a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:10315 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2295361Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#68826}
-
Dominik Inführ authored
Instead of completely finishing sweeping in the slow path of allocation, just sweep all pages for the current PagedSpace. This will help in making main thread allocation concurrent, since there is no need anymore to lock the allocation mutexes of other PagedSpaces. Bug: v8:10315 Change-Id: I1cf76d94fa7a22e726fc71f49c2d5669e4a0598c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2292306 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#68822}
-
Dominik Inführ authored
This is a reland of d6a14abe Test wasn't written with incremental/concurrent marking in mind, so simply disabling it for this particular unittest. Original change's description: > [heap] Move start of incremental marking in allocation > > Move start of incremental marking out of > RefillLinearAllocationAreaFromFreeList. This avoids a potential > safepoint while holding allocation_mutex_. > > Bug: v8:10315 > Change-Id: Ieb60ac68f26199eea7b6b7ad6d874851382f3d69 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287496 > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Cr-Commit-Position: refs/heads/master@{#68751} Bug: v8:10315 Change-Id: I2a665400d9a784b1557474a051839d5c8b45e9e2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2292241Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#68818}
-
- 09 Jul, 2020 4 commits
-
-
Dominik Inführ authored
This reverts commit d6a14abe. Reason for revert: Caused TSAN failures. Original change's description: > [heap] Move start of incremental marking in allocation > > Move start of incremental marking out of > RefillLinearAllocationAreaFromFreeList. This avoids a potential > safepoint while holding allocation_mutex_. > > Bug: v8:10315 > Change-Id: Ieb60ac68f26199eea7b6b7ad6d874851382f3d69 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287496 > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Cr-Commit-Position: refs/heads/master@{#68751} TBR=ulan@chromium.org,dinfuehr@chromium.org Change-Id: Ic928413884115ac01917a8db591af83cbbc9cc5a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:10315 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2289977Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#68762}
-
Dominik Inführ authored
This reverts commit 273f4e42. Reason for revert: Based on another need that needs to be reverted because of TSAN failures. Original change's description: > [heap] Avoid ParkedMutexGuard during allocation > > Since main thread allocation does not start incremental marking anymore > while holding allocation_mutex_, background allocation does not need > ParkedMutexGuard anymore to avoid deadlocks. > > This also means background thread allocation isn't paused anymore to > perform a GC, which already resulted in subtle bugs (e.g. in > ExpandBackground with incremental marking). We also do not > stop-the-world anymore while holding allocation_mutex_. > > Bug: v8:10315 > Change-Id: Iadf00bc26434c765722b82a10497ab06151f15cc > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2289771 > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Cr-Commit-Position: refs/heads/master@{#68754} TBR=ulan@chromium.org,dinfuehr@chromium.org Change-Id: I3a16c13626c891e8063564fc05fd2d3fc427d159 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:10315 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2289975Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#68761}
-
Dominik Inführ authored
Since main thread allocation does not start incremental marking anymore while holding allocation_mutex_, background allocation does not need ParkedMutexGuard anymore to avoid deadlocks. This also means background thread allocation isn't paused anymore to perform a GC, which already resulted in subtle bugs (e.g. in ExpandBackground with incremental marking). We also do not stop-the-world anymore while holding allocation_mutex_. Bug: v8:10315 Change-Id: Iadf00bc26434c765722b82a10497ab06151f15cc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2289771Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#68754}
-
Dominik Inführ authored
Move start of incremental marking out of RefillLinearAllocationAreaFromFreeList. This avoids a potential safepoint while holding allocation_mutex_. Bug: v8:10315 Change-Id: Ieb60ac68f26199eea7b6b7ad6d874851382f3d69 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2287496 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#68751}
-
- 06 Jul, 2020 1 commit
-
-
Ulan Degenbaev authored
The allocation step in FreeLinearAllocationArea may start incremental marking and mark the area to be freed, which breaks the invariant that all blocks in the free list are unmarked. Bug: v8:10679 Tbr: dinfuehr@chromium.org Change-Id: I23b92e402968361b57010a017b382747f7da673d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2282537Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#68694}
-
- 03 Jul, 2020 1 commit
-
-
Dominik Inführ authored
Introduce explicit fast path for allocation in PagedSpace. The slow path is moved into AllocateRawSlow which refills the LAB and retries the allocation. Reland of https://crrev.com/c/2277808, reverted because it broke the MSAN build in https://crrev.com/c/2275969. Bug: v8:10315 Change-Id: I7a3d32525fa12ea672c62f6297c92aaafc3d8157 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2280081Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#68667}
-
- 02 Jul, 2020 2 commits
-
-
Maya Lekova authored
This reverts commit 099b1cf3. Reason for revert: Fails on MSAN - https://ci.chromium.org/p/v8/builders/ci/V8%20Clusterfuzz%20Linux%20MSAN%20no%20origins/16034? Original change's description: > [heap] Introduce fast path in PagedSpace::AllocateRaw > > Introduce explicit fast path for allocation in PagedSpace. The slow path > is moved into AllocateRawSlow which refills the LAB and retries the > allocation. > > Bug: v8:10315 > Change-Id: I807e56ccde833b0e9a42166b4883c1978d01e828 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2277808 > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Cr-Commit-Position: refs/heads/master@{#68653} TBR=ulan@chromium.org,dinfuehr@chromium.org Change-Id: I11ce25da69a24a0a5ccc5e0324d1dfe71cdeaca0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:10315 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2275969Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/master@{#68654}
-
Dominik Inführ authored
Introduce explicit fast path for allocation in PagedSpace. The slow path is moved into AllocateRawSlow which refills the LAB and retries the allocation. Bug: v8:10315 Change-Id: I807e56ccde833b0e9a42166b4883c1978d01e828 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2277808Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#68653}
-
- 18 Jun, 2020 1 commit
-
-
Dan Elphick authored
This reverts commit f78d69fa. With https://chromium-review.googlesource.com/c/v8/v8/+/2243216, incorrect MemoryChunk::FromHeapObject uses are now fixed. Original change's description: > Revert "[heap] Make ReadOnlySpace use bump pointer allocation" > > This reverts commit 81c34968 and also > 490f3580 which depends on the former. > > Reason for revert: Break CFI tests in chromium https://ci.chromium.org/p/chromium/builders/ci/Linux%20CFI/17438 > Original change's description: > > [heap] Make ReadOnlySpace use bump pointer allocation > > > > This changes ReadOnlySpace to no longer be a PagedSpace but instead it > > is now a BaseSpace. BasicSpace is a new base class that Space inherits > > from and which has no allocation methods and does not dictate how the > > pages should be held. > > > > ReadOnlySpace unlike Space holds its pages as a > > std::vector<ReadOnlyPage>, where ReadOnlyPage directly subclasses > > BasicMemoryChunk, meaning they do not have prev_ and next_ pointers and > > cannot be held in a heap::List. This is desirable since with pointer > > compression we would like to remap these pages to different memory > > addresses which would be impossible with a heap::List. > > > > Since ReadOnlySpace no longer uses most of the code from the other > > Spaces it makes sense to simplify its memory allocation to use a simple > > bump pointer and always allocate a new page whenever an allocation > > exceeds the remaining space on the final page. > > > > Change-Id: Iee6d9f96cfb174b4026ee671ee4f897909b38418 > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209060 > > Commit-Queue: Dan Elphick <delphick@chromium.org> > > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#68137} > > TBR=ulan@chromium.org,delphick@chromium.org > > # Not skipping CQ checks because original CL landed > 1 day ago. > > Change-Id: I68c9834872e55eb833be081f8ff99b786bfa9894 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232552 > Commit-Queue: Dan Elphick <delphick@chromium.org> > Reviewed-by: Dan Elphick <delphick@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Cr-Commit-Position: refs/heads/master@{#68211} TBR=ulan@chromium.org,delphick@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: Id5b3cce41b5dec1dca816c05848d183790b1cc05 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2250254Reviewed-by: Dan Elphick <delphick@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#68407}
-
- 17 Jun, 2020 1 commit
-
-
Dan Elphick authored
Since ReadOnlySpace pages will soon not be MemoryChunks, change most uses of MemoryChunk::FromHeapObject and FromAddress to use the BasicMemoryChunk variants and which use the new MemoryChunk::cast function that takes a BasicMemoryChunk and DCHECKs !InReadOnlySpace(). To enable this, it also moves into BasicMemoryChunk several MemoryChunk functions that just require a BasicMemoryChunk. Bug: v8:10454 Change-Id: I80875b2c2446937ac2c2bc9287d36e71cc050c38 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2243216 Commit-Queue: Dan Elphick <delphick@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#68390}
-
- 05 Jun, 2020 1 commit
-
-
Dan Elphick authored
This reverts commit 81c34968 and also 490f3580 which depends on the former. Reason for revert: Break CFI tests in chromium https://ci.chromium.org/p/chromium/builders/ci/Linux%20CFI/17438 Original change's description: > [heap] Make ReadOnlySpace use bump pointer allocation > > This changes ReadOnlySpace to no longer be a PagedSpace but instead it > is now a BaseSpace. BasicSpace is a new base class that Space inherits > from and which has no allocation methods and does not dictate how the > pages should be held. > > ReadOnlySpace unlike Space holds its pages as a > std::vector<ReadOnlyPage>, where ReadOnlyPage directly subclasses > BasicMemoryChunk, meaning they do not have prev_ and next_ pointers and > cannot be held in a heap::List. This is desirable since with pointer > compression we would like to remap these pages to different memory > addresses which would be impossible with a heap::List. > > Since ReadOnlySpace no longer uses most of the code from the other > Spaces it makes sense to simplify its memory allocation to use a simple > bump pointer and always allocate a new page whenever an allocation > exceeds the remaining space on the final page. > > Change-Id: Iee6d9f96cfb174b4026ee671ee4f897909b38418 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209060 > Commit-Queue: Dan Elphick <delphick@chromium.org> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org> > Cr-Commit-Position: refs/heads/master@{#68137} TBR=ulan@chromium.org,delphick@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I68c9834872e55eb833be081f8ff99b786bfa9894 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232552 Commit-Queue: Dan Elphick <delphick@chromium.org> Reviewed-by: Dan Elphick <delphick@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#68211}
-
- 04 Jun, 2020 1 commit
-
-
Dominik Inführ authored
Introduce ParkedMutexGuard which is similar to base::MutexGuard but also parks the LocalHeap while the thread is blocked. Bug: v8:10315 Change-Id: I149673511df013881ed2fbb42cf22d3f9b17b92d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2230518 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#68173}
-
- 03 Jun, 2020 1 commit
-
-
Dan Elphick authored
This changes ReadOnlySpace to no longer be a PagedSpace but instead it is now a BaseSpace. BasicSpace is a new base class that Space inherits from and which has no allocation methods and does not dictate how the pages should be held. ReadOnlySpace unlike Space holds its pages as a std::vector<ReadOnlyPage>, where ReadOnlyPage directly subclasses BasicMemoryChunk, meaning they do not have prev_ and next_ pointers and cannot be held in a heap::List. This is desirable since with pointer compression we would like to remap these pages to different memory addresses which would be impossible with a heap::List. Since ReadOnlySpace no longer uses most of the code from the other Spaces it makes sense to simplify its memory allocation to use a simple bump pointer and always allocate a new page whenever an allocation exceeds the remaining space on the final page. Change-Id: Iee6d9f96cfb174b4026ee671ee4f897909b38418 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2209060 Commit-Queue: Dan Elphick <delphick@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#68137}
-
- 28 May, 2020 1 commit
-
-
Leszek Swirski authored
Make sure that any GCs required for off-thread heap merging happen before any off-thread handle transferring (both transferring using OffThreadTransferHandle, and the handles created for the string slot fixups). This is to avoid the marker from walking Handle roots that point into off-thread pages which the sweeper doesn't see (and can't clear mark bits on) Now, the merging and handle creation is atomic as far as the GC is concerned. The merging is done before handle creation to avoid the incremental marker from entering off-thread pages, but we ensure that the raw objects pointers that point into the off-thread pages (which are used for creating the main-thread handles) stay valid until the handle creation completes. Since handle transfer now happens in the middle of publishing, this patch also moves the OffThreadTransferHandleStorage ownership over to OffThreadHeap. This requires some header juggling to avoid leaking OffThreadTransferHandleStorage into the off-thread-isolate header. Bug: chromium:1086478, chromium:1011762 Change-Id: Id5e7622d6b5520400a4872c5f6ad396c74b30ca6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218058Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Auto-Submit: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#68043}
-
- 20 May, 2020 1 commit
-
-
Dominik Inführ authored
Instead of skipping LAB in PagedSpaceObjectIterator, make the space iterable by inserting a filler object into the LAB. Bug: v8:10315 Change-Id: I6d79c309b7b8180b2a173ebd5ebdf8a893e88c4d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2210234Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#67928}
-
- 19 May, 2020 3 commits
-
-
Dominik Inführ authored
Do not lock mutex for the full duration of the slow path of allocation on background threads. For example sweeping and allocation of a new page is now performed outside of the lock. Bug: v8:10315 Change-Id: Ifee9bc1569d1ec53fdced965bd222dd1eab11b24 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207131Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#67898}
-
Ulan Degenbaev authored
Allocation observers are not thread-safe, so the allocation steps should be invoked only on the main thread. Bug: v8:10536 Change-Id: I90e809fa230d18cce135f4bea67b62ef616ca593 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207189Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#67891}
-
Dominik Inführ authored
Locking the space mutex isn't required in PagedSpace::Expand. Bug: v8:10315 Change-Id: I6fac74e3c4fc6f4f2228af37729839b6ff23bc64 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2207183 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#67889}
-
- 18 May, 2020 2 commits
-
-
Dan Elphick authored
Splits out MemoryAllocator and CodeRangeAddressHint into memory-allocator.h Bug: v8:10473, v8:10506 Change-Id: I0855f23dd0374ddd68493ee05af7a3a00c84660d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2203206 Auto-Submit: Dan Elphick <delphick@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Peter Marshall <petermarshall@chromium.org> Commit-Queue: Peter Marshall <petermarshall@chromium.org> Cr-Commit-Position: refs/heads/master@{#67857}
-
Ulan Degenbaev authored
This moves page post-processinng into NotifyOldGenerationExpansion and introduces a new CanExpandOldGenerationBackground. Bug: v8:10536 Change-Id: I54761226487434955f8a0dadf7c4dbb31c7955e7 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2204283Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#67853}
-