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

Unified Diff: runtime/vm/timeline_analysis.h

Issue 1296353002: Add --timing (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/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 5f5049b691674e3b0e8330f2825e58d745e256c4..b49d82147d2db32ba908a45627892bdba2720849 100644
--- a/runtime/vm/timeline_analysis.h
+++ b/runtime/vm/timeline_analysis.h
@@ -150,6 +150,8 @@ class TimelineLabelPauseInfo : public ZoneAllocated {
ASSERT(exclusive_micros_ >= 0);
}
+ void Aggregate(const TimelineLabelPauseInfo* thread_pause_info);
+
const char* name_;
int64_t inclusive_micros_;
int64_t exclusive_micros_;
@@ -157,6 +159,7 @@ class TimelineLabelPauseInfo : public ZoneAllocated {
int64_t max_exclusive_micros_;
friend class TimelinePauses;
+ friend class TimelinePauseTrace;
};
@@ -177,6 +180,14 @@ class TimelinePauses : public TimelineAnalysis {
int64_t MaxInclusiveTime(const char* name) const;
int64_t MaxExclusiveTime(const char* name) const;
+ intptr_t NumPauseInfos() const {
+ return labels_.length();
+ }
+
+ const TimelineLabelPauseInfo* PauseInfoAt(intptr_t i) const {
+ return labels_.At(i);
+ }
+
private:
struct StackItem {
TimelineEvent* event;
@@ -188,7 +199,7 @@ class TimelinePauses : public TimelineAnalysis {
bool CheckStack(TimelineEvent* event);
void PopFinished(int64_t start);
void Push(TimelineEvent* event);
- bool IsLabelOnStack(const char* label);
+ bool IsLabelOnStack(const char* label) const;
intptr_t StackDepth() const;
StackItem& GetStackTop();
TimelineLabelPauseInfo* GetOrAddLabelPauseInfo(const char* name);
@@ -197,6 +208,22 @@ class TimelinePauses : public TimelineAnalysis {
ZoneGrowableArray<TimelineLabelPauseInfo*> labels_;
};
+
+class TimelinePauseTrace : public ValueObject {
+ public:
+ TimelinePauseTrace();
+ ~TimelinePauseTrace();
+
+ void Print();
+
+ private:
+ TimelineLabelPauseInfo* GetOrAddLabelPauseInfo(const char* name);
+ void Aggregate(const TimelineLabelPauseInfo* thread_pause_info);
+ void PrintPauseInfo(const TimelineLabelPauseInfo* pause_info);
+
+ ZoneGrowableArray<TimelineLabelPauseInfo*> isolate_labels_;
+};
+
} // namespace dart
#endif // VM_TIMELINE_ANALYSIS_H_
« 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