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

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

Issue 1155163003: Don't shrink new space based on allocation rate in predictable mode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 | no next file » | 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 4552 matching lines...) Expand 10 before | Expand all | Expand 10 after
4563 4563
4564 4564
4565 bool Heap::HasLowAllocationRate(size_t allocation_rate) { 4565 bool Heap::HasLowAllocationRate(size_t allocation_rate) {
4566 static const size_t kLowAllocationRate = 1000; 4566 static const size_t kLowAllocationRate = 1000;
4567 if (allocation_rate == 0) return false; 4567 if (allocation_rate == 0) return false;
4568 return allocation_rate < kLowAllocationRate; 4568 return allocation_rate < kLowAllocationRate;
4569 } 4569 }
4570 4570
4571 4571
4572 void Heap::ReduceNewSpaceSize(size_t allocation_rate) { 4572 void Heap::ReduceNewSpaceSize(size_t allocation_rate) {
4573 if (HasLowAllocationRate(allocation_rate)) { 4573 if (!FLAG_predictable && HasLowAllocationRate(allocation_rate)) {
4574 new_space_.Shrink(); 4574 new_space_.Shrink();
4575 UncommitFromSpace(); 4575 UncommitFromSpace();
4576 } 4576 }
4577 } 4577 }
4578 4578
4579 4579
4580 bool Heap::TryFinalizeIdleIncrementalMarking( 4580 bool Heap::TryFinalizeIdleIncrementalMarking(
4581 double idle_time_in_ms, size_t size_of_objects, 4581 double idle_time_in_ms, size_t size_of_objects,
4582 size_t final_incremental_mark_compact_speed_in_bytes_per_ms) { 4582 size_t final_incremental_mark_compact_speed_in_bytes_per_ms) {
4583 if (FLAG_overapproximate_weak_closure && 4583 if (FLAG_overapproximate_weak_closure &&
(...skipping 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after
6586 *object_type = "CODE_TYPE"; \ 6586 *object_type = "CODE_TYPE"; \
6587 *object_sub_type = "CODE_AGE/" #name; \ 6587 *object_sub_type = "CODE_AGE/" #name; \
6588 return true; 6588 return true;
6589 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) 6589 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME)
6590 #undef COMPARE_AND_RETURN_NAME 6590 #undef COMPARE_AND_RETURN_NAME
6591 } 6591 }
6592 return false; 6592 return false;
6593 } 6593 }
6594 } 6594 }
6595 } // namespace v8::internal 6595 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698