- 09 Jun, 2022 1 commit
-
-
Dominik Inführ authored
CodePageCollectionMemoryModificationScope now increases a per-thread counter and inserts unprotected code chunks into a thread-local set of chunks. This information is moved from Heap into LocalHeap. We can't use kMaxWriteUnprotectCounter on the unprotect counter on the MemoryChunk anymore, since e.g. for concurrent Sparkplug N threads might now allocate a code object on the same page and since CodePageCollectionMemoryModificationScope doesn't know about the other threads anymore, each thread has to increase that counter by 1. We DCHECK that nesting depth now in the scope's constructor instead. We still need to remove chunks from `unprotected_memory_chunks_` when freeing an executable MemoryChunk during GC. Fortunately we can still do this, since all threads are in a safepoint during GC and we can remove the chunk from each thread-local set without any synchronization. Bug: chromium:1330887 Change-Id: Icefc61b8d8de113d8dcfb1cf64122d12dd9798c4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688516Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#81047}
-
- 03 Jun, 2022 1 commit
-
-
Igor Sheludko authored
... when allocating Code objects from background thread. Bug: chromium:1329012, chromium:1330887 Change-Id: Ia2731ba463381c826d14591f4ba3b3fe15d15a0b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3688517 Commit-Queue: Igor Sheludko <ishell@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#80948}
-
- 19 May, 2022 1 commit
-
-
Igor Sheludko authored
... when com.apple.security.cs.allow-jit entitlement is not enabled. Bug: v8:12797, chromium:1324829 Change-Id: I660008e1f8abbac3436dd78ea90937971599b5d0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644960Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#80646}
-
- 17 May, 2022 1 commit
-
-
Nikolaos Papaspyrou authored
This CL removes GCTracer::AssertMainThread and adds the more general methods Heap::IsMainThread and Heap::IsSharedMainThread, to be used in DCHECKs and elsewhere. It also introduces some const qualifiers. Bug: v8:12425 Change-Id: Ibdec39ce77be704598ca0c8b440005dc27bd6997 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3650600Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org> Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/main@{#80586}
-
- 16 May, 2022 1 commit
-
-
Omer Katz authored
SpaceWithLinearArea will holds a ref to a struct containing original_top_ and original_limit_ as well the lock used to sync them for querying IsPendingAllocation. PagedSpace is split into PagedSpaceBase (that holds all funcitonality) and PagedSpace. The actual fields are owned by PagedSpace and NewSpace. This is done in preparation for PagedNewSpace to allow PagedSpaceiBase and NewSpace to share the same original_top_ and original_limit_ fields. Bug: v8:12612 Change-Id: Iefbbd5209c5553db4ee16cb261734e6479e0f23f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644795 Commit-Queue: Omer Katz <omerkatz@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#80549}
-
- 13 May, 2022 1 commit
-
-
Clemens Backes authored
Now that we require C++17 support, we can just use the standard static_assert without message, instead of our STATIC_ASSERT macro. R=leszeks@chromium.org Bug: v8:12425 Change-Id: I1d4e39c310b533bcd3a4af33d027827e6c083afe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647353Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Hannes Payer <hpayer@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#80524}
-
- 12 May, 2022 1 commit
-
-
Omer Katz authored
NewSpace is renamed to SemiSpaceNewSpace and NewSpaceBase is renamed to NewSpace (the new PagedSpace new space implementation will be named PagedNewSpace). Most usecases are updated to use the base class rather than the concrete semi space based implementation. To that end, the base class is extended with additional virtual methods (for delegating to the concrete class). This CL follows these guidelines: (*) If at a method callsite we should know the exact new space implementation we use, we cast to the concrete class. This is the case for example for callsites in scavenger.*. (*) If a method is called from outside the heap implementation or should be present regardless of the concrete implementation, that method is made virtual. (*) Other cases are usually methods that are specific to a concrete implementation but the concrete implementation is not known at the callsite and there's no clear way to nicely abstract the method. In such cases we cast to the concrete SemiSpaceNewSpace implementation for now and we will revisit these cases once PagedNewSpace exists. Bug: v8:12612 Change-Id: I7b85626774ce0d785b0257bf8d32b9f50eeaf292 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3625975 Commit-Queue: Omer Katz <omerkatz@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#80482}
-
- 28 Apr, 2022 1 commit
-
-
Igor Sheludko authored
This is a reland of commit 9d31f866 There were issues with --future flag implications on M1. Original change's description: > [rwx][mac] Support fast W^X permission switching on Apple Silicon (M1) > > ... for V8 code space. The feature is currently disabled. > > In order to use fast W^X permission switching we must allocate > executable pages with readable writable executable permissions (RWX). > However, MacOS on ARM64 ("Apple M1"/Apple Silicon) prohibits further > permission changing of RWX memory pages. This means that the code page > headers must be allocated with RWX permissions too because otherwise > it wouldn't be possible to allocate a large code page over the freed > regular code page and vice versa. > > When enabled, the new machinery works as follows: > > 1) when memory region is reserved for allocating executable pages, the > whole region is committed with RWX permissions and then decommitted, > 2) since reconfiguration of RWX page permissions is not allowed on > MacOS on ARM64 ("Apple M1"/Apple Silicon), there must be no attempts > to change them, > 3) the request to set RWX permissions in the executable page region > just recommits the pages without changing permissions (see (1), they > were already allocated as RWX and then discarded), > 4) in order to make executable pages inaccessible one must use > OS::DiscardSystemPages() instead of OS::DecommitPages() or > setting permissions to kNoAccess because the latter two are not > allowed by the MacOS (see (2)). > 5) since code space page headers are allocated as RWX pages it's also > necessary to switch between W^X modes when updating the data in the > page headers (i.e. when marking, updating stats, wiring pages in > lists, etc.). The new CodePageHeaderModificationScope class is used > in the respective places. On unrelated configurations it's a no-op. > > The fast permission switching can't be used for V8 configuration with > enabled pointer compression and disabled external code space because > a) the pointer compression cage has to be reserved with MAP_JIT flag > which is too expensive, > b) in case of shared pointer compression cage if the code range will > be deleted while the cage is still alive then attempt to configure > permissions of pages that were previously set to RWX will fail. > > This also CL extends the unmapper unit tests with permissions tracking > for discarded pages. > > Bug: v8:12797 > Change-Id: Idb28cbc481306477589eee9962d2e75167d87c61 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3579303 > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Commit-Queue: Igor Sheludko <ishell@chromium.org> > Cr-Commit-Position: refs/heads/main@{#80238} Bug: v8:12797 Change-Id: I0fe86666f31bad37d7074e217555c95900d2afba Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3610433Reviewed-by:
Nico Hartmann <nicohartmann@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Reviewed-by:
Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#80259}
-
- 27 Apr, 2022 2 commits
-
-
Adam Klein authored
This reverts commit 9d31f866. Reason for revert: crashes on Mac/arm64 bots: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20debug/5923/overview Original change's description: > [rwx][mac] Support fast W^X permission switching on Apple Silicon (M1) > > ... for V8 code space. The feature is currently disabled. > > In order to use fast W^X permission switching we must allocate > executable pages with readable writable executable permissions (RWX). > However, MacOS on ARM64 ("Apple M1"/Apple Silicon) prohibits further > permission changing of RWX memory pages. This means that the code page > headers must be allocated with RWX permissions too because otherwise > it wouldn't be possible to allocate a large code page over the freed > regular code page and vice versa. > > When enabled, the new machinery works as follows: > > 1) when memory region is reserved for allocating executable pages, the > whole region is committed with RWX permissions and then decommitted, > 2) since reconfiguration of RWX page permissions is not allowed on > MacOS on ARM64 ("Apple M1"/Apple Silicon), there must be no attempts > to change them, > 3) the request to set RWX permissions in the executable page region > just recommits the pages without changing permissions (see (1), they > were already allocated as RWX and then discarded), > 4) in order to make executable pages inaccessible one must use > OS::DiscardSystemPages() instead of OS::DecommitPages() or > setting permissions to kNoAccess because the latter two are not > allowed by the MacOS (see (2)). > 5) since code space page headers are allocated as RWX pages it's also > necessary to switch between W^X modes when updating the data in the > page headers (i.e. when marking, updating stats, wiring pages in > lists, etc.). The new CodePageHeaderModificationScope class is used > in the respective places. On unrelated configurations it's a no-op. > > The fast permission switching can't be used for V8 configuration with > enabled pointer compression and disabled external code space because > a) the pointer compression cage has to be reserved with MAP_JIT flag > which is too expensive, > b) in case of shared pointer compression cage if the code range will > be deleted while the cage is still alive then attempt to configure > permissions of pages that were previously set to RWX will fail. > > This also CL extends the unmapper unit tests with permissions tracking > for discarded pages. > > Bug: v8:12797 > Change-Id: Idb28cbc481306477589eee9962d2e75167d87c61 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3579303 > Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> > Reviewed-by: Clemens Backes <clemensb@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Commit-Queue: Igor Sheludko <ishell@chromium.org> > Cr-Commit-Position: refs/heads/main@{#80238} Bug: v8:12797 Change-Id: Ic07948e036db36326d464a2a901d052aa060a406 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3611665 Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/main@{#80239}
-
Igor Sheludko authored
... for V8 code space. The feature is currently disabled. In order to use fast W^X permission switching we must allocate executable pages with readable writable executable permissions (RWX). However, MacOS on ARM64 ("Apple M1"/Apple Silicon) prohibits further permission changing of RWX memory pages. This means that the code page headers must be allocated with RWX permissions too because otherwise it wouldn't be possible to allocate a large code page over the freed regular code page and vice versa. When enabled, the new machinery works as follows: 1) when memory region is reserved for allocating executable pages, the whole region is committed with RWX permissions and then decommitted, 2) since reconfiguration of RWX page permissions is not allowed on MacOS on ARM64 ("Apple M1"/Apple Silicon), there must be no attempts to change them, 3) the request to set RWX permissions in the executable page region just recommits the pages without changing permissions (see (1), they were already allocated as RWX and then discarded), 4) in order to make executable pages inaccessible one must use OS::DiscardSystemPages() instead of OS::DecommitPages() or setting permissions to kNoAccess because the latter two are not allowed by the MacOS (see (2)). 5) since code space page headers are allocated as RWX pages it's also necessary to switch between W^X modes when updating the data in the page headers (i.e. when marking, updating stats, wiring pages in lists, etc.). The new CodePageHeaderModificationScope class is used in the respective places. On unrelated configurations it's a no-op. The fast permission switching can't be used for V8 configuration with enabled pointer compression and disabled external code space because a) the pointer compression cage has to be reserved with MAP_JIT flag which is too expensive, b) in case of shared pointer compression cage if the code range will be deleted while the cage is still alive then attempt to configure permissions of pages that were previously set to RWX will fail. This also CL extends the unmapper unit tests with permissions tracking for discarded pages. Bug: v8:12797 Change-Id: Idb28cbc481306477589eee9962d2e75167d87c61 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3579303Reviewed-by:
Nico Hartmann <nicohartmann@chromium.org> Reviewed-by:
Clemens Backes <clemensb@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#80238}
-
- 24 Feb, 2022 1 commit
-
-
Michael Lippautz authored
Avoid going through Heap but rather call it directly on the allocator. Bug: v8:12615 Change-Id: I395b96d08b685c63c4125245a76c3610acf1643b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3485677Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79260}
-
- 23 Feb, 2022 3 commits
-
-
Michael Lippautz authored
This is a reland of dec62c2d Revert was not necessary as test was independently flaking. Original change's description: > heap: Factor out raw allocation functions into HeapAllocator > > This CL is mostly mechanic and provides runtime and static > dispatch for allocation of objects using HeapAllocator. > > Future CLs will remove the Heap bottelenecks. > > Bug: v8:12615 > Change-Id: Id2becf7da4bd5273f96abc0e1a4ac6c04bddb1cb > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3474674 > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Commit-Queue: Michael Lippautz <mlippautz@chromium.org> > Cr-Commit-Position: refs/heads/main@{#79229} Bug: v8:12615 Change-Id: I505ebde7afd2b0d03e11ef4cbcf1d4d09c6826a1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3484322 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Auto-Submit: Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#79236}
-
Tobias Tebbi authored
This reverts commit dec62c2d. Reason for revert: bot failures Original change's description: > heap: Factor out raw allocation functions into HeapAllocator > > This CL is mostly mechanic and provides runtime and static > dispatch for allocation of objects using HeapAllocator. > > Future CLs will remove the Heap bottelenecks. > > Bug: v8:12615 > Change-Id: Id2becf7da4bd5273f96abc0e1a4ac6c04bddb1cb > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3474674 > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Commit-Queue: Michael Lippautz <mlippautz@chromium.org> > Cr-Commit-Position: refs/heads/main@{#79229} Bug: v8:12615 Change-Id: I55bf6c6a857d853462b11251e767c44fc6fa2edd No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3483665 Auto-Submit: Tobias Tebbi <tebbi@chromium.org> Owners-Override: Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Cr-Commit-Position: refs/heads/main@{#79231}
-
Michael Lippautz authored
This CL is mostly mechanic and provides runtime and static dispatch for allocation of objects using HeapAllocator. Future CLs will remove the Heap bottelenecks. Bug: v8:12615 Change-Id: Id2becf7da4bd5273f96abc0e1a4ac6c04bddb1cb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3474674Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79229}
-
- 18 Feb, 2022 1 commit
-
-
Dominik Inführ authored
Now that we are able to compact map space, we can also get rid of the map space and allocate maps in the old space instead. This CL introduces a FLAG_map_space for enabling/disabling the map space but the map space remains enabled by default for now. Without a separate space for maps, the GC can't prevent relocation of maps anymore. Therefore this CL always allows compaction of maps when running without a map space. Rename flag to --compact-maps to better fit this scenario. mkgrokdump and debug_helper also need to be updated to look for maps also in the old space. The map space is now optional. Bug: v8:12578 Change-Id: Ic4e4abd0b58bee26e64329b1c92dbccb07d8105a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3424483Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Seth Brenith <seth.brenith@microsoft.com> Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#79165}
-
- 17 Feb, 2022 1 commit
-
-
Michael Lippautz authored
There's only a single callsite that performs retries after allocations which already can determine the proper GC to invoke without requiring threading the space backwards. Bug: v8:12615 Change-Id: I5d5d886162b3eca33eb2fe7bde1e113cd08a094c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3468905Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79143}
-
- 14 Feb, 2022 1 commit
-
-
Michael Lippautz authored
Allows separating out the allocator from Heap without requiring a heap.h include. Drive-by: - Rename "Retry" to "Failure". - Avoid implicit constructors. - Rename "RetrySpace" to "GarbageCollectionSpace" which is its only use. Bug: v8:12615 Change-Id: Idac17cded8f0b2b645a2be9045ab31ffd71999b3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3456562Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79063}
-
- 11 Feb, 2022 2 commits
-
-
Michael Lippautz authored
- Both paths are now inlined. - Outline large object allocation, shrinking trampoline a bit. - Support a fast path for AllocationType::kOld from AllocateRawWith(). Bug: v8:12615, chromium:1293284 Change-Id: I8f0b9aabc6fe47e1eee159c214403ccffea5eeab Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3456082Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79048}
-
Michael Lippautz authored
The flag has been turned on for a long time and we do not intend to support a mode without young LO objects. A side effect is that it removes a branch in AllocateRaw for the young generation. Drive-by: Reinstantiate the LO space verifier checking that only certain types can appear as large objects. Bug: v8:12615 Change-Id: I8c33019a04670f20459ea2faa9dc2f98b8cda40b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3450420Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79044}
-
- 09 Feb, 2022 1 commit
-
-
Michael Lippautz authored
Move on-allocation and on-move events to a designated tracker that is only installed when running with debugging flags. This eliminates a bunch of flag checks as they are all moved behind the allocation trackers. Bug: v8:12615 Change-Id: Ied6819991511328351825e2341375c36ae34916b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3450419Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79014}
-
- 26 Jan, 2022 1 commit
-
-
Igor Sheludko authored
1) when generating short builtin calls/jumps assemblers should use the offset from the CodeRange base rather than the start of the code range reservation because otherwise it's not guaranteed that the PC-relative offset will fit into architecture's constraints. The code range reservation start could be different from the code range base in the following cases: * when the "base bias size" is non-zero (on Windows 64), * when we ended up over-reserving the address space for the code range, which happens as a last resort to fulfil the CodeRange alignment requirements. See the VirtualMemoryCage description for details. Drive-by fixes: 2) in case of over-reserving address space for external code range, the pre-calculated hint for where the remapped embedded builtins should be copied to was outside of the allocatable CodeRange region and thus useless. The fix is to use the allocatable region instead of the reservation region when calculating the hint. 3) when allocating CodeRange with zero base bias size we can create the VirtualMemory reservation from the first attempt simply by passing the required base alignment to the VirtualMemory constructor. Bug: v8:11880, chromium:1290591 Change-Id: If341418947e2170d967e22b38bcc371594939c1c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3412089Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#78772}
-
- 12 Jan, 2022 1 commit
-
-
Nikolaos Papaspyrou authored
This CL contains minor refactorings to some parts of the garbage collector: - Space iterators. - Removes a redundant call to Heap::CreateFillerObjectAt. - Heap::CompleteSweepingFull now ensures that sweeping in the C++ managed heap is also completed. - Checks, comments and code cleanup. Change-Id: I14a7fe45c270c463c94c86f45b0e65757249d548 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3377125Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org> Cr-Commit-Position: refs/heads/main@{#78581}
-
- 22 Nov, 2021 1 commit
-
-
Dominik Inführ authored
This is a reland of 90a9d6cb The original CL got reverted because of two different issues: * The DCHECK failure on AllowGarbageCollection::IsAllowed() got fixed in https://crrev.com/c/3289625. * The crash with the incremental marking job were because of a nested GC started from a SafepointScope. This CL adds IgnoreLocalGCRequests scopes to SafepointScopes in src/heap. In addition this CL prevents shared GCs during isolate deserialization by locking the clients_mutex_ until the isolate is fully deserialized. The original GC used a DisallowSafepoints scope to prevent shared GCs from interrupting isolate deserialization. Original change's description: > [heap] Support multiple clients in shared GC > > Add support for safepointing multiple isolates as described in the > design doc (link is below). A safepoint across multiple isolates is > considered a global safepoint to distinguish it from regular safepoints. > > The basic idea behind the implementation is that we reach a > safepoint for each client. What's new is that now also main threads > need to participate in the safepointing protocol and need to give up > control in time. The slow paths of Park(), Unpark() and Safepoint() on > the main thread need to be adjusted for this reason as well. > > This CL introduces GlobalSafepoint and GlobalSafepointScope to mirror > IsolateSafepoint and IsolateSafepointScope. > > This CL adds the type IgnoreLocalGCRequests, it is used to prevent > Park() and Unpark() from honoring the request from background threads > to perform a local GC. This is used heap-internally to not have GCs > (or even nested GCs) in certain locations. E.g. when initiating a > safepoint to perform a GC we don't want a "recursive" GC to occur. > > Design doc: https://docs.google.com/document/d/1y6C9zAACEr0sBYMIYk3YpXosnkF3Ak4CEuWJu1-3zXs/edit?usp=sharing > > Bug: v8:11708 > Change-Id: I5aca8f5f24873279271a53be3bb093fc92a1a1eb > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3009224 > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Cr-Commit-Position: refs/heads/main@{#77812} Bug: v8:11708, v8:12375, v8:12377 Change-Id: I9d1af6fbc06a3a8b6f216ec5e9027665ad071809 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3283067 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#78013}
-
- 16 Nov, 2021 1 commit
-
-
Igor Sheludko authored
Also introduce USE_ALLOCATION_ALIGNMENT_BOOL constant which is true only for those configurations that require aligned allocations and use it for statically falling back to unaligned allocations on those configurations that do not require aligned allocations. This is a prerequisite for introducing the real kWordAligned mode for kSystemPointerSize aligned allocations. Bug: v8:8875 Change-Id: I155d12435f344324bc1bf19da88ee823c8f2ca6c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3283064Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#77918}
-
- 11 Nov, 2021 2 commits
-
-
Victor Gomes authored
The check is a simple shortcut, but this is not safe in multithreading. In a multi-threaded situation, if a CodePageCol**Scope is open while a CodeSpaceMem**Scope is already opened, the result is a noop. If the latter finishes first, then we would decrement a wrong depth in ~CodePageCollectionMemoryModificationScope. Bug: v8:12054 Change-Id: I7e1016628ffbd37b343ea130eb8d7d8e60abec98 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3275562Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Victor Gomes <victorgomes@chromium.org> Cr-Commit-Position: refs/heads/main@{#77849}
-
Dominik Inführ authored
This reverts commit 90a9d6cb. Reason for revert: Seems to make some test to fail flakily. Revert for now until this is fixed. Original change's description: > [heap] Support multiple clients in shared GC > > Add support for safepointing multiple isolates as described in the > design doc (link is below). A safepoint across multiple isolates is > considered a global safepoint to distinguish it from regular safepoints. > > The basic idea behind the implementation is that we reach a > safepoint for each client. What's new is that now also main threads > need to participate in the safepointing protocol and need to give up > control in time. The slow paths of Park(), Unpark() and Safepoint() on > the main thread need to be adjusted for this reason as well. > > This CL introduces GlobalSafepoint and GlobalSafepointScope to mirror > IsolateSafepoint and IsolateSafepointScope. > > This CL adds the type IgnoreLocalGCRequests, it is used to prevent > Park() and Unpark() from honoring the request from background threads > to perform a local GC. This is used heap-internally to not have GCs > (or even nested GCs) in certain locations. E.g. when initiating a > safepoint to perform a GC we don't want a "recursive" GC to occur. > > Design doc: https://docs.google.com/document/d/1y6C9zAACEr0sBYMIYk3YpXosnkF3Ak4CEuWJu1-3zXs/edit?usp=sharing > > Bug: v8:11708 > Change-Id: I5aca8f5f24873279271a53be3bb093fc92a1a1eb > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3009224 > Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> > Reviewed-by: Jakob Gruber <jgruber@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Cr-Commit-Position: refs/heads/main@{#77812} # Not skipping CQ checks because original CL landed > 1 day ago. Bug: v8:11708 Change-Id: I85fbf896c59492fc571b3bfaa7f9e3ea8a883260 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3275552 Auto-Submit: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#77845}
-
- 10 Nov, 2021 1 commit
-
-
Dominik Inführ authored
Add support for safepointing multiple isolates as described in the design doc (link is below). A safepoint across multiple isolates is considered a global safepoint to distinguish it from regular safepoints. The basic idea behind the implementation is that we reach a safepoint for each client. What's new is that now also main threads need to participate in the safepointing protocol and need to give up control in time. The slow paths of Park(), Unpark() and Safepoint() on the main thread need to be adjusted for this reason as well. This CL introduces GlobalSafepoint and GlobalSafepointScope to mirror IsolateSafepoint and IsolateSafepointScope. This CL adds the type IgnoreLocalGCRequests, it is used to prevent Park() and Unpark() from honoring the request from background threads to perform a local GC. This is used heap-internally to not have GCs (or even nested GCs) in certain locations. E.g. when initiating a safepoint to perform a GC we don't want a "recursive" GC to occur. Design doc: https://docs.google.com/document/d/1y6C9zAACEr0sBYMIYk3YpXosnkF3Ak4CEuWJu1-3zXs/edit?usp=sharing Bug: v8:11708 Change-Id: I5aca8f5f24873279271a53be3bb093fc92a1a1eb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3009224 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#77812}
-
- 09 Nov, 2021 1 commit
-
-
Victor Gomes authored
This is a reland of ef62cd06 Original change's description: > [heap] Remove executable_memory_ from release code > > The map is only used to check invariants. > > Bug: v8:12054 > Change-Id: I7d067cca801c9b6104efb22a26cf27f1f62920c5 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3268286 > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Commit-Queue: Victor Gomes <victorgomes@chromium.org> > Cr-Commit-Position: refs/heads/main@{#77766} Bug: v8:12054 Change-Id: I2a699d1db4c1ed5a2881a1ccd9dd3b36b20ea8e5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3268303 Commit-Queue: Victor Gomes <victorgomes@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#77786}
-
- 08 Nov, 2021 3 commits
-
-
Leszek Swirski authored
This reverts commit ef62cd06. Reason for revert: Fails mjsunit/wasm/grow-memory (https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket/8831118281610576833/+/u/Check/grow-memory) Original change's description: > [heap] Remove executable_memory_ from release code > > The map is only used to check invariants. > > Bug: v8:12054 > Change-Id: I7d067cca801c9b6104efb22a26cf27f1f62920c5 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3268286 > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Commit-Queue: Victor Gomes <victorgomes@chromium.org> > Cr-Commit-Position: refs/heads/main@{#77766} Bug: v8:12054 Change-Id: I95af58404719855664a128047ed32e8022dd5dd3 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3268300 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Owners-Override: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#77767}
-
Victor Gomes authored
The map is only used to check invariants. Bug: v8:12054 Change-Id: I7d067cca801c9b6104efb22a26cf27f1f62920c5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3268286Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Victor Gomes <victorgomes@chromium.org> Cr-Commit-Position: refs/heads/main@{#77766}
-
Victor Gomes authored
This is an unecessary boolean, that makes reason about the code more complicated. Bug: v8:12054 Change-Id: I5bdf2069ead427f53ce774e825fe9656e668480e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3268284 Commit-Queue: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Auto-Submit: Victor Gomes <victorgomes@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#77765}
-
- 05 Nov, 2021 1 commit
-
-
Victor Gomes authored
CodeSpaceMemoryModificationScope should only be used by the main thread and during a safepoint. This adds a check in CodeSpaceMemoryModificationScope. The reason for this is that CodeSpaceMemoryModificationScope is not thread-safe. It assumes that no other thread is modifying code space (either by setting memory permission or adding a new page). This CL also replaces CodeSpaceMemoryModificationScope to CodePageCollectionMemoryModificationScope in a few occurrences, where the former is not needed. This should not hurt performance. Bug: v8:12054 Change-Id: I2675e667782c6ad8410877a4e64374899066bcd1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3263890 Commit-Queue: Victor Gomes <victorgomes@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#77732}
-
- 27 Oct, 2021 1 commit
-
-
Igor Sheludko authored
... to Builtins class. Bug: v8:12244, v8:11880 Change-Id: Ia96e476b904618b5fc45d2e401cedc2f67e36e7d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3245346Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#77571}
-
- 20 Oct, 2021 1 commit
-
-
JianxiaoLuIntel authored
Bug: v8:12305 Change-Id: Ibc71e864bfb19c720d4cecf61f1254402859db6b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3215100Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#77477}
-
- 11 Oct, 2021 1 commit
-
-
Shu-yu Guo authored
When --shared-string-table is passed, in-place-internalizable strings are promoted into the shared old space to maintain the invariant that in-place internalization can be done without copying. Also some drive-by comment fixes and removal of unnecessary 'explicit' on multi-parameter constructors. Bug: v8:12007 Change-Id: I467d865e41934b1d5cdf85cbecc85c4befbfeb21 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3193591 Auto-Submit: Shu-yu Guo <syg@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Jakob Gruber <jgruber@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#77326}
-
- 27 Sep, 2021 1 commit
-
-
Igor Sheludko authored
... an ObjectVisitor subclass that takes care of caching values of both the main pointer compression cage base and code cage base (when the external code space is enabled). Drive-by: this CL also changes signature of RelocInfo::target_object_no_host(...) to accept PtrComprCageBase instead of Isolate*. Bug: v8:11880 Change-Id: I3fbb382e0a0170e28542bc495d8fecfd24da8a07 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3182231 Commit-Queue: Igor Sheludko <ishell@chromium.org> Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#77088}
-
- 23 Sep, 2021 1 commit
-
-
Dominik Inführ authored
SetCodeModificationPermissions better reflects its current usage. Change-Id: Ia9b42328a2d467613736878e2b560e0d5282ad3f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3173674Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#77015}
-
- 05 Aug, 2021 1 commit
-
-
Mythri A authored
There was a DCHECK to ensure tests don't miss enabling either bytecode or baseline code flushing along with stress-flush-code. Fuzzers use different combination of flags so there we should allow stress-flush-code without bytecode / baseline code flushing. Bug: chromium:1236614,v8:11947 Change-Id: I86190b6336015e37288cffffc05de2fa21f496ad Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3074462 Commit-Queue: Mythri Alle <mythria@chromium.org> Commit-Queue: Omer Katz <omerkatz@chromium.org> Auto-Submit: Mythri Alle <mythria@chromium.org> Reviewed-by:
Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/master@{#76115}
-
- 04 Aug, 2021 1 commit
-
-
Mythri A authored
Add support to flush only baseline code. FLAG_flush_baseline_code controls if baseline code is flushed or not and FLAG_flush_bytecode controls if bytecode is flushed or not. With this CL it is possible to control if we want to flush only bytecode / only baseline code / both. This also lets us have different heuristics for bytecode and baseline code flushing. Bug: v8:11947 Change-Id: Ibdfb9d8be7e7d54196db7890541fa0b5d84f037e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3060481Reviewed-by:
Omer Katz <omerkatz@chromium.org> Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Commit-Queue: Mythri Alle <mythria@chromium.org> Cr-Commit-Position: refs/heads/master@{#76075}
-
- 02 Aug, 2021 1 commit
-
-
Mythri A authored
stress_flush_bytecode controls stress flushing of both bytecode and baseline code. So rename the flag to better reflect its functionality Bug: v8:11947 Change-Id: Ie6c124a476c3a7c6eabd1d75de030ee15fe78e32 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3062567 Commit-Queue: Mythri Alle <mythria@chromium.org> Reviewed-by:
Michael Achenbach <machenbach@chromium.org> Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/master@{#76043}
-