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

Unified Diff: runtime/vm/dart.cc

Issue 1531553002: Fix --print-metrics (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart.cc
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index eb12276a9200dcdf0880351385ca6931ea558e9a..75689247de36c62c526e186d9aea4ec9f742e5ce 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -225,6 +225,14 @@ const char* Dart::Cleanup() {
// Shut down profiling.
Profiler::Shutdown();
+ {
+ // Set the VM isolate as current isolate when shutting down
+ // Metrics so that we can use a StackZone.
+ Thread::EnterIsolate(vm_isolate_);
+ Metric::Cleanup();
+ Thread::ExitIsolate();
+ }
+
if (FLAG_shutdown) {
// Disable the creation of new isolates.
Isolate::DisableIsolateCreation();
@@ -266,7 +274,6 @@ const char* Dart::Cleanup() {
CodeObservers::DeleteAll();
Timeline::Shutdown();
- Metric::Cleanup();
return NULL;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698