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

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

Issue 949623006: Attach snapshot data blob to the isolate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « src/full-codegen.cc ('k') | src/heap/spaces.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/v8.h" 5 #include "src/v8.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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 5177 matching lines...) Expand 10 before | Expand all | Expand 10 after
5188 } 5188 }
5189 if (FLAG_max_executable_size > 0) { 5189 if (FLAG_max_executable_size > 0) {
5190 max_executable_size_ = static_cast<intptr_t>(FLAG_max_executable_size) * MB; 5190 max_executable_size_ = static_cast<intptr_t>(FLAG_max_executable_size) * MB;
5191 } 5191 }
5192 5192
5193 if (FLAG_stress_compaction) { 5193 if (FLAG_stress_compaction) {
5194 // This will cause more frequent GCs when stressing. 5194 // This will cause more frequent GCs when stressing.
5195 max_semi_space_size_ = Page::kPageSize; 5195 max_semi_space_size_ = Page::kPageSize;
5196 } 5196 }
5197 5197
5198 if (Snapshot::HaveASnapshotToStartFrom()) { 5198 if (isolate()->snapshot_available()) {
5199 // If we are using a snapshot we always reserve the default amount 5199 // If we are using a snapshot we always reserve the default amount
5200 // of memory for each semispace because code in the snapshot has 5200 // of memory for each semispace because code in the snapshot has
5201 // write-barrier code that relies on the size and alignment of new 5201 // write-barrier code that relies on the size and alignment of new
5202 // space. We therefore cannot use a larger max semispace size 5202 // space. We therefore cannot use a larger max semispace size
5203 // than the default reserved semispace size. 5203 // than the default reserved semispace size.
5204 if (max_semi_space_size_ > reserved_semispace_size_) { 5204 if (max_semi_space_size_ > reserved_semispace_size_) {
5205 max_semi_space_size_ = reserved_semispace_size_; 5205 max_semi_space_size_ = reserved_semispace_size_;
5206 if (FLAG_trace_gc) { 5206 if (FLAG_trace_gc) {
5207 PrintPID("Max semi-space size cannot be more than %d kbytes\n", 5207 PrintPID("Max semi-space size cannot be more than %d kbytes\n",
5208 reserved_semispace_size_ >> 10); 5208 reserved_semispace_size_ >> 10);
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
6522 static_cast<int>(object_sizes_last_time_[index])); 6522 static_cast<int>(object_sizes_last_time_[index]));
6523 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6523 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6524 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6524 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6525 6525
6526 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6526 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6527 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6527 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6528 ClearObjectStats(); 6528 ClearObjectStats();
6529 } 6529 }
6530 } 6530 }
6531 } // namespace v8::internal 6531 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698