Commit b70fd41a authored by Dominik Inführ's avatar Dominik Inführ Committed by Commit Bot

Revert "[heap] Invoke OldGenerationAllocationCounter in Safepoint"

This reverts commit 8bdd4e86.

Reason for revert: Caused multiple regressions.

Original change's description:
> [heap] Invoke OldGenerationAllocationCounter in Safepoint
>
> OldGenerationAllocationCounter() needs to be invoked in safepoint,
> otherwise invocation races with background threads incrementing the
> counter.
>
> Bug: v8:10315
> Change-Id: Iab005582bab7ebf63e7a5a796b25690f499a99eb
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2235544
> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68250}

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:10315, chromium:1095475, chromium:1094968, chromium:1094965
Change-Id: Ib221a907bf3e6a096398c42e74f78f9f48647063
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2259854
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68482}
parent ce49d2a3
......@@ -228,6 +228,10 @@ void GCTracer::Start(GarbageCollector collector,
if (start_counter_ != 1) return;
previous_ = current_;
double start_time = heap_->MonotonicallyIncreasingTimeInMs();
SampleAllocation(start_time, heap_->NewSpaceAllocationCounter(),
heap_->OldGenerationAllocationCounter(),
heap_->EmbedderAllocationCounter());
switch (collector) {
case SCAVENGER:
......@@ -248,7 +252,7 @@ void GCTracer::Start(GarbageCollector collector,
}
current_.reduce_memory = heap_->ShouldReduceMemory();
current_.start_time = heap_->MonotonicallyIncreasingTimeInMs();
current_.start_time = start_time;
current_.start_object_size = 0;
current_.start_memory_size = 0;
current_.start_holes_size = 0;
......@@ -277,10 +281,6 @@ void GCTracer::Start(GarbageCollector collector,
}
void GCTracer::StartInSafepoint() {
SampleAllocation(current_.start_time, heap_->NewSpaceAllocationCounter(),
heap_->OldGenerationAllocationCounter(),
heap_->EmbedderAllocationCounter());
current_.start_object_size = heap_->SizeOfObjects();
current_.start_memory_size = heap_->memory_allocator()->Size();
current_.start_holes_size = CountTotalHolesSize(heap_);
......
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