OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2158 DISALLOW_COPY_AND_ASSIGN(HOptimizedGraphBuilder); | 2158 DISALLOW_COPY_AND_ASSIGN(HOptimizedGraphBuilder); |
2159 }; | 2159 }; |
2160 | 2160 |
2161 | 2161 |
2162 Zone* AstContext::zone() const { return owner_->zone(); } | 2162 Zone* AstContext::zone() const { return owner_->zone(); } |
2163 | 2163 |
2164 | 2164 |
2165 class HStatistics V8_FINAL: public Malloced { | 2165 class HStatistics V8_FINAL: public Malloced { |
2166 public: | 2166 public: |
2167 HStatistics() | 2167 HStatistics() |
2168 : times_(5), | 2168 : timing_(5), |
2169 names_(5), | 2169 names_(5), |
2170 sizes_(5), | 2170 sizes_(5), |
| 2171 create_graph_(0), |
| 2172 optimize_graph_(0), |
| 2173 generate_code_(0), |
2171 total_size_(0), | 2174 total_size_(0), |
| 2175 full_code_gen_(0), |
2172 source_size_(0) { } | 2176 source_size_(0) { } |
2173 | 2177 |
2174 void Initialize(CompilationInfo* info); | 2178 void Initialize(CompilationInfo* info); |
2175 void Print(); | 2179 void Print(); |
2176 void SaveTiming(const char* name, TimeDelta time, unsigned size); | 2180 void SaveTiming(const char* name, int64_t ticks, unsigned size); |
2177 | 2181 |
2178 void IncrementFullCodeGen(TimeDelta full_code_gen) { | 2182 void IncrementFullCodeGen(int64_t full_code_gen) { |
2179 full_code_gen_ += full_code_gen; | 2183 full_code_gen_ += full_code_gen; |
2180 } | 2184 } |
2181 | 2185 |
2182 void IncrementSubtotals(TimeDelta create_graph, | 2186 void IncrementSubtotals(int64_t create_graph, |
2183 TimeDelta optimize_graph, | 2187 int64_t optimize_graph, |
2184 TimeDelta generate_code) { | 2188 int64_t generate_code) { |
2185 create_graph_ += create_graph; | 2189 create_graph_ += create_graph; |
2186 optimize_graph_ += optimize_graph; | 2190 optimize_graph_ += optimize_graph; |
2187 generate_code_ += generate_code; | 2191 generate_code_ += generate_code; |
2188 } | 2192 } |
2189 | 2193 |
2190 private: | 2194 private: |
2191 List<TimeDelta> times_; | 2195 List<int64_t> timing_; |
2192 List<const char*> names_; | 2196 List<const char*> names_; |
2193 List<unsigned> sizes_; | 2197 List<unsigned> sizes_; |
2194 TimeDelta create_graph_; | 2198 int64_t create_graph_; |
2195 TimeDelta optimize_graph_; | 2199 int64_t optimize_graph_; |
2196 TimeDelta generate_code_; | 2200 int64_t generate_code_; |
2197 unsigned total_size_; | 2201 unsigned total_size_; |
2198 TimeDelta full_code_gen_; | 2202 int64_t full_code_gen_; |
2199 double source_size_; | 2203 double source_size_; |
2200 }; | 2204 }; |
2201 | 2205 |
2202 | 2206 |
2203 class HPhase : public CompilationPhase { | 2207 class HPhase : public CompilationPhase { |
2204 public: | 2208 public: |
2205 HPhase(const char* name, HGraph* graph) | 2209 HPhase(const char* name, HGraph* graph) |
2206 : CompilationPhase(name, graph->info()), | 2210 : CompilationPhase(name, graph->info()), |
2207 graph_(graph) { } | 2211 graph_(graph) { } |
2208 ~HPhase(); | 2212 ~HPhase(); |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2314 } | 2318 } |
2315 | 2319 |
2316 private: | 2320 private: |
2317 HGraphBuilder* builder_; | 2321 HGraphBuilder* builder_; |
2318 }; | 2322 }; |
2319 | 2323 |
2320 | 2324 |
2321 } } // namespace v8::internal | 2325 } } // namespace v8::internal |
2322 | 2326 |
2323 #endif // V8_HYDROGEN_H_ | 2327 #endif // V8_HYDROGEN_H_ |
OLD | NEW |