| Index: runtime/vm/profiler.cc
|
| diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
|
| index a99b48ee84b38090e31fdc1e74dc7b6e2eef88a3..12b31d01f1a32731b7b46d34203c4a52939f6afd 100644
|
| --- a/runtime/vm/profiler.cc
|
| +++ b/runtime/vm/profiler.cc
|
| @@ -78,6 +78,7 @@ void Profiler::InitOnce() {
|
| // Zero counters.
|
| memset(&counters_, 0, sizeof(counters_));
|
| NativeSymbolResolver::InitOnce();
|
| + ThreadInterrupter::InitOnce();
|
| ThreadInterrupter::SetInterruptPeriod(FLAG_profile_period);
|
| ThreadInterrupter::Startup();
|
| initialized_ = true;
|
| @@ -97,6 +98,13 @@ void Profiler::Shutdown() {
|
| ASSERT(initialized_);
|
| ThreadInterrupter::Shutdown();
|
| NativeSymbolResolver::ShutdownOnce();
|
| +#if defined(HOST_OS_LINUX) || defined(HOST_OS_MACOS) || defined(HOST_OS_ANDROID)
|
| + // TODO(30309): Free the sample buffer on platforms that use a signal-based
|
| + // thread interrupter.
|
| +#else
|
| + delete sample_buffer_;
|
| + sample_buffer_ = NULL;
|
| +#endif
|
| }
|
|
|
| void Profiler::SetSampleDepth(intptr_t depth) {
|
|
|