| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |