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

Unified Diff: src/compiler.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 | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 8fac53e970322fee813cdfbd3e05cb07ef7a6239..992ed4e82dc93c006a4371cadc70aeb58f4e8da7 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -23,6 +23,7 @@
#include "src/frames-inl.h"
#include "src/full-codegen/full-codegen.h"
#include "src/globals.h"
+#include "src/heap/heap.h"
#include "src/interpreter/interpreter.h"
#include "src/isolate-inl.h"
#include "src/log-inl.h"
@@ -705,6 +706,15 @@ bool GetOptimizedCodeLater(CompilationJob* job) {
return false;
}
+ if (isolate->heap()->HighMemoryPressure()) {
+ if (FLAG_trace_concurrent_recompilation) {
+ PrintF(" ** High memory pressure, will retry optimizing ");
+ info->closure()->ShortPrint();
+ PrintF(" later.\n");
+ }
+ return false;
+ }
+
// All handles below this point will be allocated in a deferred handle scope
// that is detached and handed off to the background thread when we return.
CompilationHandleScope handle_scope(info);
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698