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

Unified Diff: runtime/vm/isolate.h

Issue 1877973002: Invalidate background compilation only if relevant fields were invalidated. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 8 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
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index e1564da5f24cd65f085c4b026b5cac48be02f523..8691dba44e2958aaf4fe00c78503361b714bca5c 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -522,6 +522,13 @@ class Isolate : public BaseIsolate {
return AtomicOperations::LoadRelaxedIntPtr(&loading_invalidation_gen_);
}
+ // Used by mutator thread to notify background compiler which fields
+ // triggered code invalidation.
+ void AddDisablingField(const Field& field);
+ // Returns Field::null() if none available in the list.
+ RawField* GetDisablingField();
+ void ClearDisablingFieldList();
+
// Used by background compiler which field became boxed and must trigger
// deoptimization in the mutator thread.
void AddDeoptimizingBoxedField(const Field& field);
@@ -744,10 +751,13 @@ class Isolate : public BaseIsolate {
intptr_t loading_invalidation_gen_;
intptr_t top_level_parsing_count_;
- // Protect access to boxed_field_list_.
- Mutex* boxed_field_list_mutex_;
+ // Protect access to boxed_field_list_ and disabling_field_list_.
+ Mutex* field_list_mutex_;
// List of fields that became boxed and that trigger deoptimization.
RawGrowableObjectArray* boxed_field_list_;
+ // List of fields that were disabling code while background compiler
+ // was running.
+ RawGrowableObjectArray* disabling_field_list_;
// This guards spawn_count_. An isolate cannot complete shutdown and be
// destroyed while there are child isolates in the midst of a spawn.
« runtime/vm/compiler.cc ('K') | « runtime/vm/compiler.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698