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 <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/v8.h" | 10 #include "src/v8.h" |
(...skipping 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1736 if (concurrent_recompilation_enabled()) { | 1736 if (concurrent_recompilation_enabled()) { |
1737 optimizing_compiler_thread_->Stop(); | 1737 optimizing_compiler_thread_->Stop(); |
1738 delete optimizing_compiler_thread_; | 1738 delete optimizing_compiler_thread_; |
1739 optimizing_compiler_thread_ = NULL; | 1739 optimizing_compiler_thread_ = NULL; |
1740 } | 1740 } |
1741 | 1741 |
1742 if (heap_.mark_compact_collector()->sweeping_in_progress()) { | 1742 if (heap_.mark_compact_collector()->sweeping_in_progress()) { |
1743 heap_.mark_compact_collector()->EnsureSweepingCompleted(); | 1743 heap_.mark_compact_collector()->EnsureSweepingCompleted(); |
1744 } | 1744 } |
1745 | 1745 |
1746 if (turbo_statistics() != NULL) { | 1746 DumpAndResetCompilationStats(); |
1747 OFStream os(stdout); | |
1748 os << *turbo_statistics() << std::endl; | |
1749 } | |
1750 if (FLAG_hydrogen_stats) GetHStatistics()->Print(); | |
1751 | 1747 |
1752 if (FLAG_print_deopt_stress) { | 1748 if (FLAG_print_deopt_stress) { |
1753 PrintF(stdout, "=== Stress deopt counter: %u\n", stress_deopt_count_); | 1749 PrintF(stdout, "=== Stress deopt counter: %u\n", stress_deopt_count_); |
1754 } | 1750 } |
1755 | 1751 |
1756 // We must stop the logger before we tear down other components. | 1752 // We must stop the logger before we tear down other components. |
1757 Sampler* sampler = logger_->sampler(); | 1753 Sampler* sampler = logger_->sampler(); |
1758 if (sampler && sampler->IsActive()) sampler->Stop(); | 1754 if (sampler && sampler->IsActive()) sampler->Stop(); |
1759 | 1755 |
1760 delete deoptimizer_data_; | 1756 delete deoptimizer_data_; |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2242 } | 2238 } |
2243 if (deferred->next_ != NULL) { | 2239 if (deferred->next_ != NULL) { |
2244 deferred->next_->previous_ = deferred->previous_; | 2240 deferred->next_->previous_ = deferred->previous_; |
2245 } | 2241 } |
2246 if (deferred->previous_ != NULL) { | 2242 if (deferred->previous_ != NULL) { |
2247 deferred->previous_->next_ = deferred->next_; | 2243 deferred->previous_->next_ = deferred->next_; |
2248 } | 2244 } |
2249 } | 2245 } |
2250 | 2246 |
2251 | 2247 |
| 2248 void Isolate::DumpAndResetCompilationStats() { |
| 2249 if (turbo_statistics() != nullptr) { |
| 2250 OFStream os(stdout); |
| 2251 os << *turbo_statistics() << std::endl; |
| 2252 } |
| 2253 if (hstatistics() != nullptr) hstatistics()->Print(); |
| 2254 delete turbo_statistics_; |
| 2255 turbo_statistics_ = nullptr; |
| 2256 delete hstatistics_; |
| 2257 hstatistics_ = nullptr; |
| 2258 } |
| 2259 |
| 2260 |
2252 HStatistics* Isolate::GetHStatistics() { | 2261 HStatistics* Isolate::GetHStatistics() { |
2253 if (hstatistics() == NULL) set_hstatistics(new HStatistics()); | 2262 if (hstatistics() == NULL) set_hstatistics(new HStatistics()); |
2254 return hstatistics(); | 2263 return hstatistics(); |
2255 } | 2264 } |
2256 | 2265 |
2257 | 2266 |
2258 CompilationStatistics* Isolate::GetTurboStatistics() { | 2267 CompilationStatistics* Isolate::GetTurboStatistics() { |
2259 if (turbo_statistics() == NULL) | 2268 if (turbo_statistics() == NULL) |
2260 set_turbo_statistics(new CompilationStatistics()); | 2269 set_turbo_statistics(new CompilationStatistics()); |
2261 return turbo_statistics(); | 2270 return turbo_statistics(); |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2534 if (prev_ && prev_->Intercept(flag)) return true; | 2543 if (prev_ && prev_->Intercept(flag)) return true; |
2535 // Then check whether this scope intercepts. | 2544 // Then check whether this scope intercepts. |
2536 if ((flag & intercept_mask_)) { | 2545 if ((flag & intercept_mask_)) { |
2537 intercepted_flags_ |= flag; | 2546 intercepted_flags_ |= flag; |
2538 return true; | 2547 return true; |
2539 } | 2548 } |
2540 return false; | 2549 return false; |
2541 } | 2550 } |
2542 | 2551 |
2543 } } // namespace v8::internal | 2552 } } // namespace v8::internal |
OLD | NEW |