Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Side by Side Diff: src/isolate.cc

Issue 62283010: Remove preemption thread and API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/isolate.h ('k') | src/v8threads.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after
1763 handle_scope_implementer_(NULL), 1763 handle_scope_implementer_(NULL),
1764 unicode_cache_(NULL), 1764 unicode_cache_(NULL),
1765 runtime_zone_(this), 1765 runtime_zone_(this),
1766 in_use_list_(0), 1766 in_use_list_(0),
1767 free_list_(0), 1767 free_list_(0),
1768 preallocated_storage_preallocated_(false), 1768 preallocated_storage_preallocated_(false),
1769 inner_pointer_to_code_cache_(NULL), 1769 inner_pointer_to_code_cache_(NULL),
1770 write_iterator_(NULL), 1770 write_iterator_(NULL),
1771 global_handles_(NULL), 1771 global_handles_(NULL),
1772 eternal_handles_(NULL), 1772 eternal_handles_(NULL),
1773 context_switcher_(NULL),
1774 thread_manager_(NULL), 1773 thread_manager_(NULL),
1775 fp_stubs_generated_(false), 1774 fp_stubs_generated_(false),
1776 has_installed_extensions_(false), 1775 has_installed_extensions_(false),
1777 string_tracker_(NULL), 1776 string_tracker_(NULL),
1778 regexp_stack_(NULL), 1777 regexp_stack_(NULL),
1779 date_cache_(NULL), 1778 date_cache_(NULL),
1780 code_stub_interface_descriptors_(NULL), 1779 code_stub_interface_descriptors_(NULL),
1781 // TODO(bmeurer) Initialized lazily because it depends on flags; can 1780 // TODO(bmeurer) Initialized lazily because it depends on flags; can
1782 // be fixed once the default isolate cleanup is done. 1781 // be fixed once the default isolate cleanup is done.
1783 random_number_generator_(NULL), 1782 random_number_generator_(NULL),
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1900 if (FLAG_print_deopt_stress) { 1899 if (FLAG_print_deopt_stress) {
1901 PrintF(stdout, "=== Stress deopt counter: %u\n", stress_deopt_count_); 1900 PrintF(stdout, "=== Stress deopt counter: %u\n", stress_deopt_count_);
1902 } 1901 }
1903 1902
1904 // We must stop the logger before we tear down other components. 1903 // We must stop the logger before we tear down other components.
1905 Sampler* sampler = logger_->sampler(); 1904 Sampler* sampler = logger_->sampler();
1906 if (sampler && sampler->IsActive()) sampler->Stop(); 1905 if (sampler && sampler->IsActive()) sampler->Stop();
1907 1906
1908 delete deoptimizer_data_; 1907 delete deoptimizer_data_;
1909 deoptimizer_data_ = NULL; 1908 deoptimizer_data_ = NULL;
1910 if (FLAG_preemption) {
1911 v8::Locker locker(reinterpret_cast<v8::Isolate*>(this));
1912 v8::Locker::StopPreemption(reinterpret_cast<v8::Isolate*>(this));
1913 }
1914 builtins_.TearDown(); 1909 builtins_.TearDown();
1915 bootstrapper_->TearDown(); 1910 bootstrapper_->TearDown();
1916 1911
1917 // Remove the external reference to the preallocated stack memory. 1912 // Remove the external reference to the preallocated stack memory.
1918 delete preallocated_message_space_; 1913 delete preallocated_message_space_;
1919 preallocated_message_space_ = NULL; 1914 preallocated_message_space_ = NULL;
1920 PreallocatedMemoryThreadStop(); 1915 PreallocatedMemoryThreadStop();
1921 1916
1922 if (runtime_profiler_ != NULL) { 1917 if (runtime_profiler_ != NULL) {
1923 runtime_profiler_->TearDown(); 1918 runtime_profiler_->TearDown();
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 2015
2021 delete compilation_cache_; 2016 delete compilation_cache_;
2022 compilation_cache_ = NULL; 2017 compilation_cache_ = NULL;
2023 delete bootstrapper_; 2018 delete bootstrapper_;
2024 bootstrapper_ = NULL; 2019 bootstrapper_ = NULL;
2025 delete inner_pointer_to_code_cache_; 2020 delete inner_pointer_to_code_cache_;
2026 inner_pointer_to_code_cache_ = NULL; 2021 inner_pointer_to_code_cache_ = NULL;
2027 delete write_iterator_; 2022 delete write_iterator_;
2028 write_iterator_ = NULL; 2023 write_iterator_ = NULL;
2029 2024
2030 delete context_switcher_;
2031 context_switcher_ = NULL;
2032 delete thread_manager_; 2025 delete thread_manager_;
2033 thread_manager_ = NULL; 2026 thread_manager_ = NULL;
2034 2027
2035 delete string_tracker_; 2028 delete string_tracker_;
2036 string_tracker_ = NULL; 2029 string_tracker_ = NULL;
2037 2030
2038 delete memory_allocator_; 2031 delete memory_allocator_;
2039 memory_allocator_ = NULL; 2032 memory_allocator_ = NULL;
2040 delete code_range_; 2033 delete code_range_;
2041 code_range_ = NULL; 2034 code_range_ = NULL;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
2244 if (FLAG_preallocate_message_memory && preallocated_message_space_ == NULL) { 2237 if (FLAG_preallocate_message_memory && preallocated_message_space_ == NULL) {
2245 // Start the thread which will set aside some memory. 2238 // Start the thread which will set aside some memory.
2246 PreallocatedMemoryThreadStart(); 2239 PreallocatedMemoryThreadStart();
2247 preallocated_message_space_ = 2240 preallocated_message_space_ =
2248 new NoAllocationStringAllocator( 2241 new NoAllocationStringAllocator(
2249 preallocated_memory_thread_->data(), 2242 preallocated_memory_thread_->data(),
2250 preallocated_memory_thread_->length()); 2243 preallocated_memory_thread_->length());
2251 PreallocatedStorageInit(preallocated_memory_thread_->length() / 4); 2244 PreallocatedStorageInit(preallocated_memory_thread_->length() / 4);
2252 } 2245 }
2253 2246
2254 if (FLAG_preemption) {
2255 v8::Locker locker(reinterpret_cast<v8::Isolate*>(this));
2256 v8::Locker::StartPreemption(reinterpret_cast<v8::Isolate*>(this), 100);
2257 }
2258
2259 #ifdef ENABLE_DEBUGGER_SUPPORT 2247 #ifdef ENABLE_DEBUGGER_SUPPORT
2260 debug_->SetUp(create_heap_objects); 2248 debug_->SetUp(create_heap_objects);
2261 #endif 2249 #endif
2262 2250
2263 // If we are deserializing, read the state into the now-empty heap. 2251 // If we are deserializing, read the state into the now-empty heap.
2264 if (!create_heap_objects) { 2252 if (!create_heap_objects) {
2265 des->Deserialize(this); 2253 des->Deserialize(this);
2266 } 2254 }
2267 stub_cache_->Initialize(); 2255 stub_cache_->Initialize();
2268 2256
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
2526 2514
2527 #ifdef DEBUG 2515 #ifdef DEBUG
2528 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2516 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2529 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2517 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2530 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2518 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2531 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2519 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2532 #undef ISOLATE_FIELD_OFFSET 2520 #undef ISOLATE_FIELD_OFFSET
2533 #endif 2521 #endif
2534 2522
2535 } } // namespace v8::internal 2523 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/v8threads.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698