5 #ifndef V8_COMPILER_PIPELINE_STATISTICS_H_ 6 #define V8_COMPILER_PIPELINE_STATISTICS_H_ 11 #include "src/base/platform/elapsed-timer.h" 12 #include "src/compilation-statistics.h" 13 #include "src/compiler/zone-stats.h" 27 void BeginPhaseKind(
const char* phase_kind_name);
31 size_t OuterZoneSize() {
32 return static_cast<size_t>(outer_zone_->allocation_size());
37 CommonStats() : outer_zone_initial_size_(0) {}
43 std::unique_ptr<ZoneStats::StatsScope> scope_;
45 size_t outer_zone_initial_size_;
46 size_t allocated_bytes_at_start_;
49 DISALLOW_COPY_AND_ASSIGN(CommonStats);
52 bool InPhaseKind() {
return !!phase_kind_stats_.scope_; }
55 bool InPhase() {
return !!phase_stats_.scope_; }
56 void BeginPhase(
const char* name);
62 std::string function_name_;
65 CommonStats total_stats_;
69 const char* phase_kind_name_;
70 CommonStats phase_kind_stats_;
73 const char* phase_name_;
74 CommonStats phase_stats_;
83 : pipeline_stats_(pipeline_stats) {
84 if (pipeline_stats_ !=
nullptr) pipeline_stats_->BeginPhase(name);
87 if (pipeline_stats_ !=
nullptr) pipeline_stats_->EndPhase();
100 #endif // V8_COMPILER_PIPELINE_STATISTICS_H_