Commit 94bf147c authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

Revert "Reland "[compiler] Perform MapRef's SupportsFastArray methods concurrently""

This reverts commit fd16e67e.

Reason for revert: TSAN no-CM flaky failures https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20TSAN%20-%20no-concurrent-marking/3413

Original change's description:
> Reland "[compiler] Perform MapRef's SupportsFastArray methods concurrently"
>
> This is a reland of ebd9dcda
>
> Reason for reland: std::atomic<> only works for primitive types i.e. it
> does not work for Object. We can change it to read/write the Object's
> Address, instead.
>
> Original (reverted) CL can be seen in PS1.
>
> Original change's description:
> > [compiler] Perform MapRef's SupportsFastArray methods concurrently
> >
> > We are safe to go through the native_contexts_list_ since we do it
> > through IsAnyInitialArrayPrototype which disallows the GC. Furthermore,
> > we read that list with an acquire load which guarantees that the fields
> > have been initialized.
> >
> > Bug: v8:7790
> > Change-Id: I778d51f4ead44e472f842693a7e9ff577d6acfe3
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2826541
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Reviewed-by: Georg Neis <neis@chromium.org>
> > Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#74086}
>
> Bug: v8:7790
> Change-Id: I721c3a1e962951b0bc073dc74baf7fbeababc243
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2843813
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74104}

Bug: v8:7790
Change-Id: I4efa8165b680eaa6c5c525d85d21962e6a5b1abb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2843822Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74106}
parent e4a580c9
......@@ -2880,14 +2880,14 @@ bool MapRef::HasOnlyStablePrototypesWithFastElements(
}
bool MapRef::supports_fast_array_iteration() const {
if (data_->should_access_heap() || FLAG_turbo_direct_heap_access) {
if (data_->should_access_heap()) {
return SupportsFastArrayIteration(broker()->isolate(), object());
}
return data()->AsMap()->supports_fast_array_iteration();
}
bool MapRef::supports_fast_array_resize() const {
if (data_->should_access_heap() || FLAG_turbo_direct_heap_access) {
if (data_->should_access_heap()) {
return SupportsFastArrayResize(broker()->isolate(), object());
}
return data()->AsMap()->supports_fast_array_resize();
......
......@@ -569,12 +569,9 @@ class Heap {
V8_EXPORT_PRIVATE int NotifyContextDisposed(bool dependant_context);
void set_native_contexts_list(Object object) {
native_contexts_list_.store(object.ptr(), std::memory_order_release);
}
Object native_contexts_list() const {
return Object(native_contexts_list_.load(std::memory_order_acquire));
native_contexts_list_ = object;
}
Object native_contexts_list() const { return native_contexts_list_; }
void set_allocation_sites_list(Object object) {
allocation_sites_list_ = object;
......@@ -2203,9 +2200,7 @@ class Heap {
// Weak list heads, threaded through the objects.
// List heads are initialized lazily and contain the undefined_value at start.
// {native_contexts_list_} is an Address instead of an Object to allow the use
// of atomic accessors.
std::atomic<Address> native_contexts_list_;
Object native_contexts_list_;
Object allocation_sites_list_;
Object dirty_js_finalization_registries_list_;
// Weak list tails.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment