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

Side by Side Diff: src/heap/heap.cc

Issue 1522433002: [heap] Remove heap-local variable caching FLAG_concurrent_sweeping (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years 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
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/incremental-marking.cc » ('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 // 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/heap/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/scopeinfo.h" 9 #include "src/ast/scopeinfo.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 promotion_queue_(this), 155 promotion_queue_(this),
156 configured_(false), 156 configured_(false),
157 current_gc_flags_(Heap::kNoGCFlags), 157 current_gc_flags_(Heap::kNoGCFlags),
158 current_gc_callback_flags_(GCCallbackFlags::kNoGCCallbackFlags), 158 current_gc_callback_flags_(GCCallbackFlags::kNoGCCallbackFlags),
159 external_string_table_(this), 159 external_string_table_(this),
160 chunks_queued_for_free_(NULL), 160 chunks_queued_for_free_(NULL),
161 concurrent_unmapping_tasks_active_(0), 161 concurrent_unmapping_tasks_active_(0),
162 pending_unmapping_tasks_semaphore_(0), 162 pending_unmapping_tasks_semaphore_(0),
163 gc_callbacks_depth_(0), 163 gc_callbacks_depth_(0),
164 deserialization_complete_(false), 164 deserialization_complete_(false),
165 concurrent_sweeping_enabled_(false),
166 strong_roots_list_(NULL), 165 strong_roots_list_(NULL),
167 array_buffer_tracker_(NULL) { 166 array_buffer_tracker_(NULL) {
168 // Allow build-time customization of the max semispace size. Building 167 // Allow build-time customization of the max semispace size. Building
169 // V8 with snapshots and a non-default max semispace size is much 168 // V8 with snapshots and a non-default max semispace size is much
170 // easier if you can define it as part of the build environment. 169 // easier if you can define it as part of the build environment.
171 #if defined(V8_MAX_SEMISPACE_SIZE) 170 #if defined(V8_MAX_SEMISPACE_SIZE)
172 max_semi_space_size_ = reserved_semispace_size_ = V8_MAX_SEMISPACE_SIZE; 171 max_semi_space_size_ = reserved_semispace_size_ = V8_MAX_SEMISPACE_SIZE;
173 #endif 172 #endif
174 173
175 // Ensure old_generation_size_ is a multiple of kPageSize. 174 // Ensure old_generation_size_ is a multiple of kPageSize.
(...skipping 4821 matching lines...) Expand 10 before | Expand all | Expand 10 after
4997 // call Heap::TearDown() to release allocated memory. 4996 // call Heap::TearDown() to release allocated memory.
4998 // 4997 //
4999 // If the heap is not yet configured (e.g. through the API), configure it. 4998 // If the heap is not yet configured (e.g. through the API), configure it.
5000 // Configuration is based on the flags new-space-size (really the semispace 4999 // Configuration is based on the flags new-space-size (really the semispace
5001 // size) and old-space-size if set or the initial values of semispace_size_ 5000 // size) and old-space-size if set or the initial values of semispace_size_
5002 // and old_generation_size_ otherwise. 5001 // and old_generation_size_ otherwise.
5003 if (!configured_) { 5002 if (!configured_) {
5004 if (!ConfigureHeapDefault()) return false; 5003 if (!ConfigureHeapDefault()) return false;
5005 } 5004 }
5006 5005
5007 concurrent_sweeping_enabled_ = FLAG_concurrent_sweeping;
5008
5009 base::CallOnce(&initialize_gc_once, &InitializeGCOnce); 5006 base::CallOnce(&initialize_gc_once, &InitializeGCOnce);
5010 5007
5011 // Set up memory allocator. 5008 // Set up memory allocator.
5012 if (!isolate_->memory_allocator()->SetUp(MaxReserved(), MaxExecutableSize())) 5009 if (!isolate_->memory_allocator()->SetUp(MaxReserved(), MaxExecutableSize()))
5013 return false; 5010 return false;
5014 5011
5015 // Initialize incremental marking. 5012 // Initialize incremental marking.
5016 incremental_marking_ = new IncrementalMarking(this); 5013 incremental_marking_ = new IncrementalMarking(this);
5017 5014
5018 // Set up new space. 5015 // Set up new space.
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
6156 } 6153 }
6157 6154
6158 6155
6159 // static 6156 // static
6160 int Heap::GetStaticVisitorIdForMap(Map* map) { 6157 int Heap::GetStaticVisitorIdForMap(Map* map) {
6161 return StaticVisitorBase::GetVisitorId(map); 6158 return StaticVisitorBase::GetVisitorId(map);
6162 } 6159 }
6163 6160
6164 } // namespace internal 6161 } // namespace internal
6165 } // namespace v8 6162 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698