Commit 826cf695 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

Revert "[heap] Expand new space in safepoint"

This reverts commit 31c66193.

Reason for revert: Speculative revert for lots of timeouts on the
tree, some seem heap related, e.g.
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20-%20cfi/25151

Original change's description:
> [heap] Expand new space in safepoint
> 
> Move expansion of the new space into the safepoint. Otherwise background
> threads race with the main thread when accessing the new space capacity.
> This will most likely also be required to allow the allocation of new
> space objects from background threads.
> 
> Bug: v8:10315
> Change-Id: Ia8ac0c9f582876b655eaf4e35082aeadfbdb830e
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235532
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68226}

TBR=ulan@chromium.org,dinfuehr@chromium.org

Change-Id: I8da9aa000090a9bff43bb15b7bb55bb5a3138fe5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10315
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235539Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68237}
parent a3c0bc57
......@@ -862,6 +862,7 @@ void Heap::GarbageCollectionPrologue() {
} else {
maximum_size_scavenges_ = 0;
}
CheckNewSpaceExpansionCriteria();
UpdateNewSpaceAllocationCounter();
if (FLAG_track_retaining_path) {
retainer_.clear();
......@@ -871,10 +872,6 @@ void Heap::GarbageCollectionPrologue() {
memory_allocator()->unmapper()->PrepareForGC();
}
void Heap::GarbageCollectionPrologueInSafepoint() {
CheckNewSpaceExpansionCriteria();
}
size_t Heap::SizeOfObjects() {
size_t total = 0;
......@@ -2094,8 +2091,6 @@ size_t Heap::PerformGarbageCollection(
#endif
tracer()->StartInSafepoint();
GarbageCollectionPrologueInSafepoint();
EnsureFromSpaceIsCommitted();
size_t start_young_generation_size =
......
......@@ -1786,7 +1786,6 @@ class Heap {
// Code that should be run before and after each GC. Includes some
// reporting/verification activities when compiled with DEBUG set.
void GarbageCollectionPrologue();
void GarbageCollectionPrologueInSafepoint();
void GarbageCollectionEpilogue();
void GarbageCollectionEpilogueInSafepoint();
......
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