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

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

Issue 1156463002: Pass GC flags to incremental marker and start incremental marking with (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 | src/heap/incremental-marking.h » ('j') | src/heap/incremental-marking.cc » ('J')
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 4632 matching lines...) Expand 10 before | Expand all | Expand 10 after
4643 GCIdleTimeHandler::HeapState heap_state, 4643 GCIdleTimeHandler::HeapState heap_state,
4644 double deadline_in_ms, 4644 double deadline_in_ms,
4645 bool is_long_idle_notification) { 4645 bool is_long_idle_notification) {
4646 bool result = false; 4646 bool result = false;
4647 switch (action.type) { 4647 switch (action.type) {
4648 case DONE: 4648 case DONE:
4649 result = true; 4649 result = true;
4650 break; 4650 break;
4651 case DO_INCREMENTAL_MARKING: { 4651 case DO_INCREMENTAL_MARKING: {
4652 if (incremental_marking()->IsStopped()) { 4652 if (incremental_marking()->IsStopped()) {
4653 // TODO(ulan): take reduce_memory into account. 4653 incremental_marking()->Start(
4654 incremental_marking()->Start(); 4654 action.reduce_memory ? kReduceMemoryFootprintMask : kNoGCFlags);
4655 } 4655 }
4656 double remaining_idle_time_in_ms = 0.0; 4656 double remaining_idle_time_in_ms = 0.0;
4657 do { 4657 do {
4658 incremental_marking()->Step( 4658 incremental_marking()->Step(
4659 action.parameter, IncrementalMarking::NO_GC_VIA_STACK_GUARD, 4659 action.parameter, IncrementalMarking::NO_GC_VIA_STACK_GUARD,
4660 IncrementalMarking::FORCE_MARKING, 4660 IncrementalMarking::FORCE_MARKING,
4661 IncrementalMarking::DO_NOT_FORCE_COMPLETION); 4661 IncrementalMarking::DO_NOT_FORCE_COMPLETION);
4662 remaining_idle_time_in_ms = 4662 remaining_idle_time_in_ms =
4663 deadline_in_ms - MonotonicallyIncreasingTimeInMs(); 4663 deadline_in_ms - MonotonicallyIncreasingTimeInMs();
4664 } while (remaining_idle_time_in_ms >= 4664 } while (remaining_idle_time_in_ms >=
(...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after
6587 *object_type = "CODE_TYPE"; \ 6587 *object_type = "CODE_TYPE"; \
6588 *object_sub_type = "CODE_AGE/" #name; \ 6588 *object_sub_type = "CODE_AGE/" #name; \
6589 return true; 6589 return true;
6590 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) 6590 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME)
6591 #undef COMPARE_AND_RETURN_NAME 6591 #undef COMPARE_AND_RETURN_NAME
6592 } 6592 }
6593 return false; 6593 return false;
6594 } 6594 }
6595 } 6595 }
6596 } // namespace v8::internal 6596 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap/incremental-marking.h » ('j') | src/heap/incremental-marking.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698