| [debug] Only pass SourceLocation in debug in TurboShaft SourceLocation is almost only used for debug messages in TurboShaft, so pass it only in debug mode. Additionally, std::source_location (that it wraps) is a single pointer, so we can efficiently pass it by value rather than const ref. This reduces release build d8 by ~170kb, of which ~4kb is the by-value passing. Change-Id: Ia6b592f094dad0987b8a886bf16a7d3fe8611eb1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6888815 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#102072} | 10 个月前 |
| [task] Move source location and use it in v8 platform Step 1/3 adds function declaration that take SourceLocation in v8-platform. Follow up: - Implement embedders - Add source location by default. Bug: chromium:1424158 Change-Id: I98be814e06f5663a1d41fc5581e892b999e0219d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4336198 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Cr-Commit-Position: refs/heads/main@{#86951} | 3 年前 |
| cppgc: Make bikineev and omerkatz owners of include/cppgc Bug: chromium:1056170 Change-Id: I2e0947c5acfd110f0add7ae5b4e3e54e3c827478 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2379864 Auto-Submit: Omer Katz <omerkatz@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/master@{#69599} | 5 年前 |
| [cppgc-js] Reuse stack object from V8 Reuse the stack object that V8 maintains via ThreadLocalTop for CppHeap. This allows CppHeap to be migrated across threads, similar to Isolate, when used with Locker. Bug: v8:13207 Change-Id: I4c865f4eeb79257ed720cf46e42b27589fcf555e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4013799 Reviewed-by: Omer Katz <omerkatz@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Anton Bikineev <bikineev@chromium.org> Cr-Commit-Position: refs/heads/main@{#84126} | 3 年前 |
| [cleanup] Modernize std::*::value and ::type Mechanically replacing std::foo<X>::value with std::foo_v<X>, and the same for ::type -> _t. Change-Id: I543dda07ba4c95534cdcd51f1f438f2626be8273 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6491388 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#99940} | 1 年前 |
| [api, heap] Deprecate v8::EmbedderHeapTracer Users should rely on CppHeap which is the only supported way of using v8::TracedReference in going forward. Bug: v8:13207 Change-Id: Idd03f458167c74b06f285bb568e5c77ad46003fe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3849037 Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org> Cr-Commit-Position: refs/heads/main@{#82681} | 3 年前 |
| [debug] Only pass SourceLocation in debug in TurboShaft SourceLocation is almost only used for debug messages in TurboShaft, so pass it only in debug mode. Additionally, std::source_location (that it wraps) is a single pointer, so we can efficiently pass it by value rather than const ref. This reduces release build d8 by ~170kb, of which ~4kb is the by-value passing. Change-Id: Ia6b592f094dad0987b8a886bf16a7d3fe8611eb1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6888815 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#102072} | 10 个月前 |
| cppgc: Fix CustomSpace trait Expose kSupportsCompaction to be able to refer to it from other traits. Change-Id: I3a0870853fabfac993eff22886a0a31a52d90055 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653225 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Omer Katz <omerkatz@chromium.org> Auto-Submit: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/master@{#72372} | 5 年前 |
| [task] Override GetForegroundTaskRunner with priority This CL makes GetForegroundTaskRunner() with priority usable by providing a default implementation and overriding it in subclasses. This will be use in follow-up to change priority of incremental marking behind and experiment. Follow-up: Delete GetForegroundTaskRunner() with no priority once all embedders implement the version with priority. Bug: chromium:1448758 Change-Id: I98423ac25a3eb12210ad127983be1a86a611e37c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5758110 Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Reviewed-by: Omer Katz <omerkatz@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#95697} | 1 年前 |
| cppgc: Prevent misuse of explicit_management.h The methods in explicit_management.h should be called via the public variants in the subtle namespace. Calling the variants in the internal namespace directly skips asserts and required size coversions. Doing so may cause misuse of the api that may break GC inernals Change-Id: I58a0f324ca1ee0839bb85eb9b53ce57785dc7b91 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3435187 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#78920} | 4 年前 |
| [cppgc] Prevent allocating mixins with new On ToT, if a class A inherits from GarbageCollectedMixin, but not from GarbageCollected, allocating A using new A() would work. This should be prevented since mixins are never meant to be allocated directly and should always be allocated using MakeGarbageCollected. Change-Id: I285c6381b26408c3123b80cb4c43fbb4fcd4060d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5756503 Reviewed-by: Anton Bikineev <bikineev@chromium.org> Auto-Submit: Omer Katz <omerkatz@chromium.org> Commit-Queue: Anton Bikineev <bikineev@chromium.org> Cr-Commit-Position: refs/heads/main@{#95440} | 1 年前 |
| Fix spelling errors and other pedantry. Change-Id: I1ed7003c7e6f905101c8ab0e7f9a3167d2db3bf6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5797602 Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Erik Corry <erikcorry@chromium.org> Cr-Commit-Position: refs/heads/main@{#95727} | 1 年前 |
| cppgc: Prevent using HeapHandle by value HeapHandle is an opaque handle that refers to the internal implementation of the heap and as such should never be used by value. Bug: v8:13429 Change-Id: I1c369911adfc623fe2c32f06b985a5d8accc0e55 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4000485 Auto-Submit: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Anton Bikineev <bikineev@chromium.org> Reviewed-by: Anton Bikineev <bikineev@chromium.org> Cr-Commit-Position: refs/heads/main@{#84034} | 3 年前 |
| cppgc: Allow querying whether sweeping is active on owning thread This allows the embedder to determine whether some function has been called from a destructor. See discussion in https://crrev.com/c/3302810 Bug: chromium:1273928 Change-Id: Icb5d98eff777574488a7d6de5e693c502c2fb53e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3303793 Reviewed-by: Omer Katz <omerkatz@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#78113} | 4 年前 |
| Display size and count of blink dom objects in memory-infra. The blink contains two type of object: the dom objects have explicitly specified names via using NameProvider, and other cpp internal objects have hide names 'InternalNode'. Now we must enable CPPGC_SUPPORTS_OBJECT_NAMES macro to show the name and size of all blink objects in memory-infra. I think it is better that display the count and size of these dom objects inherited from NameProvider without enabling CPPGC_SUPPORTS_OBJECT_NAMES macro in release version. It will provide great convenience to help us debug the memory issues of the blink object. Bug: 445232188 Change-Id: I436cd08e0ec337f72ac95529f0a73d734d2c0bd3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6950858 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#103057} | 8 个月前 |
| cppgc: shared-cage: Remove heap-specific metadata from cage-header The CL is a prerequisite for the shared cage. Instead of storing state variables (is_incremental_marking_in_progress, is_young_generation_enabled) in the cage metadata, the CL moves them to HeapHandle. The HeapHandle pointer is now retrieved from page-headers. To make sure that the write-barrier code is better optimized, the HeapHandle definition is moved to internal/ headers. The part of BasePage that contains HeapBase (i.e. HeapHandle) pointer is also extracted and moved to the headers. Bug: v8:12231 Change-Id: I44bf65d99a621d9548e4250386cf87476ca186ac Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3689730 Commit-Queue: Anton Bikineev <bikineev@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#81005} | 4 年前 |
| Reland "cppgc: Consistently treat sentinel pointer as live" This is a reland of commit 60e9b50374ac9bd8b88cf27cf237aa8aa205182c Original change's description: > cppgc: Consistently treat sentinel pointer as live > > Sentinel pointers would be treated as live by the GC (through > HandleWeak() but would be treated as dead when checked explicitly > through the LivenessBroker in e.g. custom callbacks. > > Treat sentinel pointers as live consistently across all callsites > and weak types. > > Change-Id: I9a4c096ddac1a111df808f3683325b55e7597eea > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3782800 > Commit-Queue: Michael Lippautz <mlippautz@chromium.org> > Reviewed-by: Omer Katz <omerkatz@chromium.org> > Reviewed-by: Anton Bikineev <bikineev@chromium.org> > Cr-Commit-Position: refs/heads/main@{#81916} Change-Id: Ie2476345b9ea8406015a3b07bd6880c1159ede08 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3779913 Reviewed-by: Anton Bikineev <bikineev@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#81975} | 3 年前 |
| Reland "[cppgc] Use blink_gc_plugin in v8" This is a reland of commit 017b2a51329d9aa43c978c4e6a5e127e5dcc2222 Original change's description: > [cppgc] Use blink_gc_plugin in v8 > > This CL enables the plugin for v8 builds and fixes various violations > found in the v8 codebase. > > Some ignore annotations remain for changes required in the plugin (e.g. > treat TraceMultiple and TraceEphemeron as trace methods). > > Bug: 402564649 > Change-Id: I3f995cf2bf31672b7c5702338286cfb850af2dcf > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6366816 > Reviewed-by: Anton Bikineev <bikineev@chromium.org> > Commit-Queue: Omer Katz <omerkatz@chromium.org> > Reviewed-by: Michael Lippautz <mlippautz@chromium.org> > Cr-Commit-Position: refs/heads/main@{#99316} Bug: 402564649 Change-Id: Ibb4c9efdd6f26a9d7de234c4f341b754c96fc345 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6369299 Commit-Queue: Omer Katz <omerkatz@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#99323} | 1 年前 |
| cppgc: Avoid static_cast to Pointee* on tracing TaggedUncompressedMember This is done by - rename GetRawAtomic to GetAtomic - add GetRawAtomic that doesn't static_cast Bug: 418024460 Change-Id: I9fb22057857ebcf195e21fca202106d686a82c12 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6554249 Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Auto-Submit: Anton Bikineev <bikineev@chromium.org> Commit-Queue: Anton Bikineev <bikineev@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#100320} | 1 年前 |
| Disallow Oilpan GC during heap snapshot generation We have encountered a bug where NameInHeapSnapshot modified the heap, which caused the heap snapshot generator to fail. This change adds a disallow scope so that there would be a DCHECK failure if this bug regressed, and also updates a comment to describe the expectation. Bug: 367037118 Change-Id: Ic39043be5b76ff062264036a14c8a6315dc2a083 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5874863 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Cr-Commit-Position: refs/heads/main@{#96186} | 1 年前 |
| cppgc: Fix compilation error on older gcc compilers Without the added header the following compilation error might occur: error: ‘size_t’ does not name a type Change-Id: I021f6ce7b9691f76f0c439265850f1f4fc50685c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2645160 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Milad Fa <mfarazma@redhat.com> Cr-Commit-Position: refs/heads/master@{#72272} | 5 年前 |
| [debug] Only pass SourceLocation in debug in TurboShaft SourceLocation is almost only used for debug messages in TurboShaft, so pass it only in debug mode. Additionally, std::source_location (that it wraps) is a single pointer, so we can efficiently pass it by value rather than const ref. This reduces release build d8 by ~170kb, of which ~4kb is the by-value passing. Change-Id: Ia6b592f094dad0987b8a886bf16a7d3fe8611eb1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6888815 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#102072} | 10 个月前 |
| [debug] Only pass SourceLocation in debug in TurboShaft SourceLocation is almost only used for debug messages in TurboShaft, so pass it only in debug mode. Additionally, std::source_location (that it wraps) is a single pointer, so we can efficiently pass it by value rather than const ref. This reduces release build d8 by ~170kb, of which ~4kb is the by-value passing. Change-Id: Ia6b592f094dad0987b8a886bf16a7d3fe8611eb1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6888815 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#102072} | 10 个月前 |
| Revert "cppgc: Rework prefinalizers" This reverts commit cf25b3bc53a983ccbdd0d7308f63e723bbb28a94. Reason for revert: https://crbug.com/1307471. TraceTrait must only be used during marking. Original change's description: > cppgc: Rework prefinalizers > > Move the check for whether an object is live or dead out of the > prefinalizer trampoline. Moving it into the backend allows for > inlining the check which avoids a call to the trampoline for live > objects. > > On catapult benchmarks (e.g. cnn:2021, nytimes:2020), there's often > ~2k finalizers registered. In order to avoid memory overhead in the > range of a few KB, we store the fact whether the object points to the > base object payload in the LSB of the pointer. For caged builds this > is replaced with just storing the index into the cage for both object > and base object payload. > > Locally saves around ~10% of atomic sweeping processing time which is > in the order of .05ms. > > Bug: v8:12698 > Change-Id: I198205a6b1d57fc2df821ee4e73e53dc6f825ff5 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497764 > Reviewed-by: Omer Katz <omerkatz@chromium.org> > Commit-Queue: Michael Lippautz <mlippautz@chromium.org> > Cr-Commit-Position: refs/heads/main@{#79442} Bug: v8:12698, chromium:1307471 Change-Id: I5c4e70d46cb99af66c77f0c013625b6af6c6eb8e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3535781 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79527} | 4 年前 |
| cppgc: Implement process-global state accessors. Process global accessors for total physical size and used size are needed for blink. These are implemented via an allocation observer that atomically updates static counters. The public api only provides getters for the counters. An internal class is in charge of updating the counters as needed. A similar split is also applied to IsAnyIncrementalOrConcurrentMarking(). Drive-by: ProcessHeap is merged into cppgc::internal::WriteBarrier. Bug: chromium:1056170 Change-Id: Iaedebd1ac9d49238ce6bdd52ffa5d1ef4d28203d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2695394 Commit-Queue: Omer Katz <omerkatz@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#72832} | 5 年前 |
| cppgc: Add a compile-time flag to enable larger cages This CL introduces gn flag cppgc_enable_larger_cage and corresponding When this flag is enabled, the caged heap can grow up to 16GB. Testing: The test I would have written for this CL is to validate that pointer compression and decompression work correctly under 3-bit shift, which is already covered by MemberTest.CompressDecompress. I ran the MemberTest unit tests locally with the flag enabled and confirmed that they pass. I also ran a full CQ dry run with the flag enabled here: https://chromium-review.googlesource.com/c/v8/v8/+/4491403 Bug: chromium:1434388 Change-Id: I7fb07c84f3a408add2a67b875acb513906b3e18c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4491284 Reviewed-by: Anton Bikineev <bikineev@chromium.org> Commit-Queue: Kevin Babbitt <kbabbitt@microsoft.com> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#87419} | 3 年前 |
| [task] Move source location and use it in v8 platform Step 1/3 adds function declaration that take SourceLocation in v8-platform. Follow up: - Implement embedders - Add source location by default. Bug: chromium:1424158 Change-Id: I98be814e06f5663a1d41fc5581e892b999e0219d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4336198 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Cr-Commit-Position: refs/heads/main@{#86951} | 3 年前 |
| cppgc: Add missing includes This is to fix error in clang modules build. Bug: 40263312 Change-Id: I058a376ac17acaa29962aa30622f50c2e4e7051e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6586224 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Reviewed-by: Omer Katz <omerkatz@chromium.org> Commit-Queue: Takuto Ikuta <tikuta@chromium.org> Auto-Submit: Takuto Ikuta <tikuta@chromium.org> Cr-Commit-Position: refs/heads/main@{#100491} | 1 年前 |
| testing: OverrideEmbedderStackStateScope should only affect implicit GCs The only user of OverrideEmbedderStackStateScope is Blink where it is used to override stack state of top-level tasks. Adjust the behavior here to allow using this scope broadly while still supporting explicit garbage collection calls. Bug: chromium:1300492 Change-Id: I78c418c5f08991bf6857147cd4a537246bfcc556 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497744 Reviewed-by: Omer Katz <omerkatz@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#79420} | 4 年前 |
| [cleanup] Modernize std::*::value and ::type Mechanically replacing std::foo<X>::value with std::foo_v<X>, and the same for ::type -> _t. Change-Id: I543dda07ba4c95534cdcd51f1f438f2626be8273 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6491388 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#99940} | 1 年前 |
| add missing includes for the build with use_libcxx_modules This is to fix build error when we set use_libcxx_modules=true in chromium build. Bug: 40440396 Change-Id: I8d099affe3e6228229e03306afb5e4a75b48ed67 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6083971 Commit-Queue: Takuto Ikuta <tikuta@chromium.org> Reviewed-by: Anton Bikineev <bikineev@chromium.org> Auto-Submit: Takuto Ikuta <tikuta@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#97659} | 1 年前 |
| [cppgc] Add static_assert to Visitor::Trace(const T&) Enforce that the Visitor::Trace(const T&) method that is used for non-reference fields (e.g. embedded DISALLOW_NEW objects) is never called for GCed types. Change-Id: Id896ff1dcec3c42a7e9bc11c4a64e850d8e7e143 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7046265 Reviewed-by: Anton Bikineev <bikineev@chromium.org> Commit-Queue: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/main@{#103236} | 8 个月前 |