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

Side by Side Diff: src/isolate.cc

Issue 2348303002: Replaced different means of zone pooling/reusing by one zone segment pool (Closed)
Patch Set: Merge branch 'zonesegpool' into onezonepool Created 4 years, 3 months 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
OLDNEW
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 "src/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 1954 matching lines...) Expand 10 before | Expand all | Expand 10 after
1965 stack_trace_for_uncaught_exceptions_frame_limit_(0), 1965 stack_trace_for_uncaught_exceptions_frame_limit_(0),
1966 stack_trace_for_uncaught_exceptions_options_(StackTrace::kOverview), 1966 stack_trace_for_uncaught_exceptions_options_(StackTrace::kOverview),
1967 keyed_lookup_cache_(NULL), 1967 keyed_lookup_cache_(NULL),
1968 context_slot_cache_(NULL), 1968 context_slot_cache_(NULL),
1969 descriptor_lookup_cache_(NULL), 1969 descriptor_lookup_cache_(NULL),
1970 handle_scope_implementer_(NULL), 1970 handle_scope_implementer_(NULL),
1971 unicode_cache_(NULL), 1971 unicode_cache_(NULL),
1972 allocator_(FLAG_trace_gc_object_stats 1972 allocator_(FLAG_trace_gc_object_stats
1973 ? new VerboseAccountingAllocator(&heap_, 256 * KB) 1973 ? new VerboseAccountingAllocator(&heap_, 256 * KB)
1974 : new AccountingAllocator()), 1974 : new AccountingAllocator()),
1975 runtime_zone_(new Zone(allocator_)),
1976 inner_pointer_to_code_cache_(NULL), 1975 inner_pointer_to_code_cache_(NULL),
1977 global_handles_(NULL), 1976 global_handles_(NULL),
1978 eternal_handles_(NULL), 1977 eternal_handles_(NULL),
1979 thread_manager_(NULL), 1978 thread_manager_(NULL),
1980 has_installed_extensions_(false), 1979 has_installed_extensions_(false),
1981 regexp_stack_(NULL), 1980 regexp_stack_(NULL),
1982 date_cache_(NULL), 1981 date_cache_(NULL),
1983 call_descriptor_data_(NULL), 1982 call_descriptor_data_(NULL),
1984 // TODO(bmeurer) Initialized lazily because it depends on flags; can 1983 // TODO(bmeurer) Initialized lazily because it depends on flags; can
1985 // be fixed once the default isolate cleanup is done. 1984 // be fixed once the default isolate cleanup is done.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 void Isolate::SetIsolateThreadLocals(Isolate* isolate, 2161 void Isolate::SetIsolateThreadLocals(Isolate* isolate,
2163 PerIsolateThreadData* data) { 2162 PerIsolateThreadData* data) {
2164 base::Thread::SetThreadLocal(isolate_key_, isolate); 2163 base::Thread::SetThreadLocal(isolate_key_, isolate);
2165 base::Thread::SetThreadLocal(per_isolate_thread_data_key_, data); 2164 base::Thread::SetThreadLocal(per_isolate_thread_data_key_, data);
2166 } 2165 }
2167 2166
2168 2167
2169 Isolate::~Isolate() { 2168 Isolate::~Isolate() {
2170 TRACE_ISOLATE(destructor); 2169 TRACE_ISOLATE(destructor);
2171 2170
2172 // Has to be called while counters_ are still alive
2173 runtime_zone_->DeleteKeptSegment();
2174
2175 // The entry stack must be empty when we get here. 2171 // The entry stack must be empty when we get here.
2176 DCHECK(entry_stack_ == NULL || entry_stack_->previous_item == NULL); 2172 DCHECK(entry_stack_ == NULL || entry_stack_->previous_item == NULL);
2177 2173
2178 delete entry_stack_; 2174 delete entry_stack_;
2179 entry_stack_ = NULL; 2175 entry_stack_ = NULL;
2180 2176
2181 delete unicode_cache_; 2177 delete unicode_cache_;
2182 unicode_cache_ = NULL; 2178 unicode_cache_ = NULL;
2183 2179
2184 delete date_cache_; 2180 delete date_cache_;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
2241 2237
2242 delete random_number_generator_; 2238 delete random_number_generator_;
2243 random_number_generator_ = NULL; 2239 random_number_generator_ = NULL;
2244 2240
2245 delete debug_; 2241 delete debug_;
2246 debug_ = NULL; 2242 debug_ = NULL;
2247 2243
2248 delete cancelable_task_manager_; 2244 delete cancelable_task_manager_;
2249 cancelable_task_manager_ = nullptr; 2245 cancelable_task_manager_ = nullptr;
2250 2246
2251 delete runtime_zone_;
2252 runtime_zone_ = nullptr;
2253
2254 delete allocator_; 2247 delete allocator_;
2255 allocator_ = nullptr; 2248 allocator_ = nullptr;
2256 2249
2257 #if USE_SIMULATOR 2250 #if USE_SIMULATOR
2258 Simulator::TearDown(simulator_i_cache_, simulator_redirection_); 2251 Simulator::TearDown(simulator_i_cache_, simulator_redirection_);
2259 simulator_i_cache_ = nullptr; 2252 simulator_i_cache_ = nullptr;
2260 simulator_redirection_ = nullptr; 2253 simulator_redirection_ = nullptr;
2261 #endif 2254 #endif
2262 } 2255 }
2263 2256
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after
3208 // Then check whether this scope intercepts. 3201 // Then check whether this scope intercepts.
3209 if ((flag & intercept_mask_)) { 3202 if ((flag & intercept_mask_)) {
3210 intercepted_flags_ |= flag; 3203 intercepted_flags_ |= flag;
3211 return true; 3204 return true;
3212 } 3205 }
3213 return false; 3206 return false;
3214 } 3207 }
3215 3208
3216 } // namespace internal 3209 } // namespace internal
3217 } // namespace v8 3210 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698