Chromium Code Reviews| Index: runtime/vm/dart.cc |
| diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc |
| index 4553d1b5f9e483e93de952100bcda410fe1d6e92..02d2105a363612462e001d058370b949838d57e2 100644 |
| --- a/runtime/vm/dart.cc |
| +++ b/runtime/vm/dart.cc |
| @@ -150,10 +150,7 @@ char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot, |
| ForwardingCorpse::InitOnce(); |
| Api::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 +351,13 @@ 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(); |
| +#ifndef PRODUCT |
|
zra
2017/07/31 15:03:11
Is there any reason to use this rather than the us
rmacnak
2017/07/31 21:12:12
No reason, switched.
|
| + if (FLAG_trace_shutdown) { |
| + OS::PrintErr("[+%" Pd64 "ms] SHUTDOWN: Shutting down profiling\n", |
| + UptimeMillis()); |
| } |
| + Profiler::Shutdown(); |
| +#endif |
|
zra
2017/07/31 15:03:11
// !defined(PRODUCT)
|
| { |
| // Set the VM isolate as current isolate when shutting down |