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

Unified Diff: runtime/vm/timeline.cc

Issue 1295563002: Allow TimelineAnalysis to work on any TimelineEventRecorder (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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/timeline.h ('k') | runtime/vm/timeline_analysis.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « runtime/vm/timeline.h ('k') | runtime/vm/timeline_analysis.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698