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

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

Issue 2383443002: Revert of [heap] Remove border page (Closed)
Patch Set: Created 4 years, 2 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/heap/heap.h ('k') | src/heap/heap-inl.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 // 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/context-slot-cache.h" 9 #include "src/ast/context-slot-cache.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after
1726 1726
1727 promotion_queue_.Destroy(); 1727 promotion_queue_.Destroy();
1728 1728
1729 incremental_marking()->UpdateMarkingDequeAfterScavenge(); 1729 incremental_marking()->UpdateMarkingDequeAfterScavenge();
1730 1730
1731 ScavengeWeakObjectRetainer weak_object_retainer(this); 1731 ScavengeWeakObjectRetainer weak_object_retainer(this);
1732 ProcessYoungWeakReferences(&weak_object_retainer); 1732 ProcessYoungWeakReferences(&weak_object_retainer);
1733 1733
1734 DCHECK(new_space_front == new_space_->top()); 1734 DCHECK(new_space_front == new_space_->top());
1735 1735
1736 new_space_->SealIntermediateGeneration(); 1736 // Set age mark.
1737 new_space_->set_age_mark(new_space_->top());
1737 1738
1738 ArrayBufferTracker::FreeDeadInNewSpace(this); 1739 ArrayBufferTracker::FreeDeadInNewSpace(this);
1739 1740
1740 // Update how much has survived scavenge. 1741 // Update how much has survived scavenge.
1741 IncrementYoungSurvivorsCounter( 1742 IncrementYoungSurvivorsCounter(
1742 static_cast<int>((PromotedSpaceSizeOfObjects() - survived_watermark) + 1743 static_cast<int>((PromotedSpaceSizeOfObjects() - survived_watermark) +
1743 new_space_->Size())); 1744 new_space_->Size()));
1744 1745
1745 LOG(isolate_, ResourceEvent("scavenge", "end")); 1746 LOG(isolate_, ResourceEvent("scavenge", "end"));
1746 1747
(...skipping 3328 matching lines...) Expand 10 before | Expand all | Expand 10 after
5075 "semi-space size of %d MB\n", 5076 "semi-space size of %d MB\n",
5076 max_semi_space_size_ / MB); 5077 max_semi_space_size_ / MB);
5077 } 5078 }
5078 } else { 5079 } else {
5079 initial_semispace_size_ = 5080 initial_semispace_size_ =
5080 ROUND_UP(initial_semispace_size, Page::kPageSize); 5081 ROUND_UP(initial_semispace_size, Page::kPageSize);
5081 } 5082 }
5082 } 5083 }
5083 5084
5084 initial_semispace_size_ = Min(initial_semispace_size_, max_semi_space_size_); 5085 initial_semispace_size_ = Min(initial_semispace_size_, max_semi_space_size_);
5086
5085 if (FLAG_semi_space_growth_factor < 2) { 5087 if (FLAG_semi_space_growth_factor < 2) {
5086 FLAG_semi_space_growth_factor = 2; 5088 FLAG_semi_space_growth_factor = 2;
5087 } 5089 }
5088 5090
5089 // The old generation is paged and needs at least one page for each space. 5091 // The old generation is paged and needs at least one page for each space.
5090 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; 5092 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1;
5091 max_old_generation_size_ = 5093 max_old_generation_size_ =
5092 Max(static_cast<intptr_t>(paged_space_count * Page::kPageSize), 5094 Max(static_cast<intptr_t>(paged_space_count * Page::kPageSize),
5093 max_old_generation_size_); 5095 max_old_generation_size_);
5094 5096
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after
6519 } 6521 }
6520 6522
6521 6523
6522 // static 6524 // static
6523 int Heap::GetStaticVisitorIdForMap(Map* map) { 6525 int Heap::GetStaticVisitorIdForMap(Map* map) {
6524 return StaticVisitorBase::GetVisitorId(map); 6526 return StaticVisitorBase::GetVisitorId(map);
6525 } 6527 }
6526 6528
6527 } // namespace internal 6529 } // namespace internal
6528 } // namespace v8 6530 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698