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

Side by Side Diff: runtime/vm/timeline_analysis.h

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 unified diff | Download patch
« no previous file with comments | « runtime/vm/timeline.cc ('k') | runtime/vm/timeline_analysis.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_TIMELINE_ANALYSIS_H_ 5 #ifndef VM_TIMELINE_ANALYSIS_H_
6 #define VM_TIMELINE_ANALYSIS_H_ 6 #define VM_TIMELINE_ANALYSIS_H_
7 7
8 #include "vm/growable_array.h" 8 #include "vm/growable_array.h"
9 #include "vm/timeline.h" 9 #include "vm/timeline.h"
10 10
(...skipping 27 matching lines...) Expand all
38 }; 38 };
39 39
40 40
41 // Base of all timeline analysis classes. Base functionality: 41 // Base of all timeline analysis classes. Base functionality:
42 // - discovery of all thread ids in a recording. 42 // - discovery of all thread ids in a recording.
43 // - collecting all ThreadEventBlocks by thread id. 43 // - collecting all ThreadEventBlocks by thread id.
44 class TimelineAnalysis : public ValueObject { 44 class TimelineAnalysis : public ValueObject {
45 public: 45 public:
46 TimelineAnalysis(Zone* zone, 46 TimelineAnalysis(Zone* zone,
47 Isolate* isolate, 47 Isolate* isolate,
48 TimelineEventEndlessRecorder* recorder); 48 TimelineEventRecorder* recorder);
49 ~TimelineAnalysis(); 49 ~TimelineAnalysis();
50 50
51 void BuildThreads(); 51 void BuildThreads();
52 52
53 intptr_t NumThreads() const { 53 intptr_t NumThreads() const {
54 return threads_.length(); 54 return threads_.length();
55 } 55 }
56 56
57 TimelineAnalysisThread* At(intptr_t i) const { 57 TimelineAnalysisThread* At(intptr_t i) const {
58 return threads_[i]; 58 return threads_[i];
(...skipping 12 matching lines...) Expand all
71 protected: 71 protected:
72 TimelineAnalysisThread* GetOrAddThread(ThreadId tid); 72 TimelineAnalysisThread* GetOrAddThread(ThreadId tid);
73 73
74 void DiscoverThreads(); 74 void DiscoverThreads();
75 void FinalizeThreads(); 75 void FinalizeThreads();
76 76
77 void SetError(const char* format, ...); 77 void SetError(const char* format, ...);
78 78
79 Zone* zone_; 79 Zone* zone_;
80 Isolate* isolate_; 80 Isolate* isolate_;
81 TimelineEventEndlessRecorder* recorder_; 81 TimelineEventRecorder* recorder_;
82 bool has_error_; 82 bool has_error_;
83 const char* error_msg_; 83 const char* error_msg_;
84 84
85 ZoneGrowableArray<TimelineAnalysisThread*> threads_; 85 ZoneGrowableArray<TimelineAnalysisThread*> threads_;
86 }; 86 };
87 87
88 88
89 class TimelinePauses : public TimelineAnalysis { 89 class TimelinePauses : public TimelineAnalysis {
90 public: 90 public:
91 TimelinePauses(Zone* zone, 91 TimelinePauses(Zone* zone,
92 Isolate* isolate, 92 Isolate* isolate,
93 TimelineEventEndlessRecorder* recorder); 93 TimelineEventRecorder* recorder);
94 private: 94 private:
95 }; 95 };
96 96
97 } // namespace dart 97 } // namespace dart
98 98
99 #endif // VM_TIMELINE_ANALYSIS_H_ 99 #endif // VM_TIMELINE_ANALYSIS_H_
OLDNEW
« 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