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

Unified Diff: src/compiler-dispatcher/compiler-dispatcher.h

Issue 2608163006: Abort running compiler dispatcher tasks under memory pressure (Closed)
Patch Set: updates Created 3 years, 11 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/cancelable-task.h ('k') | src/compiler-dispatcher/compiler-dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler-dispatcher/compiler-dispatcher.h
diff --git a/src/compiler-dispatcher/compiler-dispatcher.h b/src/compiler-dispatcher/compiler-dispatcher.h
index f78c12f32aea6f2ce80fbdad1d6942efe98ee9de..38dd5976b38be05b4bec75716a69400f5c68b722 100644
--- a/src/compiler-dispatcher/compiler-dispatcher.h
+++ b/src/compiler-dispatcher/compiler-dispatcher.h
@@ -21,6 +21,7 @@
namespace v8 {
class Platform;
+enum class MemoryPressureLevel;
namespace internal {
@@ -83,6 +84,10 @@ class V8_EXPORT_PRIVATE CompilerDispatcher {
// Aborts all jobs. Blocks if requested.
void AbortAll(BlockingBehavior blocking);
+ // Memory pressure notifications from the embedder.
+ void MemoryPressureNotification(v8::MemoryPressureLevel level,
+ bool is_isolate_locked);
+
private:
FRIEND_TEST(CompilerDispatcherTest, IdleTaskSmallIdleTime);
FRIEND_TEST(IgnitionCompilerDispatcherTest, CompileOnBackgroundThread);
@@ -123,6 +128,8 @@ class V8_EXPORT_PRIVATE CompilerDispatcher {
// as script id is not necessarily unique.
JobMap jobs_;
+ base::AtomicValue<v8::MemoryPressureLevel> memory_pressure_level_;
+
// The following members can be accessed from any thread. Methods need to hold
// the mutex |mutex_| while accessing them.
base::Mutex mutex_;
« no previous file with comments | « src/cancelable-task.h ('k') | src/compiler-dispatcher/compiler-dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698