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

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

Issue 1183633005: Dampen the old generation allocation limit only after the initial old generation size was configure… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 double gc_speed = tracer()->CombinedMarkCompactSpeedInBytesPerMillisecond(); 1289 double gc_speed = tracer()->CombinedMarkCompactSpeedInBytesPerMillisecond();
1290 double mutator_speed = static_cast<double>( 1290 double mutator_speed = static_cast<double>(
1291 tracer() 1291 tracer()
1292 ->CurrentOldGenerationAllocationThroughputInBytesPerMillisecond()); 1292 ->CurrentOldGenerationAllocationThroughputInBytesPerMillisecond());
1293 intptr_t old_gen_size = PromotedSpaceSizeOfObjects(); 1293 intptr_t old_gen_size = PromotedSpaceSizeOfObjects();
1294 if (collector == MARK_COMPACTOR) { 1294 if (collector == MARK_COMPACTOR) {
1295 // Register the amount of external allocated memory. 1295 // Register the amount of external allocated memory.
1296 amount_of_external_allocated_memory_at_last_global_gc_ = 1296 amount_of_external_allocated_memory_at_last_global_gc_ =
1297 amount_of_external_allocated_memory_; 1297 amount_of_external_allocated_memory_;
1298 SetOldGenerationAllocationLimit(old_gen_size, gc_speed, mutator_speed); 1298 SetOldGenerationAllocationLimit(old_gen_size, gc_speed, mutator_speed);
1299 } else if (HasLowYoungGenerationAllocationRate()) { 1299 } else if (HasLowYoungGenerationAllocationRate() &&
1300 old_generation_size_configured_) {
1300 DampenOldGenerationAllocationLimit(old_gen_size, gc_speed, mutator_speed); 1301 DampenOldGenerationAllocationLimit(old_gen_size, gc_speed, mutator_speed);
1301 } 1302 }
1302 1303
1303 { 1304 {
1304 GCCallbacksScope scope(this); 1305 GCCallbacksScope scope(this);
1305 if (scope.CheckReenter()) { 1306 if (scope.CheckReenter()) {
1306 AllowHeapAllocation allow_allocation; 1307 AllowHeapAllocation allow_allocation;
1307 GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL); 1308 GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL);
1308 VMState<EXTERNAL> state(isolate_); 1309 VMState<EXTERNAL> state(isolate_);
1309 HandleScope handle_scope(isolate_); 1310 HandleScope handle_scope(isolate_);
(...skipping 5501 matching lines...) Expand 10 before | Expand all | Expand 10 after
6811 *object_type = "CODE_TYPE"; \ 6812 *object_type = "CODE_TYPE"; \
6812 *object_sub_type = "CODE_AGE/" #name; \ 6813 *object_sub_type = "CODE_AGE/" #name; \
6813 return true; 6814 return true;
6814 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) 6815 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME)
6815 #undef COMPARE_AND_RETURN_NAME 6816 #undef COMPARE_AND_RETURN_NAME
6816 } 6817 }
6817 return false; 6818 return false;
6818 } 6819 }
6819 } // namespace internal 6820 } // namespace internal
6820 } // namespace v8 6821 } // namespace v8
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