OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_PIPELINE_STATISTICS_H_ | 5 #ifndef V8_COMPILER_PIPELINE_STATISTICS_H_ |
6 #define V8_COMPILER_PIPELINE_STATISTICS_H_ | 6 #define V8_COMPILER_PIPELINE_STATISTICS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "src/compilation-statistics.h" | 10 #include "src/compilation-statistics.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 CommonStats phase_stats_; | 69 CommonStats phase_stats_; |
70 | 70 |
71 DISALLOW_COPY_AND_ASSIGN(PipelineStatistics); | 71 DISALLOW_COPY_AND_ASSIGN(PipelineStatistics); |
72 }; | 72 }; |
73 | 73 |
74 | 74 |
75 class PhaseScope { | 75 class PhaseScope { |
76 public: | 76 public: |
77 PhaseScope(PipelineStatistics* pipeline_stats, const char* name) | 77 PhaseScope(PipelineStatistics* pipeline_stats, const char* name) |
78 : pipeline_stats_(pipeline_stats) { | 78 : pipeline_stats_(pipeline_stats) { |
79 if (pipeline_stats_ != NULL) pipeline_stats_->BeginPhase(name); | 79 if (pipeline_stats_ != nullptr) pipeline_stats_->BeginPhase(name); |
80 } | 80 } |
81 ~PhaseScope() { | 81 ~PhaseScope() { |
82 if (pipeline_stats_ != NULL) pipeline_stats_->EndPhase(); | 82 if (pipeline_stats_ != nullptr) pipeline_stats_->EndPhase(); |
83 } | 83 } |
84 | 84 |
85 private: | 85 private: |
86 PipelineStatistics* const pipeline_stats_; | 86 PipelineStatistics* const pipeline_stats_; |
87 | 87 |
88 DISALLOW_COPY_AND_ASSIGN(PhaseScope); | 88 DISALLOW_COPY_AND_ASSIGN(PhaseScope); |
89 }; | 89 }; |
90 | 90 |
91 } // namespace compiler | 91 } // namespace compiler |
92 } // namespace internal | 92 } // namespace internal |
93 } // namespace v8 | 93 } // namespace v8 |
94 | 94 |
95 #endif | 95 #endif |
OLD | NEW |