OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #include "src/crankshaft/compilation-phase.h" | 5 #include "src/crankshaft/compilation-phase.h" |
6 | 6 |
7 #include "src/crankshaft/hydrogen.h" | 7 #include "src/crankshaft/hydrogen.h" |
8 #include "src/isolate.h" | 8 #include "src/isolate.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
11 namespace internal { | 11 namespace internal { |
12 | 12 |
13 CompilationPhase::CompilationPhase(const char* name, CompilationInfo* info) | 13 CompilationPhase::CompilationPhase(const char* name, CompilationInfo* info) |
14 : name_(name), info_(info), zone_(info->isolate()->allocator()) { | 14 : name_(name), info_(info), zone_(info->isolate()->allocator(), ZONE_NAME) { |
15 if (FLAG_hydrogen_stats) { | 15 if (FLAG_hydrogen_stats) { |
16 info_zone_start_allocation_size_ = info->zone()->allocation_size(); | 16 info_zone_start_allocation_size_ = info->zone()->allocation_size(); |
17 timer_.Start(); | 17 timer_.Start(); |
18 } | 18 } |
19 } | 19 } |
20 | 20 |
21 CompilationPhase::~CompilationPhase() { | 21 CompilationPhase::~CompilationPhase() { |
22 if (FLAG_hydrogen_stats) { | 22 if (FLAG_hydrogen_stats) { |
23 size_t size = zone()->allocation_size(); | 23 size_t size = zone()->allocation_size(); |
24 size += info_->zone()->allocation_size() - info_zone_start_allocation_size_; | 24 size += info_->zone()->allocation_size() - info_zone_start_allocation_size_; |
(...skipping 10 matching lines...) Expand all Loading... |
35 ? FLAG_trace_hydrogen_stubs | 35 ? FLAG_trace_hydrogen_stubs |
36 : (FLAG_trace_hydrogen && | 36 : (FLAG_trace_hydrogen && |
37 info()->shared_info()->PassesFilter(FLAG_trace_hydrogen_filter)); | 37 info()->shared_info()->PassesFilter(FLAG_trace_hydrogen_filter)); |
38 return (tracing_on && | 38 return (tracing_on && |
39 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != | 39 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != |
40 NULL); | 40 NULL); |
41 } | 41 } |
42 | 42 |
43 } // namespace internal | 43 } // namespace internal |
44 } // namespace v8 | 44 } // namespace v8 |
OLD | NEW |