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

Unified Diff: runtime/vm/dart.cc

Issue 2992893002: Reapply "[vm] Don't enable the profiler by default. Enable the profiler at startup with --observe, … (Closed)
Patch Set: native symbol resolver Created 3 years, 4 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/observatory/tests/service/test_helper.dart ('k') | runtime/vm/flag_list.h » ('j') | 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 4553d1b5f9e483e93de952100bcda410fe1d6e92..b4f62b99a3021dd5080d730ffb8432b9d2037b5c 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -149,11 +149,9 @@ char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot,
FreeListElement::InitOnce();
ForwardingCorpse::InitOnce();
Api::InitOnce();
+ NativeSymbolResolver::InitOnce();
NOT_IN_PRODUCT(CodeObservers::InitOnce());
- if (FLAG_profiler) {
- ThreadInterrupter::InitOnce();
- Profiler::InitOnce();
- }
+ NOT_IN_PRODUCT(Profiler::InitOnce());
SemiSpace::InitOnce();
NOT_IN_PRODUCT(Metric::InitOnce());
StoreBuffer::InitOnce();
@@ -354,14 +352,15 @@ const char* Dart::Cleanup() {
UptimeMillis());
}
- if (FLAG_profiler) {
- // Shut down profiling.
- if (FLAG_trace_shutdown) {
- OS::PrintErr("[+%" Pd64 "ms] SHUTDOWN: Shutting down profiling\n",
- UptimeMillis());
- }
- Profiler::Shutdown();
+#if !defined(PRODUCT)
+ if (FLAG_trace_shutdown) {
+ OS::PrintErr("[+%" Pd64 "ms] SHUTDOWN: Shutting down profiling\n",
+ UptimeMillis());
}
+ Profiler::Shutdown();
+#endif // !defined(PRODUCT)
+
+ NativeSymbolResolver::ShutdownOnce();
{
// Set the VM isolate as current isolate when shutting down
« no previous file with comments | « runtime/observatory/tests/service/test_helper.dart ('k') | runtime/vm/flag_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698