Index: runtime/vm/timeline.cc |
diff --git a/runtime/vm/timeline.cc b/runtime/vm/timeline.cc |
index 48a67201a4a37bf0f694df7ce72283b372041e2a..d29b057d87380267231fe153c4830eb2cbccdc51 100644 |
--- a/runtime/vm/timeline.cc |
+++ b/runtime/vm/timeline.cc |
@@ -456,6 +456,11 @@ TimelineEventBlock* TimelineEventRingRecorder::GetNewBlock() { |
} |
+TimelineEventBlock* TimelineEventRingRecorder::GetHeadBlock() { |
+ return blocks_[0]; |
+} |
+ |
+ |
TimelineEventBlock* TimelineEventRingRecorder::GetNewBlockLocked() { |
if (block_cursor_ == num_blocks_) { |
block_cursor_ = 0; |
@@ -569,6 +574,11 @@ TimelineEventBlock* TimelineEventEndlessRecorder::GetNewBlock() { |
} |
+TimelineEventBlock* TimelineEventEndlessRecorder::GetHeadBlock() { |
+ return head_; |
+} |
+ |
+ |
void TimelineEventEndlessRecorder::VisitObjectPointers( |
ObjectPointerVisitor* visitor) { |
// no-op. |
@@ -680,7 +690,7 @@ void TimelineEventBlock::Reset() { |
TimelineEventBlockIterator::TimelineEventBlockIterator( |
- TimelineEventEndlessRecorder* recorder) |
+ TimelineEventRecorder* recorder) |
: current_(NULL), |
recorder_(recorder) { |
if (recorder_ == NULL) { |
@@ -708,7 +718,7 @@ bool TimelineEventBlockIterator::Next() { |
return false; |
} |
if (current_ == NULL) { |
- current_ = recorder_->head_; |
+ current_ = recorder_->GetHeadBlock(); |
} else { |
current_ = current_->next(); |
} |