Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Unified Diff: src/heap/heap.cc

Issue 2145683003: Flush the optimizing compilejob queue when doing memory pressure GCs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index b3b24930e2d4329da1431ee842d0237be151705d..84681000d39eac5a3069208ccf2123349aa7aa8b 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4372,6 +4372,13 @@ class MemoryPressureInterruptTask : public CancelableTask {
};
void Heap::CheckMemoryPressure() {
+ if (HighMemoryPressure()) {
+ if (isolate()->concurrent_recompilation_enabled()) {
+ // The optimizing compiler may be unnecessarily holding on to memory.
+ DisallowHeapAllocation no_recursive_gc;
+ isolate()->optimizing_compile_dispatcher()->Flush();
+ }
+ }
if (memory_pressure_level_.Value() == MemoryPressureLevel::kCritical) {
CollectGarbageOnMemoryPressure("memory pressure");
} else if (memory_pressure_level_.Value() == MemoryPressureLevel::kModerate) {
« no previous file with comments | « src/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698