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

Unified Diff: runtime/vm/isolate.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
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();
}
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/thread.h » ('j') | runtime/vm/thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698