| 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 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1765 | 1765 |
| 1766 void Isolate::GlobalTearDown() { | 1766 void Isolate::GlobalTearDown() { |
| 1767 delete thread_data_table_; | 1767 delete thread_data_table_; |
| 1768 } | 1768 } |
| 1769 | 1769 |
| 1770 | 1770 |
| 1771 void Isolate::Deinit() { | 1771 void Isolate::Deinit() { |
| 1772 if (state_ == INITIALIZED) { | 1772 if (state_ == INITIALIZED) { |
| 1773 TRACE_ISOLATE(deinit); | 1773 TRACE_ISOLATE(deinit); |
| 1774 | 1774 |
| 1775 if (FLAG_parallel_recompilation) optimizing_compiler_thread_.Stop(); |
| 1776 |
| 1775 if (FLAG_sweeper_threads > 0) { | 1777 if (FLAG_sweeper_threads > 0) { |
| 1776 for (int i = 0; i < FLAG_sweeper_threads; i++) { | 1778 for (int i = 0; i < FLAG_sweeper_threads; i++) { |
| 1777 sweeper_thread_[i]->Stop(); | 1779 sweeper_thread_[i]->Stop(); |
| 1778 delete sweeper_thread_[i]; | 1780 delete sweeper_thread_[i]; |
| 1779 } | 1781 } |
| 1780 delete[] sweeper_thread_; | 1782 delete[] sweeper_thread_; |
| 1781 } | 1783 } |
| 1782 | 1784 |
| 1783 if (FLAG_marking_threads > 0) { | 1785 if (FLAG_marking_threads > 0) { |
| 1784 for (int i = 0; i < FLAG_marking_threads; i++) { | 1786 for (int i = 0; i < FLAG_marking_threads; i++) { |
| 1785 marking_thread_[i]->Stop(); | 1787 marking_thread_[i]->Stop(); |
| 1786 delete marking_thread_[i]; | 1788 delete marking_thread_[i]; |
| 1787 } | 1789 } |
| 1788 delete[] marking_thread_; | 1790 delete[] marking_thread_; |
| 1789 } | 1791 } |
| 1790 | 1792 |
| 1791 if (FLAG_parallel_recompilation) optimizing_compiler_thread_.Stop(); | |
| 1792 | |
| 1793 if (FLAG_hydrogen_stats) HStatistics::Instance()->Print(); | 1793 if (FLAG_hydrogen_stats) HStatistics::Instance()->Print(); |
| 1794 | 1794 |
| 1795 // We must stop the logger before we tear down other components. | 1795 // We must stop the logger before we tear down other components. |
| 1796 logger_->EnsureTickerStopped(); | 1796 logger_->EnsureTickerStopped(); |
| 1797 | 1797 |
| 1798 delete deoptimizer_data_; | 1798 delete deoptimizer_data_; |
| 1799 deoptimizer_data_ = NULL; | 1799 deoptimizer_data_ = NULL; |
| 1800 if (FLAG_preemption) { | 1800 if (FLAG_preemption) { |
| 1801 v8::Locker locker(reinterpret_cast<v8::Isolate*>(this)); | 1801 v8::Locker locker(reinterpret_cast<v8::Isolate*>(this)); |
| 1802 v8::Locker::StopPreemption(); | 1802 v8::Locker::StopPreemption(); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2191 if (FLAG_sweeper_threads > 0) { | 2191 if (FLAG_sweeper_threads > 0) { |
| 2192 sweeper_thread_ = new SweeperThread*[FLAG_sweeper_threads]; | 2192 sweeper_thread_ = new SweeperThread*[FLAG_sweeper_threads]; |
| 2193 for (int i = 0; i < FLAG_sweeper_threads; i++) { | 2193 for (int i = 0; i < FLAG_sweeper_threads; i++) { |
| 2194 sweeper_thread_[i] = new SweeperThread(this); | 2194 sweeper_thread_[i] = new SweeperThread(this); |
| 2195 sweeper_thread_[i]->Start(); | 2195 sweeper_thread_[i]->Start(); |
| 2196 } | 2196 } |
| 2197 } else { | 2197 } else { |
| 2198 FLAG_concurrent_sweeping = false; | 2198 FLAG_concurrent_sweeping = false; |
| 2199 FLAG_parallel_sweeping = false; | 2199 FLAG_parallel_sweeping = false; |
| 2200 } | 2200 } |
| 2201 if (FLAG_parallel_recompilation && |
| 2202 SystemThreadManager::NumberOfParallelSystemThreads( |
| 2203 SystemThreadManager::PARALLEL_RECOMPILATION) == 0) { |
| 2204 FLAG_parallel_recompilation = false; |
| 2205 } |
| 2201 return true; | 2206 return true; |
| 2202 } | 2207 } |
| 2203 | 2208 |
| 2204 | 2209 |
| 2205 // Initialized lazily to allow early | 2210 // Initialized lazily to allow early |
| 2206 // v8::V8::SetAddHistogramSampleFunction calls. | 2211 // v8::V8::SetAddHistogramSampleFunction calls. |
| 2207 StatsTable* Isolate::stats_table() { | 2212 StatsTable* Isolate::stats_table() { |
| 2208 if (stats_table_ == NULL) { | 2213 if (stats_table_ == NULL) { |
| 2209 stats_table_ = new StatsTable; | 2214 stats_table_ = new StatsTable; |
| 2210 } | 2215 } |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2319 | 2324 |
| 2320 #ifdef DEBUG | 2325 #ifdef DEBUG |
| 2321 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2326 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 2322 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2327 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 2323 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2328 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 2324 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2329 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 2325 #undef ISOLATE_FIELD_OFFSET | 2330 #undef ISOLATE_FIELD_OFFSET |
| 2326 #endif | 2331 #endif |
| 2327 | 2332 |
| 2328 } } // namespace v8::internal | 2333 } } // namespace v8::internal |
| OLD | NEW |