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

Unified Diff: runtime/vm/isolate.h

Issue 1418813008: This adds a mechanism to invalidate code that was generated in the background. The invalidation can… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: sync Created 5 years, 2 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 | « runtime/vm/compiler.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.h
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 35ca9e4867e6e9d549a6e6d04ed8235bb86004ad..52b078fb29de6adec9f1f2ace1b84d46b362a090 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -614,10 +614,10 @@ class Isolate : public BaseIsolate {
}
void set_compilation_function_queue(const GrowableObjectArray& value);
- RawGrowableObjectArray* compilation_code_queue() const {
- return compilation_code_queue_;
+ RawGrowableObjectArray* compilation_result_queue() const {
+ return compilation_result_queue_;
}
- void set_compilation_code_queue(const GrowableObjectArray& value);
+ void set_compilation_result_queue(const GrowableObjectArray& value);
Metric* metrics_list_head() {
return metrics_list_head_;
@@ -644,6 +644,18 @@ class Isolate : public BaseIsolate {
all_classes_finalized_ = value;
}
+ void IncrCHAInvalidationGen() { cha_invalidation_gen_++; }
+ void ResetCHAInvalidationGen() { cha_invalidation_gen_ = 0; }
+ uint32_t cha_invalidation_gen() const { return cha_invalidation_gen_; }
+
+ void IncrFieldInvalidationGen() { field_invalidation_gen_++; }
+ void ResetFieldInvalidationGen() { field_invalidation_gen_ = 0; }
+ uint32_t field_invalidation_gen() const { return field_invalidation_gen_; }
+
+ void IncrPrefixInvalidationGen() { prefix_invalidation_gen_++; }
+ void ResetPrefixInvalidationGen() { prefix_invalidation_gen_ = 0; }
+ uint32_t prefix_invalidation_gen() const { return prefix_invalidation_gen_; }
+
RawObject* InvokePendingServiceExtensionCalls();
void AppendServiceExtensionCall(const Instance& closure,
const String& method_name,
@@ -805,7 +817,7 @@ class Isolate : public BaseIsolate {
// Background compilation.
BackgroundCompiler* background_compiler_;
RawGrowableObjectArray* compilation_function_queue_;
- RawGrowableObjectArray* compilation_code_queue_;
+ RawGrowableObjectArray* compilation_result_queue_;
// We use 6 list entries for each pending service extension calls.
enum {
@@ -838,6 +850,13 @@ class Isolate : public BaseIsolate {
// Used to wake the isolate when it is in the pause event loop.
Monitor* pause_loop_monitor_;
+ // Invalidation generations; used to track events occuring in parallel
+ // to background compilation. The counters may overflow, which is OK
+ // since we check for equality to detect if an event occured.
+ uint32_t cha_invalidation_gen_;
+ uint32_t field_invalidation_gen_;
+ uint32_t prefix_invalidation_gen_;
+
#define ISOLATE_METRIC_VARIABLE(type, variable, name, unit) \
type metric_##variable##_;
ISOLATE_METRIC_LIST(ISOLATE_METRIC_VARIABLE);
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698