- 05 Sep, 2022 3 commits
-
-
Leon Bettscheider authored
This CL implements ConcurrentMarking::RunMinor which uses YoungGenerationConcurrentMarkingVisitor (go/YGCMV). This CL also implements Teardown and FinishConcurrentMarking, and schedules minor concurrent marking in IncrementalMarking::StartMarkingMinor. Additionally, this CL opts out of ConcurrentMarking::PauseScope in Heap::MinorMarkCompact if concurrent MinorMC is active because concurrent marking will be finalized in FinishConcurrentMarking subsequentially. Bug: v8:13012 Change-Id: I78fe18416e564565c6421243ff40dec7561fb20a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3850292 Commit-Queue: Leon Bettscheider <bettscheider@google.com> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#82978}
-
Clemens Backes authored
Avoid the deprecated FLAG_* syntax, access flag values via the {v8_flags} struct instead. R=mlippautz@chromium.org Bug: v8:12887 Change-Id: Id12f9d8270dd9fed651e1b3596c06e45aae9d6d1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3846151Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Auto-Submit: Clemens Backes <clemensb@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#82969}
-
wenqin.yang authored
This CL adds PKU support for V8 heap, but we will not enable PKU by default before adding bots that are able to test the PKU machinery. Bug: v8:13023 Change-Id: I0465604d56900536ad63311f119ea0324ebe4f2f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3793944Reviewed-by: Omer Katz <omerkatz@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Wenqin Yang <wenqin.yang@intel.com> Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#82965}
-
- 01 Sep, 2022 2 commits
-
-
Leon Bettscheider authored
This CL renames ConcurrentMarking::JobTask to JobTaskMajor, adds JobTaskMinor, and makes ScheduleJob branch to schedule the respective JobTask depending on its GarbageCollector parameter. Bug: v8:13012 Change-Id: Ic7ab15ba70f7d4e86c94a6824623c258aa8b739c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3850482Reviewed-by: Omer Katz <omerkatz@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Leon Bettscheider <bettscheider@google.com> Cr-Commit-Position: refs/heads/main@{#82913}
-
Leon Bettscheider authored
This CL removes the marking_worklists parameter from the ConcurrentMarking constructor, and instead sets marking_worklists_ in ScheduleJob based on the new GarbageCollector parameter. We will use the ConcurrentMarking class for both major and minor marking later, and this CL does preparatory work for that by allowing to change the mode of operation (minor/major) through ScheduleJob. Bug: v8:13012 Change-Id: I44a35155cf19e1df139a6a4e5bc5cbedbc3e00aa Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3850289 Commit-Queue: Leon Bettscheider <bettscheider@google.com> Reviewed-by: Omer Katz <omerkatz@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#82910}
-
- 25 Aug, 2022 1 commit
-
-
Dominik Inführ authored
ThinStrings are not transitioned to other string representations, so we shouldn't need the snapshotting protocol for them. Change-Id: I17cee1a4171b10c441a005ac29bd232a0a065207 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3852489Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#82727}
-
- 22 Aug, 2022 2 commits
-
-
Michael Lippautz authored
Per-context mode marking segregates worklists per context. Upon doing so, Worklist::Local's move ctor was invoked which cleared the back pointer to worklist. This break switching to that context which happens in rare secnarios. Rework Local marking worklists avoiding the move ctor which is also removed. Bug: chromium:1355545 Change-Id: If0e8c7f08df564b2a1e27e4a3fc5a6a40e46ee46 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3845630 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#82636}
-
Shu-yu Guo authored
The concurrent marker needs an override for JSObject subclasses with their own visitor id and body descriptor. Implement the missing VisitJSSynchronizationPrimitive. Bug: v8:13214 Change-Id: Ie4f64e2b4e9b211f9661da75bf8d2d012f8d16ac Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3846320Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Auto-Submit: Shu-yu Guo <syg@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#82634}
-
- 09 Aug, 2022 1 commit
-
-
Omer Katz authored
Mark objects as grey when pushing to worklist and mark as black when objects are visited. Bug: v8:12612 Change-Id: I5ad28c4481052f41588f43dc39dd44f132a27dfb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3810467 Commit-Queue: Omer Katz <omerkatz@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#82290}
-
- 01 Aug, 2022 1 commit
-
-
Leon Bettscheider authored
This CL fixes issues in YoungGenerationConcurrentMarkingVisitor (YGCMV) that were discovered during an offline integration test which uses YGCMV during MinorMC's final pause. This also adds PopOnHold() to EmptyMarkingWorklist, in order to process on-hold objects during final pause once concurrent marking is working. Bug: v8:13012 Change-Id: Ia4fef101bd974de9f5b031974cdae787dcbd3819 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3803030 Commit-Queue: Leon Bettscheider <bettscheider@google.com> Reviewed-by: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#82116}
-
- 26 Jul, 2022 2 commits
-
-
Leon Bettscheider authored
Similar to the FullGC marking hierarchy (MarkingVisitorBase, with derived classes MainMarkingVisitor and ConcurrentMarkingVisitor), this CL introduces YoungGenerationMarkingVisitorBase + YoungGenerationConcurrentMarkingVisitor, and refactors YoungGenerationMarkingVisitor to inherit from YoungGenerationMarkingVisitorBase. YoungGenerationConcurrentMarkingVisitor dispatches to functions refactored to ConcurrentMarkingVisitorUtility by the previous CL. Bug: v8:13012 Change-Id: I0e827eb95732ed9ddf027fe68e25a0839cdda773 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3780524Reviewed-by: Omer Katz <omerkatz@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Leon Bettscheider <bettscheider@google.com> Cr-Commit-Position: refs/heads/main@{#81976}
-
Leon Bettscheider authored
This is a reland of commit 6925bc09 Original change's description: > [heap] Refactor methods and nested class of ConcurrentMarkingVisitor > > This CL moves a few methods and nested class SlotSnapshottingVisitor > from ConcurrentMarkingVisitor to ConcurrentMarkingVisitorUtility. > > Methods in ConcurrentMarkingVisitorUtility are now static and instead have a Visitor parameter. > > This is preparatory work for adding a > YoungGenerationConcurrentMarkingVisitor class, which will be able to > reuse members of ConcurrentMarkingVisitorUtility. > > Bug: v8:13012 > Change-Id: I503c20e655578031018a2e37dd92c1d61bbe1686 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779677 > Commit-Queue: Leon Bettscheider <bettscheider@google.com> > Reviewed-by: Omer Katz <omerkatz@chromium.org> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Cr-Commit-Position: refs/heads/main@{#81931} Bug: v8:13012 Change-Id: I05063263d831ef4f3e297289e4210850029f7607 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3780500Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Leon Bettscheider <bettscheider@google.com> Cr-Commit-Position: refs/heads/main@{#81953}
-
- 25 Jul, 2022 2 commits
-
-
Deepti Gandluri authored
This reverts commit 6925bc09. Reason for revert: Speculative revert for roll failures: https://ci.chromium.org/ui/p/chromium/builders/try/linux_optional_gpu_tests_rel/85744/overview Original change's description: > [heap] Refactor methods and nested class of ConcurrentMarkingVisitor > > This CL moves a few methods and nested class SlotSnapshottingVisitor > from ConcurrentMarkingVisitor to ConcurrentMarkingVisitorUtility. > > Methods in ConcurrentMarkingVisitorUtility are now static and instead have a Visitor parameter. > > This is preparatory work for adding a > YoungGenerationConcurrentMarkingVisitor class, which will be able to > reuse members of ConcurrentMarkingVisitorUtility. > > Bug: v8:13012 > Change-Id: I503c20e655578031018a2e37dd92c1d61bbe1686 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779677 > Commit-Queue: Leon Bettscheider <bettscheider@google.com> > Reviewed-by: Omer Katz <omerkatz@chromium.org> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Cr-Commit-Position: refs/heads/main@{#81931} Bug: v8:13012 Change-Id: If2240b2e0769b04d752caefceb95609c6b950bb2 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3787373 Owners-Override: Deepti Gandluri <gdeepti@chromium.org> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Deepti Gandluri <gdeepti@chromium.org> Cr-Commit-Position: refs/heads/main@{#81945}
-
Leon Bettscheider authored
This CL moves a few methods and nested class SlotSnapshottingVisitor from ConcurrentMarkingVisitor to ConcurrentMarkingVisitorUtility. Methods in ConcurrentMarkingVisitorUtility are now static and instead have a Visitor parameter. This is preparatory work for adding a YoungGenerationConcurrentMarkingVisitor class, which will be able to reuse members of ConcurrentMarkingVisitorUtility. Bug: v8:13012 Change-Id: I503c20e655578031018a2e37dd92c1d61bbe1686 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779677 Commit-Queue: Leon Bettscheider <bettscheider@google.com> Reviewed-by: Omer Katz <omerkatz@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#81931}
-
- 14 Jul, 2022 1 commit
-
-
JianxiaoLuIntel authored
See details at https://groups.google.com/g/v8-dev/c/H3YXXKoauLI Change-Id: Ibe255e95bfd1d09a115eb04d6cbfcca7a671d900 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3756729Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Jianxiao Lu <jianxiao.lu@intel.com> Reviewed-by: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#81709}
-
- 11 Jul, 2022 1 commit
-
-
Omer Katz authored
SynchronizePageAccess is used to synchronize between page initialization and reads from that page. It was not used for main thread reads because it was assumed that all pages are initialized on the main thread. With concurrent allocations, pages may be concurrently initialized, thus requiring a fence for main threads reads as well. Bug: v8:13041 Change-Id: I93e5162243ef5458579f239b131094d7171e8615 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3752804Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#81630}
-
- 30 Jun, 2022 1 commit
-
-
Omer Katz authored
MinorMC maintained a separate marking state to support interleaved GCs. Since MinorMC now assumes that interleaving is not possible, MinorMC can use the same marking state as the full GC. Bug: v8:12612 Change-Id: Ibeb7df2eb24e448f811b497c9d16b3b132f87ec2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3735163Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#81468}
-
- 01 Jun, 2022 1 commit
-
-
Omer Katz authored
MinorMC only used a single color (grey) while the full MC used 2 colors (grey and black). Update MinorMC to use black as well. This aligns and brings full MC and MinorMC closer, and allows to reuse more of the existing sweeping infrastructure for the non-moving MinorMC. Bug: v8:12612 Change-Id: Ifa740537c4587dc197196e41829ea74a312b79d0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3683320Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#80894}
-
- 23 May, 2022 1 commit
-
-
Nikolaos Papaspyrou authored
Mostly in comments, again, not much to be said... Bug: v8:12425 Change-Id: If0890132606b5ae8d5e173907bfdc063b9811ac6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3657428Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org> Cr-Commit-Position: refs/heads/main@{#80689}
-
- 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}
-
- 13 Apr, 2022 1 commit
-
-
Nikolaos Papaspyrou authored
Tracer scopes are used in numerous places in src/heap to track time spent during various phases of the garbage collection. Usually, they are introduced with the TRACE_GC* family of macros, taking the scope identifier as a parameter. At most call sites, the scope identifier is known at compile time. This CL inlines the constructor and destructor of GCTracer::Scope, in order to enable the C++ compiler to properly optimize the introduction of such scopes when the scope identifier is known at compile time, using constant propagation. This is expected to have a performance impact for short-lived and frequently used scopes, e.g., in incremental marking and sweeping steps. Change-Id: I6f1a2954a437de1fa6dab5e464c20c952d84ffd4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3581774Reviewed-by: Omer Katz <omerkatz@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Nikolaos Papaspyrou <nikolaos@chromium.org> Cr-Commit-Position: refs/heads/main@{#79957}
-
- 14 Mar, 2022 1 commit
-
-
Samuel Groß authored
Instead of implementing ExternalObjects as plain JSObjects with a single EmbedderDataSlot pointing to a Foreign containing the actual raw pointer, this CL now creates a new JSExternalObject type that directly contains the external pointer. As a side-effect of this refactoring, nullptr values are now no longer valid for ExternalObjects. Change-Id: Ic8ff334681c966e823ca70f34dd1efaaa21a0789 Cq-Include-Trybots: luci.v8.try:v8_linux64_heap_sandbox_dbg_ng,v8_linux_arm64_sim_heap_sandbox_dbg_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3513234Reviewed-by: Igor Sheludko <ishell@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Samuel Groß <saelo@chromium.org> Cr-Commit-Position: refs/heads/main@{#79459}
-
- 20 Jan, 2022 1 commit
-
-
Dominik Inführ authored
Split method into ShouldRecordRelocSlot and ProcessRelocInfo. ProcessRelocInfo can then be reused in the write barrier and in the future for the OLD_TO_SHARED remembered set. SlotTypeForRelocInfoMode got moved into ProcessRelocInfo. In addition rename and document SlotTypes. This CL does not change behavior. Bug: v8:11708 Change-Id: Iff712e7e6f5d3a4da64510b67b604b9e04998361 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3400968Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#78701}
-
- 13 Jan, 2022 2 commits
-
-
Leszek Swirski authored
This reverts commit 142dd775. Reason for revert: TSAN breaks: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20stress-incremental-marking/6113/overview Original change's description: > cppgc-js,heap: Implement snapshots for embedder fields > > https://crrev.com/c/3293410 added concurrent processing of C++ objects > found through V8 embedder fields. The CL missed that those embedder > fields are not read atomically from JS objects. The problem is that > embedder fields are only aligned to kTaggedSize on builds with pointer > compression and are as such mis-aligned for atomic ops. This is not a > problem for on-heap values as the upper 32bits are anyways computed > from the cage. Is is a problem for generic C++ values though, as they > are used with Oilpan. > > This CL adds the standard marker snapshot protocol for embedder fields. > > Marker: > 1. Snapshot embedder fields > 2. Try to mark host object > 3. On success: process snapshot > > Main thread: > 1. On setting embedder fields mark the object black first > 2. Emit a write barrier for the embedder fields > > This will get simpler with the heap sandbox that uses a separate table > for embedder fields. Once the sandbox is the default configuration, we > can use it as dependency for the concurrent fast path. > > Bug: chromium:1285706 > Change-Id: I6b975ea561be08cda840ef0dd27a11627de93900 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3380983 > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Commit-Queue: Michael Lippautz <mlippautz@chromium.org> > Cr-Commit-Position: refs/heads/main@{#78604} Bug: chromium:1285706 Change-Id: If1976c0356f450fc068aa4dcc39fb9a0d5417a40 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3386598 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Owners-Override: Leszek Swirski <leszeks@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@{#78605}
-
Michael Lippautz authored
https://crrev.com/c/3293410 added concurrent processing of C++ objects found through V8 embedder fields. The CL missed that those embedder fields are not read atomically from JS objects. The problem is that embedder fields are only aligned to kTaggedSize on builds with pointer compression and are as such mis-aligned for atomic ops. This is not a problem for on-heap values as the upper 32bits are anyways computed from the cage. Is is a problem for generic C++ values though, as they are used with Oilpan. This CL adds the standard marker snapshot protocol for embedder fields. Marker: 1. Snapshot embedder fields 2. Try to mark host object 3. On success: process snapshot Main thread: 1. On setting embedder fields mark the object black first 2. Emit a write barrier for the embedder fields This will get simpler with the heap sandbox that uses a separate table for embedder fields. Once the sandbox is the default configuration, we can use it as dependency for the concurrent fast path. Bug: chromium:1285706 Change-Id: I6b975ea561be08cda840ef0dd27a11627de93900 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3380983Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#78604}
-
- 27 Dec, 2021 1 commit
-
-
Omer Katz authored
Included in this CL: (*) Introduce CppMarkingState that V8 should use to push references to Oilpan. CppMarkingState allocates its own Worklist::Locals to support concurrent updates from V8. (*) Split Oilpan MarkingWorklist object to form a base class used by CppMarkingState. (*) Remove MarkerFactory and split marking initialization. Marking worklists should already be initialized when V8 initializes visitors. For incremental marking, this requires splitting marking initialization and marking start. (*) Drive-by: Mark JSObject::IsApiWrapper and JSObject::IsDroppableApiWrapper as const. Bug: v8:12407 Change-Id: I35cc816343da86f69a68306204675720e9b3913f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3293410Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#78446}
-
- 08 Dec, 2021 1 commit
-
-
Thibaud Michaud authored
Treat all stack pointers as roots: - Maintain a global linked-list of StackMemories - Update StackFrameIterator to process inactive stacks - Visit roots in all inactive stacks (including root marking and root pointer updating). Drive-by: - Fix some issues uncovered by the test - Refactor the builtin constants R=mlippautz@chromium.org,ahaas@chromium.org Bug: v8:12191 Change-Id: I5b6381f9818166e2eabf80dd59135673dddb2afc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310932Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/main@{#78291}
-
- 06 Dec, 2021 1 commit
-
-
Dominik Inführ authored
Use an atomic marking state in all builds - even builds with concurrent marking disabled. This will allow us to simplify our code a bit. This CL starts by always using MajorMarkingState for MarkCompactCollector::MarkingState and removing V8_ATOMIC_MARKING_STATE. Bug: v8:12470 Change-Id: I88a65647fb2142a63b2b51fc21391c8ef1baa82d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3314864 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#78241}
-
- 02 Dec, 2021 1 commit
-
-
Michael Lippautz authored
- Removes the unused Worklist implementation. All uses now refer to ::heap::base::Worklist. - Renames CppgcWorklistTest -> WorklistTest - Add test for Swap() Bug: v8:12426 Change-Id: I62c3472c030b853a846cf13ab48597ea1af8f700 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306507Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#78208}
-
- 30 Nov, 2021 2 commits
-
-
Seth Brenith authored
Currently, JSFinalizationRegistry has a BodyDescriptor that iterates next_dirty as a custom weak field, and it has a WeakListVisitor that cleans up any items from the list that should be removed. However, none of that code is used, because JSFinalizationRegistry objects are created with visitor ID kVisitJSObjectFast. This change gives them a custom visitor ID so that next_dirty can be treated as weak. Bug: v8:12430 Change-Id: I31c1935257ad508b13a3e684662d2ca406d8ed19 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3307096 Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#78167}
-
Michael Lippautz authored
The CL converts uses of v8::internal::Worklist to heap::base::Worklist which does not require to know the number of tasks working with the work list upfront. heap::base::Worklist is the common implementation for V8's heap and cppgc and should be used/optimized going forward. Bug: v8:12426 Change-Id: Id6ef1aa05df858b01df90d653b6421a9bb68b997 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306382Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#78151}
-
- 26 Nov, 2021 1 commit
-
-
Igor Sheludko authored
... and thus avoid the need for special handling of objects located in external code space. This will also allow making HeapObject::IsBlah() checks faster when external code space is enabled. Bug: v8:11880 Change-Id: I12d07c05451ff198f0a6182d9b5849f76015e7fb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3300140Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#78104}
-
- 25 Nov, 2021 1 commit
-
-
Dominik Inführ authored
ShouldVisit() uses obj.Size() to increment the live bytes counter after the object was successfully marked grey. However, this re-reads the length field which could have already been overwritten by a concurrent left-trimming operation on the main thread. Fix this by calculating the object size later with the length field we read before marking that object black. That value is guaranteed to be a SMI. Bug: chromium:1273352 Change-Id: I47e5a2df3eef61b4ef07af943f30123e5c2f7f9d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3302793 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#78093}
-
- 14 Oct, 2021 1 commit
-
-
Shu-yu Guo authored
The concurrent marker consults the page flags to see if it should skip objects in the shared heap, and it was missing a SynchronizePageAccess, causing TSAN false positives. Bug: v8:12314, v8:12007 Change-Id: I888a68a3eddaa3dfa1644364226010def8d2a9b6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3219946 Auto-Submit: Shu-yu Guo <syg@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#77390}
-
- 08 Oct, 2021 1 commit
-
-
Shu-yu Guo authored
To prepare for prototyping shared memory features, all internalized and in-place internalizable (1- and 2-byte seq strings and external strings) will always be allocated in the shared old space. Cons strings, thin strings, and sliced strings remain allocated in the thread-local space. They are copied over to the shared space when internalized, as internalization implies flattening, which for these strings requires a copy already. To make the in-place internalization threadsafe, updating the map of such strings is now done with a release store. This CL does not yet support external strings. Bug: v8:12007 Change-Id: I982c35c5120bf4c0c70c5294ce011b47430414c8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3140784 Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/main@{#77308}
-
- 28 Sep, 2021 2 commits
-
-
Dominik Inführ authored
Refactor code such that the linear algorithm is actually executed outside the method for the fixpoint iteration. Also added a CHECK which verifies that iterating the ephemerons one more time results in no further marked objects. Also force another iteration when ProcessMarkingWorklist() processed some object. In such cases we need to re-process all ephemerons otherwise ephemeron semantics might be broken. Bug: chromium:1252918 Change-Id: I9123dda50e34227a04825fd8b3172368286cc76f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3190100 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#77131}
-
Seth Brenith authored
When preparing to take a heap snapshot for the devtools, V8 uses CollectAllAvailableGarbage, which runs 2 to 7 rounds of garbage collection, depending on whether weak callbacks indicate that further rounds might be beneficial. Depending on how many rounds of GC run, varying amounts of bytecode and baseline code may be flushed, leading to inconsistent behavior and underreporting the amount of memory used by bytecode and baseline code. In this change, I propose that bytecode should not increase in age during these collections, so that the resulting snapshot is a better indication of actual memory usage. Change-Id: I644be37833f85bb58e2e2fad5da62949cbdc9bef Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3182885Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Cr-Commit-Position: refs/heads/main@{#77122}
-
- 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}
-