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

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
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 16c6a67d827113e7ee92642d73277b0b90863bf7..b1602307b8451bed3d17940388130d08c1a8fdea 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1600,8 +1600,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) {
@@ -1701,14 +1701,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698