| Index: runtime/vm/dart_api_impl.cc
|
| diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
|
| index e47d14e0f754c21b2c910ee6deab5b37918e1b99..cdf236006e76eb66d91827e58766283e186ccbdc 100644
|
| --- a/runtime/vm/dart_api_impl.cc
|
| +++ b/runtime/vm/dart_api_impl.cc
|
| @@ -5773,15 +5773,11 @@ DART_EXPORT bool Dart_TimelineGetTrace(Dart_StreamConsumer consumer,
|
| // Nothing has been recorded.
|
| return false;
|
| }
|
| - // Suspend execution of other threads while serializing to JSON.
|
| - isolate->thread_registry()->SafepointThreads();
|
| - // TODO(johnmccutchan): Reclaim open blocks from isolate so we have a complete
|
| - // timeline.
|
| + // Reclaim all blocks cached by isolate.
|
| + Timeline::ReclaimIsolateBlocks();
|
| JSONStream js;
|
| IsolateTimelineEventFilter filter(isolate);
|
| timeline_recorder->PrintJSON(&js, &filter);
|
| - // Resume execution of other threads.
|
| - isolate->thread_registry()->ResumeAllThreads();
|
|
|
| // Copy output.
|
| char* output = NULL;
|
| @@ -5810,8 +5806,8 @@ DART_EXPORT bool Dart_GlobalTimelineGetTrace(Dart_StreamConsumer consumer,
|
| return false;
|
| }
|
|
|
| - // TODO(johnmccutchan): Reclaim all open blocks from the system so we have
|
| - // a complete timeline.
|
| + // Reclaim all blocks cached in the system.
|
| + Timeline::ReclaimAllBlocks();
|
| JSONStream js;
|
| TimelineEventFilter filter;
|
| timeline_recorder->PrintJSON(&js, &filter);
|
|
|