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

Unified Diff: runtime/vm/timeline_analysis.h

Issue 1297443002: Improve timeline iterators and tests (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.cc ('k') | runtime/vm/timeline_analysis.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/timeline_analysis.h
diff --git a/runtime/vm/timeline_analysis.h b/runtime/vm/timeline_analysis.h
index ffdad36d940171a85df1f915c8b1ac344344aa47..2e12deddc9e9fc5eb930fe53e8331c46db228474 100644
--- a/runtime/vm/timeline_analysis.h
+++ b/runtime/vm/timeline_analysis.h
@@ -38,6 +38,25 @@ class TimelineAnalysisThread : public ZoneAllocated {
};
+class TimelineAnalysisThreadEventIterator : public ValueObject {
+ public:
+ explicit TimelineAnalysisThreadEventIterator(TimelineAnalysisThread* thread);
+ ~TimelineAnalysisThreadEventIterator();
+
+ void Reset(TimelineAnalysisThread* thread);
+
+ bool HasNext() const;
+
+ TimelineEvent* Next();
+
+ private:
+ TimelineAnalysisThread* thread_;
+ TimelineEvent* current_;
+ intptr_t block_cursor_;
+ intptr_t event_cursor_;
+};
+
+
// Base of all timeline analysis classes. Base functionality:
// - discovery of all thread ids in a recording.
// - collecting all ThreadEventBlocks by thread id.
@@ -91,6 +110,9 @@ class TimelinePauses : public TimelineAnalysis {
TimelinePauses(Zone* zone,
Isolate* isolate,
TimelineEventRecorder* recorder);
+
+ void CalculatePauseTimes();
+
private:
};
« no previous file with comments | « runtime/vm/timeline.cc ('k') | runtime/vm/timeline_analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698