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

[heap] Reset mememory pressure after full GC

GCs should reset memory pressure back to none on GC. Especially with
background threads calling MemoryPressureNotification to start a
collection.

Bug: v8:10315
Change-Id: I4dbda71e8434eb7949c0f9b978662b32910133cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2418400Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69996}
parent c0564971
......@@ -1092,7 +1092,11 @@ void Heap::DeoptMarkedAllocationSites() {
Deoptimizer::DeoptimizeMarkedCode(isolate_);
}
void Heap::GarbageCollectionEpilogueInSafepoint() {
void Heap::GarbageCollectionEpilogueInSafepoint(GarbageCollector collector) {
if (collector == MARK_COMPACTOR) {
memory_pressure_level_ = MemoryPressureLevel::kNone;
}
TRACE_GC(tracer(), GCTracer::Scope::HEAP_EPILOGUE_SAFEPOINT);
#define UPDATE_COUNTERS_FOR_SPACE(space) \
......@@ -2130,7 +2134,7 @@ size_t Heap::PerformGarbageCollection(
RecomputeLimits(collector);
GarbageCollectionEpilogueInSafepoint();
GarbageCollectionEpilogueInSafepoint(collector);
tracer()->StopInSafepoint();
......
......@@ -1817,7 +1817,7 @@ class Heap {
void GarbageCollectionPrologue();
void GarbageCollectionPrologueInSafepoint();
void GarbageCollectionEpilogue();
void GarbageCollectionEpilogueInSafepoint();
void GarbageCollectionEpilogueInSafepoint(GarbageCollector collector);
// Performs a major collection in the whole heap.
void MarkCompact();
......
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