| Index: runtime/vm/isolate.cc
|
| diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
|
| index 685e457309e103c72e593b692c8b3003ee86495b..e3164bc07ab6f4e3b13ab946877840f0ebdf7272 100644
|
| --- a/runtime/vm/isolate.cc
|
| +++ b/runtime/vm/isolate.cc
|
| @@ -1515,8 +1515,8 @@ void Isolate::LowLevelShutdown() {
|
| // Dump all accumulated timer data for the isolate.
|
| timer_list_.ReportTimers();
|
|
|
| - // Before analyzing the isolate's timeline blocks- close all of them.
|
| - CloseAllTimelineBlocks();
|
| + // Before analyzing the isolate's timeline blocks- reclaim all cached blocks.
|
| + ReclaimTimelineBlocks();
|
|
|
| // Dump all timing data for the isolate.
|
| if (FLAG_timing) {
|
| @@ -1616,14 +1616,12 @@ void Isolate::Shutdown() {
|
| }
|
|
|
|
|
| -void Isolate::CloseAllTimelineBlocks() {
|
| - // Close all blocks
|
| - thread_registry_->CloseAllTimelineBlocks();
|
| +void Isolate::ReclaimTimelineBlocks() {
|
| TimelineEventRecorder* recorder = Timeline::recorder();
|
| - if (recorder != NULL) {
|
| - MutexLocker ml(&recorder->lock_);
|
| - Thread::Current()->CloseTimelineBlock();
|
| + if (recorder == NULL) {
|
| + return;
|
| }
|
| + thread_registry_->ReclaimTimelineBlocks();
|
| }
|
|
|
|
|
|
|