OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/hydrogen.h" | 5 #include "src/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 12576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12587 trace_.Reset(); | 12587 trace_.Reset(); |
12588 } | 12588 } |
12589 | 12589 |
12590 | 12590 |
12591 void HStatistics::Initialize(CompilationInfo* info) { | 12591 void HStatistics::Initialize(CompilationInfo* info) { |
12592 if (info->shared_info().is_null()) return; | 12592 if (info->shared_info().is_null()) return; |
12593 source_size_ += info->shared_info()->SourceSize(); | 12593 source_size_ += info->shared_info()->SourceSize(); |
12594 } | 12594 } |
12595 | 12595 |
12596 | 12596 |
12597 void HStatistics::Print(const char* stats_name) { | 12597 void HStatistics::Print() { |
12598 PrintF( | 12598 PrintF( |
12599 "\n" | 12599 "\n" |
12600 "----------------------------------------" | 12600 "----------------------------------------" |
12601 "----------------------------------------\n" | 12601 "----------------------------------------\n" |
12602 "--- %s timing results:\n" | 12602 "--- Hydrogen timing results:\n" |
12603 "----------------------------------------" | 12603 "----------------------------------------" |
12604 "----------------------------------------\n", | 12604 "----------------------------------------\n"); |
12605 stats_name); | |
12606 base::TimeDelta sum; | 12605 base::TimeDelta sum; |
12607 for (int i = 0; i < times_.length(); ++i) { | 12606 for (int i = 0; i < times_.length(); ++i) { |
12608 sum += times_[i]; | 12607 sum += times_[i]; |
12609 } | 12608 } |
12610 | 12609 |
12611 for (int i = 0; i < names_.length(); ++i) { | 12610 for (int i = 0; i < names_.length(); ++i) { |
12612 PrintF("%33s", names_[i]); | 12611 PrintF("%33s", names_[i]); |
12613 double ms = times_[i].InMillisecondsF(); | 12612 double ms = times_[i].InMillisecondsF(); |
12614 double percent = times_[i].PercentOf(sum); | 12613 double percent = times_[i].PercentOf(sum); |
12615 PrintF(" %8.3f ms / %4.1f %% ", ms, percent); | 12614 PrintF(" %8.3f ms / %4.1f %% ", ms, percent); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12669 if (ShouldProduceTraceOutput()) { | 12668 if (ShouldProduceTraceOutput()) { |
12670 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12669 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
12671 } | 12670 } |
12672 | 12671 |
12673 #ifdef DEBUG | 12672 #ifdef DEBUG |
12674 graph_->Verify(false); // No full verify. | 12673 graph_->Verify(false); // No full verify. |
12675 #endif | 12674 #endif |
12676 } | 12675 } |
12677 | 12676 |
12678 } } // namespace v8::internal | 12677 } } // namespace v8::internal |
OLD | NEW |