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

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

Issue 905773004: Mark pages created during bootstrapping as never-evacuate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: like this? 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 | « no previous file | src/heap/mark-compact.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 5602 matching lines...) Expand 10 before | Expand all | Expand 10 after
5613 5613
5614 // Set up the special root array entries containing the stack limits. 5614 // Set up the special root array entries containing the stack limits.
5615 // These are actually addresses, but the tag makes the GC ignore it. 5615 // These are actually addresses, but the tag makes the GC ignore it.
5616 roots_[kStackLimitRootIndex] = reinterpret_cast<Object*>( 5616 roots_[kStackLimitRootIndex] = reinterpret_cast<Object*>(
5617 (isolate_->stack_guard()->jslimit() & ~kSmiTagMask) | kSmiTag); 5617 (isolate_->stack_guard()->jslimit() & ~kSmiTagMask) | kSmiTag);
5618 roots_[kRealStackLimitRootIndex] = reinterpret_cast<Object*>( 5618 roots_[kRealStackLimitRootIndex] = reinterpret_cast<Object*>(
5619 (isolate_->stack_guard()->real_jslimit() & ~kSmiTagMask) | kSmiTag); 5619 (isolate_->stack_guard()->real_jslimit() & ~kSmiTagMask) | kSmiTag);
5620 } 5620 }
5621 5621
5622 5622
5623 void Heap::NotifyDeserializationComplete() { deserialization_complete_ = true; } 5623 void Heap::NotifyDeserializationComplete() {
5624 deserialization_complete_ = true;
5625 #ifdef DEBUG
5626 // All pages right after bootstrapping must be marked as never-evacuate.
5627 PagedSpaces spaces(this);
5628 for (PagedSpace* s = spaces.next(); s != NULL; s = spaces.next()) {
5629 PageIterator it(s);
5630 while (it.has_next()) CHECK(it.next()->NeverEvacuate());
5631 }
5632 #endif // DEBUG
5633 }
5624 5634
5625 5635
5626 void Heap::TearDown() { 5636 void Heap::TearDown() {
5627 #ifdef VERIFY_HEAP 5637 #ifdef VERIFY_HEAP
5628 if (FLAG_verify_heap) { 5638 if (FLAG_verify_heap) {
5629 Verify(); 5639 Verify();
5630 } 5640 }
5631 #endif 5641 #endif
5632 5642
5633 UpdateMaximumCommitted(); 5643 UpdateMaximumCommitted();
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
6571 static_cast<int>(object_sizes_last_time_[index])); 6581 static_cast<int>(object_sizes_last_time_[index]));
6572 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6582 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6573 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6583 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6574 6584
6575 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6585 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6576 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6586 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6577 ClearObjectStats(); 6587 ClearObjectStats();
6578 } 6588 }
6579 } 6589 }
6580 } // namespace v8::internal 6590 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698