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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1363033003: Make TimelineEventBlocks reclaimable (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | runtime/vm/thread.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | runtime/vm/thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698