- 16 Aug, 2022 1 commit
-
-
Samuel Groß authored
The external pointer table is already to some degree self-compacting: as the freelist is sorted in ascending order, free entries at the start of the table should quickly fill up. However, any live entry at the end of the table makes it impossible to shrink the table, thereby causing higher memory consumption. To solve this, this CL implements a simple table compaction algorithm, used when the freelist has become sufficiently large (currently >= 10% of the table capacity): - The goal of the algorithm is to shrink the table by freelist_size/2 entries at the end of compaction (during sweeping). - At the start of the marking phase, the compaction area is computed as roughly [capacity - freelist_size/2, capacity). - When an entry is marked as alive that lies inside the compaction area, a new "relocation entry" is allocated for it from the freelist and the address of the handle for that entry is stored in that entry. If there are no more free entries before the compaction area, compaction is aborted. This is expected to happen rarely and is logged into a histogram. - During sweeping, all relocation entries are "resolved": the content of the old entry is copied into the new entry and the handle is updated to point to the new entry. - Finally, the table is shrunk and the last initial_freelist_size/2 entries are decommitted. See also the comments in the ExternalPointerTable class for more details. Bug: v8:10391 Change-Id: I28d475c3596590e860421f0a054e2ad4dbebd487 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/+/3794645Reviewed-by:
Igor Sheludko <ishell@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Samuel Groß <saelo@chromium.org> Cr-Commit-Position: refs/heads/main@{#82484}
-
- 09 Aug, 2022 1 commit
-
-
jameslahm authored
... when setting the prototype of TypedArray constructor. Setting the __proto__ of TypedArray constructor could change TypedArray's @@species, thus we need to invalidate the @@species protector. Bug: v8:13110 Change-Id: Ib3b2c88d1136965c221492ff81a26ae69533b356 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3813063 Commit-Queue: 王澳 <wangao.james@bytedance.com> Reviewed-by:
Marja Hölttä <marja@chromium.org> Reviewed-by:
Jakob Linke <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#82282}
-
- 28 Jul, 2022 1 commit
-
-
Clemens Backes authored
This is deprecated since 10.5 and replaced by the new callback which receives more OOM details. R=mlippautz@chromium.org Bug: chromium:1323177 Change-Id: I9385da33c3d9227144ebc47d6dddae702701ff82 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3789509Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#82033}
-
- 26 Jul, 2022 1 commit
-
-
Shu-yu Guo authored
This CL moves the external pointer table out of V8_ENABLE_SANDBOX and into V8_COMPRESS_POINTERS. The external pointer table is also useful even when not sandboxing external pointers to ease alignment requirements under pointer compression. It is onerous for the allocator to support non-tagged-size alignment. Under pointer compression, tagged is 4 bytes while system pointers are 8 bytes. Because external pointer table indices are 4-bytes, fields that require natural alignment (e.g. the state field in JSAtomicsMutex) when the system pointer size is 8-bytes can use an indirection via the pointer table to ease the alignment restriction back to 4-bytes under pointer compression. Bug: v8:10391 Change-Id: Iac1200e40c987128cd6a227cd279ba4dac0e5c56 Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3783076Reviewed-by:
Samuel Groß <saelo@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by:
Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/main@{#81977}
-
- 19 Jul, 2022 1 commit
-
-
JianxiaoLuIntel authored
The LeftTrimFixedArray will call OnMoveEvent every time. Even though when the profiling is not enabled in user mode, it still need to do some check, and the function call itself has certain overhead. This patch aims to remove the unnecessary check. We only need to check it when the logging status changes. Change-Id: I0e957860616a18415398f7753ed21caab5a4361f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3751964Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Commit-Queue: Jianxiao Lu <jianxiao.lu@intel.com> Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/main@{#81794}
-
- 11 Jul, 2022 1 commit
-
-
Samuel Groß authored
This CL does the following: - It enables (i.e. allocates and initializes) the per-Isolate ExternalPointerTable when the sandbox is enabled. - It refactors the list of external pointer tags to mark them as "sandboxed" or "unsandboxed". An unsandboxed external pointer has a null tag. - It changes V8_SANDBOXED_EXTERNAL_POINTERS to now essentially just enable sandboxing for all available tags. - It modifies all low-level external pointer accessors to perform the ExternalPointerLookup only if the tag is non-zero and otherwise treat the slot as containing a raw pointer. This now allows rolling out external pointer sandboxing incrementally (separately for each external pointer type), which will in turn allow for more precise performance measurements of the impact of the sandbox. Note: when an external pointer tag is now marked as sandboxed (and V8_SANDBOXED_EXTERNAL_POINTERS is not enabled), the underlying slots are still 64-bits in size. This simplifies the implementation as we would otherwise need to deal with variably-sized external pointer slots. Local benchmarking suggests that the benefits from 32-bit external pointer slots are insignificant on typical benchmarks, so this should be ok. Drive-by: rename kExternalPointerSize to kExternalPointerSlotSize to make it more clear what it refers to (the on-heap storage size). Also delete CodeStubAssembler::InitializeExternalPointerField as it is not currently used and the implementation is fairly inefficient. Bug: v8:10391 Change-Id: I7c38729c7e9048d737a1a8ced84749f5b1f7feab 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/+/3736447Reviewed-by:
Igor Sheludko <ishell@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Commit-Queue: Samuel Groß <saelo@chromium.org> Reviewed-by:
Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/main@{#81636}
-
- 07 Jul, 2022 1 commit
-
-
Manos Koukoutos authored
Mostly src/codegen, src/compiler, src/snapshot, src/utils. Bug: v8:13006 Change-Id: I2fb31acc749a7376e6f2a7424ed2e67ff479d971 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3749178 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/main@{#81575}
-
- 05 Jul, 2022 3 commits
-
-
Manos Koukoutos authored
This is a reland of commit 2d74bfa4 Difference compared to original: Restore one needed include. Original change's description: > Remove some unused includes > > Mostly src/api, src/asmjs. src/ast, src/base, src/wasm. > > Bug: v8:13006 > Change-Id: If4e85afe003fda9f8a681077827c3502e939fe57 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3742702 > Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> > Reviewed-by: Toon Verwaest <verwaest@chromium.org> > Cr-Commit-Position: refs/heads/main@{#81523} Bug: v8:13006 Change-Id: I88c45059572fa25af4e0999f479ba5c28572db7f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3746077Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by:
Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/main@{#81539}
-
Manos Koukoutos authored
This reverts commit 2d74bfa4. Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac%20-%20arm64%20-%20debug%20builder/7403/overview Original change's description: > Remove some unused includes > > Mostly src/api, src/asmjs. src/ast, src/base, src/wasm. > > Bug: v8:13006 > Change-Id: If4e85afe003fda9f8a681077827c3502e939fe57 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3742702 > Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> > Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> > Reviewed-by: Toon Verwaest <verwaest@chromium.org> > Cr-Commit-Position: refs/heads/main@{#81523} Bug: v8:13006 Change-Id: I7579dc3805ed4cbcd56488c31450c7941b430b1a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3746076 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by:
Manos Koukoutos <manoskouk@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Owners-Override: Manos Koukoutos <manoskouk@chromium.org> Cr-Commit-Position: refs/heads/main@{#81526}
-
Manos Koukoutos authored
Mostly src/api, src/asmjs. src/ast, src/base, src/wasm. Bug: v8:13006 Change-Id: If4e85afe003fda9f8a681077827c3502e939fe57 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3742702Reviewed-by:
Thibaud Michaud <thibaudm@chromium.org> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/main@{#81523}
-
- 27 Jun, 2022 2 commits
-
-
Samuel Groß authored
The ExternalPointerTags are assumed to be compile-time constants in most cases, so turning them into template parameters enforces that. As decisions such as whether to use the per-isolate or the shared external pointer table are encoded into the tag values, forcing those to be compile-time constants guarantees that the compiler will be able to inline the correct logic when accessing an external pointer. With this, there are now two (high-level) ways of accessing external pointer fields from C++: the Read/WriteExternalPointerField methods which require the ExternalPointerTag to be a template parameter, and the ExternalPointerSlot class which takes the tag as an argument. The latter is for example used for snapshot deserialization and by the garbage collector (more generally, by the ObjectVisitor::VisitExternalPointer method), where the tag is not a compile-time constant. Finally, this CL also introduces a new ExternalPointerHandle type which represents the (opaque) on-heap representation of a reference to an entry in an ExternalPointerTable when sandboxing is enabled. Making this its own type makes the code a bit more readable. Bug: v8:10391 Change-Id: I867b8ce41d15d485f1dc66786f233c710c56afcb 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/+/3720641Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Commit-Queue: Samuel Groß <saelo@chromium.org> Reviewed-by:
Igor Sheludko <ishell@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#81402}
-
Patrick Thier authored
The waiter queue node of JS Atomics.Mutex is now stored in the shared external pointer table. Bug: v8:12547 Change-Id: I2f4ce1c705d5e710b49872942702f60edf6c4043 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3721696Reviewed-by:
Shu-yu Guo <syg@chromium.org> Reviewed-by:
Omer Katz <omerkatz@chromium.org> Reviewed-by:
Igor Sheludko <ishell@chromium.org> Commit-Queue: Patrick Thier <pthier@chromium.org> Cr-Commit-Position: refs/heads/main@{#81380}
-
- 23 Jun, 2022 1 commit
-
-
Patrick Thier authored
To be able to share external strings, we need to share the external pointer table in sandbox builds. To avoid branches at runtime all pointers for external strings are stored in the shared external pointer table. Bug: v8:12957 Change-Id: Iaa6be7839a2f5e50f80fd58c5b33fb9c6af61057 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695263Reviewed-by:
Igor Sheludko <ishell@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Patrick Thier <pthier@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Reviewed-by:
Omer Katz <omerkatz@chromium.org> Reviewed-by:
Samuel Groß <saelo@chromium.org> Cr-Commit-Position: refs/heads/main@{#81324}
-
- 15 Jun, 2022 1 commit
-
-
Adam Klein authored
This is useful for cases where we're calling a Maybe-returning function only for its side effects and possible exception-throwing. Change-Id: I64e73598d40b3565d83cb17166c762d8affd7a84 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3708022Reviewed-by:
Shu-yu Guo <syg@chromium.org> Commit-Queue: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/main@{#81201}
-
- 14 Jun, 2022 1 commit
-
-
Andreas Haas authored
Asynchronous WebAssembly compilation returns the compilation result through resolving a result promise. So far the result promise was resolved through V8-internal APIs. This caused problems, because resolving promises requires correct handling of microtasks, and microtasks are controlled by the embedder, and not by V8. This CL adds an API to allow the embedder to resolve the result promise itself, and handle microtasks as necessary. The use of the new API is available in a full CL, without API dance: https://chromium-review.googlesource.com/c/v8/v8/+/3694975 R=cbruni@chromium.org Bug: v8:12953 Change-Id: Ie9a56041f2d3e0c46664f1938e995f1e2c22f981 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3695584Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#81141}
-
- 10 Jun, 2022 1 commit
-
-
Seth Brenith authored
Minor refactoring; shouldn't affect behavior. This is a partial reland of https://crrev.com/c/3597106 Bug: v8:12808 Change-Id: Ibcc683317a6a85bb332dc96b212275f832cc59d8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3665263Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Cr-Commit-Position: refs/heads/main@{#81079}
-
- 08 Jun, 2022 1 commit
-
-
Leszek Swirski authored
Anyone using CopyablePersistentTraits should be using v8::Global, so deprecate it and fix the uses in V8. Bug: v8:12915 Change-Id: I25e6f2a03e070db9e9af9bbd9ea8cbc0f838c5ac Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3669254Reviewed-by:
Igor Sheludko <ishell@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Auto-Submit: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#81001}
-
- 03 Jun, 2022 1 commit
-
-
Igor Sheludko authored
... as a pair of Code and CodeDataContainer. In order to stop creating and using trampoline Code objects for builtins we need a different way to represent an "embedded builtin" code lookup result of builtin trampoline Code objects. We can't switch to CodeT for this purpose because GC still needs to be able to locate not yet evacuated Code objects in order to update old code pointers on the stack once Code objects are moved. Bug: v8:11880 Change-Id: I296636a6728a11c8e3220b3fee43fd12ff633c1b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3684813Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#80937}
-
- 01 Jun, 2022 1 commit
-
-
Shu-yu Guo authored
This is a reland of commit ea9a1f1c Changes since revert: - Make the state field uintptr-aligned since arm64 faults on atomic accesses to non-naturally aligned addresses. Original change's description: > [shared-struct] Add Atomics.Mutex > > This CL adds a moving GC-safe, JS-exposed mutex behind the > --harmony-struct flag. It uses a ParkingLot-inspired algorithm and > each mutex manages its own waiter queue. > > For more details, please see the design doc: https://docs.google.com/document/d/1QHkmiTF770GKxtoP-VQ1eKF42MpedLUeqiQPfCqus0Y/edit?usp=sharing > > Bug: v8:12547 > Change-Id: Ic58f8750d2e14ecd573173d17d5235a136bedef9 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3595460 > Commit-Queue: Shu-yu Guo <syg@chromium.org> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Cr-Commit-Position: refs/heads/main@{#80789} Bug: v8:12547 Change-Id: I776cbf6ea860dcc6cb0ac51694a9b584b53d255c Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_rel_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3673354Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Adam Klein <adamk@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#80875}
-
- 28 May, 2022 2 commits
-
-
Shu-yu Guo authored
This reverts commit ea9a1f1c. Reason for revert: arm64 pointer alignment issue https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket/8812962856609920785/+/u/Check/mutex-workers Original change's description: > [shared-struct] Add Atomics.Mutex > > This CL adds a moving GC-safe, JS-exposed mutex behind the > --harmony-struct flag. It uses a ParkingLot-inspired algorithm and > each mutex manages its own waiter queue. > > For more details, please see the design doc: https://docs.google.com/document/d/1QHkmiTF770GKxtoP-VQ1eKF42MpedLUeqiQPfCqus0Y/edit?usp=sharing > > Bug: v8:12547 > Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng > Change-Id: Ic58f8750d2e14ecd573173d17d5235a136bedef9 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3595460 > Commit-Queue: Shu-yu Guo <syg@chromium.org> > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Reviewed-by: Adam Klein <adamk@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Cr-Commit-Position: refs/heads/main@{#80789} Bug: v8:12547 Change-Id: I226e16b743dc4b157fac33a9cbabab4d72cf290b Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3673353 Owners-Override: Shu-yu Guo <syg@chromium.org> Auto-Submit: Shu-yu Guo <syg@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/main@{#80790}
-
Shu-yu Guo authored
This CL adds a moving GC-safe, JS-exposed mutex behind the --harmony-struct flag. It uses a ParkingLot-inspired algorithm and each mutex manages its own waiter queue. For more details, please see the design doc: https://docs.google.com/document/d/1QHkmiTF770GKxtoP-VQ1eKF42MpedLUeqiQPfCqus0Y/edit?usp=sharing Bug: v8:12547 Cq-Include-Trybots: luci.v8.try:v8_linux64_tsan_rel_ng Change-Id: Ic58f8750d2e14ecd573173d17d5235a136bedef9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3595460 Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Adam Klein <adamk@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#80789}
-
- 25 May, 2022 1 commit
-
-
Seth Brenith authored
This change reverts the following: 400b2cc2 Don't rescue old top-level SharedFunctionInfos Reviewed on https://chromium-review.googlesource.com/c/v8/v8/+/3657472 16a7150b Reland "Disable recompilation of existing Scripts from Isolate compilation cache" Reviewed on https://chromium-review.googlesource.com/c/v8/v8/+/3655011 2df4d58a Fix rehashing of script compilation cache Reviewed on https://chromium-review.googlesource.com/c/v8/v8/+/3654413 c8848cf4 Refactor CompilationSubCache Reviewed on https://chromium-review.googlesource.com/c/v8/v8/+/3629603 25072178 Improve Script reuse in isolate compilation cache, part 1 Reviewed on https://chromium-review.googlesource.com/c/v8/v8/+/3597106 Bug: v8:12808, chromium:1325566, chromium:1325567, chromium:1325601, chromium:1328671, chromium:1328672, chromium:1328678, chromium:1328811, chromium:1328810 Change-Id: I1d318dc172e5214166d3b15f19903186f4fe6024 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3664023Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#80744}
-
- 19 May, 2022 1 commit
-
-
Clemens Backes authored
Dynamic tiering is now enabled by default, and the origin trial is expired, so the callback can be removed. The callback was already never called, because the flag value is always checked first. R=ahaas@chromium.org, mlippautz@chromium.org Bug: v8:12281 Change-Id: I58eaa210c86024128328a13ba07bb8fc1b437841 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3644951 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/main@{#80633}
-
- 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 3 commits
-
-
Clemens Backes authored
This adds a new struct "OOMDetails" which is passed to the OOMErrorCallback. It currently holds the "is_heap_oom" bool that was also passed before, plus an optional "detail" string. The struct can later be extended without having to change the signature of the OOMErrorCallback. Removing fields will have to follow the standard deprecation rules, but this is also easily possible without the hassle for this initial change. We modify the deprecated OOMErrorCallback definition and un-deprecate it, which can be seen as removing a deprecated API and adding a new one in one CL. R=mlippautz@chromium.org, jkummerow@chromium.org Bug: chromium:1323177 Change-Id: Ic4c2cb5856906ebd664626fe463d8e96cb99b0a5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647827Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#80565}
-
Jakob Kummerow authored
This fixes a flaky crash when running with --turbo-stats or --turbo-stats-wasm. With dynamic tiering, it can happen that a compilation job is started shortly before the program/test/benchmark terminates and the main thread goes through its teardown sequence. When such a late job finishes, it still wants to report its statistics, which currently crashes due to UAF if the CompilationStats object, which is owned by the main thread, has already been deleted. Change-Id: Ie25a97299fdf40ece8f286487063feadcfa2eea9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3645410 Auto-Submit: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/main@{#80560}
-
Camillo Bruni authored
Next steps: Move general code from V8FileLogger to Logger Bug: v8:12795, chromium:1316443 Change-Id: I66e0d7d3908a2a24cd1cf3858834bd57314754b9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3637795 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Andreas Haas <ahaas@chromium.org> Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/main@{#80537}
-
- 12 May, 2022 1 commit
-
-
Igor Sheludko authored
This CL introduces SideEffectDetectorScope which requires explicit allowlisting of cases when side effects are allowed after calling interceptor callbacks. Side effects are not allowed when the callback does not intercept the request. The side effects detector is not enabled yet, it will be enabled in a follow-up CL. Bug: chromium:1310062 Change-Id: I805764920ed016cb37390aef7bb02cbdf5f72846 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3641172Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#80484}
-
- 11 May, 2022 2 commits
-
-
Seth Brenith authored
Once the root SharedFunctionInfo for any Script gets its bytecode flushed, the Isolate's compilation cache currently evicts that entry, to reduce memory usage. However, the associated Script is likely still alive, since scripts often declare functions which outlive the initial evaluation of the script. If an identical script is loaded later, a duplicate Script is created for it, which can waste memory. In this change, I propose that the compilation cache keys can refer weakly to the Script. When the root SharedFunctionInfo gets old, instead of deleting the cache entry entirely, we can just drop the strong reference to the SharedFunctionInfo. A subsequent lookup in the cache will retrieve the Script instead of the root SharedFunctionInfo, indicating an opportunity to save some memory by reusing the existing Script. Eventually, all callers to CompilationCache::LookupScript should reuse the Script if possible. This change implements only the easy case of reusing the Script for synchronous parsing. Follow-up changes will be required for the TODO comments left by this change. Bug: v8:12808 Change-Id: Ia8b0389441a682de9a43e73329049fd2e7835d3d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3597106Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Reviewed-by:
Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#80472}
-
Camillo Bruni authored
Bug: chromium:1319267 Change-Id: I7956b804246ee2c1fa170bf2eb8f3588b7488b42 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3620285Reviewed-by:
Benedikt Meurer <bmeurer@chromium.org> Reviewed-by:
Marja Hölttä <marja@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/main@{#80467}
-
- 09 May, 2022 2 commits
-
-
Camillo Bruni authored
In preparation of renaming i::CodeEventDispatcher to i::Logger Bug: v8:12795, chromium:1316443 Change-Id: I28e129130852d41cf5e464e083bc27cff97a0fff Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3623543Reviewed-by:
Andreas Haas <ahaas@chromium.org> Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Reviewed-by:
Marja Hölttä <marja@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/main@{#80427}
-
Clemens Backes authored
This adds a typedef for LegacyOOMErrorCallback, which is identical to OOMErrorCallback. Embedders will need to switch to LegacyOOMErrorCallback so that we can change the definition of OOMErrorCallback (see https://crbug.com/1323177). R=mlippautz@chromium.org Bug: chromium:1323177 Change-Id: I92312a577ca49e0174f2bb6b914cc11c3a0b0fc1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3632305Reviewed-by:
Jakob Kummerow <jkummerow@chromium.org> Reviewed-by:
Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#80424}
-
- 28 Apr, 2022 2 commits
-
-
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}
-
Camillo Bruni authored
* Prefix all isolate variables with i_ for i::Isolate and v8_ for v8::Isolate * Change _DO_NOT_USE macro suffix to _INTERNAL Change-Id: I005efbe0192cf202741448c63a4263e6a4b1fa1b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3610429 Commit-Queue: Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Anton Bikineev <bikineev@chromium.org> Reviewed-by:
Jakob Linke <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#80252}
-
- 27 Apr, 2022 3 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}
-
Camillo Bruni authored
Runtime and Builtin function should always return the exception object as a marker if there is a pending_exception on the current isolate. Change-Id: I7c255aa501800384c288664a9ca6578afbe0a103 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3610449Reviewed-by:
Victor Gomes <victorgomes@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/main@{#80237}
-
- 26 Apr, 2022 1 commit
-
-
Patrick Thier authored
This is a reland of commit 8ba60b7a Changes to original: - Weaken DCHECK in MakeThin to allow direct transitions of shared strings during deserialization. This is safe as the string to be transitioned is freshly created and hasn't escaped the thread yet. - To enable this, add has_active_deserializer() to LocalIsolate - Shared thin string transitions are subject to the same layout changes as non-shared thin string transitions, thus treat them equally when checking if a map transition is safe. Original change's description: > [string] Non-transitioning shared strings > > Instead of transitioning shared strings to ThinString on > internalization, use a forwarding table to the internalized string and > store the index into the forwarding table in the string's hash field. > > This way we don't need to handle concurrent string transitions that > modify the underlying string data. > > During stop-the-world GC, live strings in the forwarding table are > migrated to regular ThinStrings. > > Bug: v8:12007 > Change-Id: I6c6f3d41c6f644e0aaeafbf25ecec5ce0aa0d2d8 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3536647 > Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> > Reviewed-by: Jakob Linke <jgruber@chromium.org> > Reviewed-by: Shu-yu Guo <syg@chromium.org> > Reviewed-by: Igor Sheludko <ishell@chromium.org> > Commit-Queue: Patrick Thier <pthier@chromium.org> > Cr-Commit-Position: refs/heads/main@{#79801} Bug: v8:12007 Change-Id: I022e5c4768b763a86bb28c9c82218c3b807371a0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3571817Reviewed-by:
Shu-yu Guo <syg@chromium.org> Reviewed-by:
Igor Sheludko <ishell@chromium.org> Reviewed-by:
Dominik Inführ <dinfuehr@chromium.org> Reviewed-by:
Jakob Linke <jgruber@chromium.org> Commit-Queue: Patrick Thier <pthier@chromium.org> Cr-Commit-Position: refs/heads/main@{#80183}
-
- 22 Apr, 2022 1 commit
-
-
legendecas authored
As per https://tc39.es/ecma262/#sec-hostimportmoduledynamically defined, referencingScriptOrModule in HostImportModuleDynamically can be a Script Record, a Module Record, or null. So to https://tc39.es/proposal-shadowrealm/#sec-shadowrealmimportvalue, the HostImportModuleDynamicallyCallback is been invoked with a `null` resource_name. This may not be considered a breaking change as the parameter resource_name is defined as Local<Value>. Updates d8's DoHostImportModuleDynamically to handle null resource_name, and resolve the dynamically imported specifier relative to the executing script's origin. In this way, we have to set ModuleEmbedderData.origin even if the JavaScript source to be evaluated is Script. Also, a ModuleEmbedderData is created for each ShadowRealm to separate their module maps from the initiator context's. Bug: v8:11989 Change-Id: If70fb140657da4f2dd92eedfcc4515211602aa46 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3522883Reviewed-by:
Shu-yu Guo <syg@chromium.org> Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Toon Verwaest <verwaest@chromium.org> Commit-Queue: Chengzhong Wu <legendecas@gmail.com> Cr-Commit-Position: refs/heads/main@{#80118}
-
- 20 Apr, 2022 1 commit
-
-
Camillo Bruni authored
Bug: v8:12795, chromium:1316443 Change-Id: Ib4cbbad42da80dfb566e559e70db30a670cc4326 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593221 Auto-Submit: Camillo Bruni <cbruni@chromium.org> Reviewed-by:
Jakob Linke <jgruber@chromium.org> Commit-Queue: Jakob Linke <jgruber@chromium.org> Cr-Commit-Position: refs/heads/main@{#80036}
-