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

Unified Diff: runtime/vm/thread.cc

Issue 1841213003: Move CompilerStats from isolate to thread. Aggregate stats. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: review comments addressed Created 4 years, 9 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/thread.h ('k') | runtime/vm/timer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread.cc
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 9b36cd45b386c21b080b641992325da2a1bac483..5775145f60431576e7d18b72f94501fd2b884bfa 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -4,6 +4,7 @@
#include "vm/thread.h"
+#include "vm/compiler_stats.h"
#include "vm/dart_api_state.h"
#include "vm/growable_array.h"
#include "vm/isolate.h"
@@ -30,6 +31,10 @@ DECLARE_FLAG(bool, trace_service_verbose);
Thread::~Thread() {
// We should cleanly exit any isolate before destruction.
ASSERT(isolate_ == NULL);
+ if (compiler_stats_ != NULL) {
+ delete compiler_stats_;
+ compiler_stats_ = NULL;
+ }
// There should be no top api scopes at this point.
ASSERT(api_top_scope() == NULL);
// Delete the resusable api scope if there is one.
@@ -85,6 +90,7 @@ Thread::Thread(Isolate* isolate)
deopt_id_(0),
pending_functions_(GrowableObjectArray::null()),
sticky_error_(Error::null()),
+ compiler_stats_(NULL),
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT)
safepoint_state_(0),
@@ -110,6 +116,13 @@ LEAF_RUNTIME_ENTRY_LIST(DEFAULT_INIT)
if ((Dart::vm_isolate() != NULL) && (isolate != Dart::vm_isolate())) {
InitVMConstants();
}
+
+ if (FLAG_support_compiler_stats) {
+ compiler_stats_ = new CompilerStats(isolate);
+ if (FLAG_compiler_benchmark) {
+ compiler_stats_->EnableBenchmark();
+ }
+ }
}
« no previous file with comments | « runtime/vm/thread.h ('k') | runtime/vm/timer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698