OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
| 8 #include <iostream> // NOLINT(readability/streams) |
8 | 9 |
9 #include "src/v8.h" | 10 #include "src/v8.h" |
10 | 11 |
11 #include "src/ast.h" | 12 #include "src/ast.h" |
12 #include "src/base/platform/platform.h" | 13 #include "src/base/platform/platform.h" |
13 #include "src/base/sys-info.h" | 14 #include "src/base/sys-info.h" |
14 #include "src/base/utils/random-number-generator.h" | 15 #include "src/base/utils/random-number-generator.h" |
15 #include "src/basic-block-profiler.h" | 16 #include "src/basic-block-profiler.h" |
16 #include "src/bootstrapper.h" | 17 #include "src/bootstrapper.h" |
17 #include "src/codegen.h" | 18 #include "src/codegen.h" |
18 #include "src/compilation-cache.h" | 19 #include "src/compilation-cache.h" |
| 20 #include "src/compilation-statistics.h" |
19 #include "src/cpu-profiler.h" | 21 #include "src/cpu-profiler.h" |
20 #include "src/debug.h" | 22 #include "src/debug.h" |
21 #include "src/deoptimizer.h" | 23 #include "src/deoptimizer.h" |
22 #include "src/heap/spaces.h" | 24 #include "src/heap/spaces.h" |
23 #include "src/heap-profiler.h" | 25 #include "src/heap-profiler.h" |
24 #include "src/hydrogen.h" | 26 #include "src/hydrogen.h" |
25 #include "src/ic/stub-cache.h" | 27 #include "src/ic/stub-cache.h" |
26 #include "src/isolate-inl.h" | 28 #include "src/isolate-inl.h" |
27 #include "src/lithium-allocator.h" | 29 #include "src/lithium-allocator.h" |
28 #include "src/log.h" | 30 #include "src/log.h" |
(...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1599 if (concurrent_recompilation_enabled()) { | 1601 if (concurrent_recompilation_enabled()) { |
1600 optimizing_compiler_thread_->Stop(); | 1602 optimizing_compiler_thread_->Stop(); |
1601 delete optimizing_compiler_thread_; | 1603 delete optimizing_compiler_thread_; |
1602 optimizing_compiler_thread_ = NULL; | 1604 optimizing_compiler_thread_ = NULL; |
1603 } | 1605 } |
1604 | 1606 |
1605 if (heap_.mark_compact_collector()->sweeping_in_progress()) { | 1607 if (heap_.mark_compact_collector()->sweeping_in_progress()) { |
1606 heap_.mark_compact_collector()->EnsureSweepingCompleted(); | 1608 heap_.mark_compact_collector()->EnsureSweepingCompleted(); |
1607 } | 1609 } |
1608 | 1610 |
1609 if (FLAG_turbo_stats) GetTStatistics()->Print("TurboFan"); | 1611 if (tstatistics() != NULL) { |
1610 if (FLAG_hydrogen_stats) GetHStatistics()->Print("Hydrogen"); | 1612 std::cout << *tstatistics() << std::endl; |
| 1613 } |
| 1614 if (FLAG_hydrogen_stats) GetHStatistics()->Print(); |
1611 | 1615 |
1612 if (FLAG_print_deopt_stress) { | 1616 if (FLAG_print_deopt_stress) { |
1613 PrintF(stdout, "=== Stress deopt counter: %u\n", stress_deopt_count_); | 1617 PrintF(stdout, "=== Stress deopt counter: %u\n", stress_deopt_count_); |
1614 } | 1618 } |
1615 | 1619 |
1616 // We must stop the logger before we tear down other components. | 1620 // We must stop the logger before we tear down other components. |
1617 Sampler* sampler = logger_->sampler(); | 1621 Sampler* sampler = logger_->sampler(); |
1618 if (sampler && sampler->IsActive()) sampler->Stop(); | 1622 if (sampler && sampler->IsActive()) sampler->Stop(); |
1619 | 1623 |
1620 delete deoptimizer_data_; | 1624 delete deoptimizer_data_; |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2112 } | 2116 } |
2113 } | 2117 } |
2114 | 2118 |
2115 | 2119 |
2116 HStatistics* Isolate::GetHStatistics() { | 2120 HStatistics* Isolate::GetHStatistics() { |
2117 if (hstatistics() == NULL) set_hstatistics(new HStatistics()); | 2121 if (hstatistics() == NULL) set_hstatistics(new HStatistics()); |
2118 return hstatistics(); | 2122 return hstatistics(); |
2119 } | 2123 } |
2120 | 2124 |
2121 | 2125 |
2122 HStatistics* Isolate::GetTStatistics() { | 2126 CompilationStatistics* Isolate::GetTStatistics() { |
2123 if (tstatistics() == NULL) set_tstatistics(new HStatistics()); | 2127 if (tstatistics() == NULL) set_tstatistics(new CompilationStatistics()); |
2124 return tstatistics(); | 2128 return tstatistics(); |
2125 } | 2129 } |
2126 | 2130 |
2127 | 2131 |
2128 HTracer* Isolate::GetHTracer() { | 2132 HTracer* Isolate::GetHTracer() { |
2129 if (htracer() == NULL) set_htracer(new HTracer(id())); | 2133 if (htracer() == NULL) set_htracer(new HTracer(id())); |
2130 return htracer(); | 2134 return htracer(); |
2131 } | 2135 } |
2132 | 2136 |
2133 | 2137 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2399 if (prev_ && prev_->Intercept(flag)) return true; | 2403 if (prev_ && prev_->Intercept(flag)) return true; |
2400 // Then check whether this scope intercepts. | 2404 // Then check whether this scope intercepts. |
2401 if ((flag & intercept_mask_)) { | 2405 if ((flag & intercept_mask_)) { |
2402 intercepted_flags_ |= flag; | 2406 intercepted_flags_ |= flag; |
2403 return true; | 2407 return true; |
2404 } | 2408 } |
2405 return false; | 2409 return false; |
2406 } | 2410 } |
2407 | 2411 |
2408 } } // namespace v8::internal | 2412 } } // namespace v8::internal |
OLD | NEW |