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

Side by Side Diff: src/heap/incremental-marking.cc

Issue 1542113002: Do not mark from native code. Check color and call incremental marker instead. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 12 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/arm64/macro-assembler-arm64.cc ('k') | src/ia32/code-stubs-ia32.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/heap/incremental-marking.h" 5 #include "src/heap/incremental-marking.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/compilation-cache.h" 8 #include "src/compilation-cache.h"
9 #include "src/conversions.h" 9 #include "src/conversions.h"
10 #include "src/heap/gc-idle-time-handler.h" 10 #include "src/heap/gc-idle-time-handler.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 unscanned_bytes_of_large_object_(0), 43 unscanned_bytes_of_large_object_(0),
44 was_activated_(false), 44 was_activated_(false),
45 finalize_marking_completed_(false), 45 finalize_marking_completed_(false),
46 incremental_marking_finalization_rounds_(0), 46 incremental_marking_finalization_rounds_(0),
47 request_type_(COMPLETE_MARKING) {} 47 request_type_(COMPLETE_MARKING) {}
48 48
49 49
50 bool IncrementalMarking::BaseRecordWrite(HeapObject* obj, Object* value) { 50 bool IncrementalMarking::BaseRecordWrite(HeapObject* obj, Object* value) {
51 HeapObject* value_heap_obj = HeapObject::cast(value); 51 HeapObject* value_heap_obj = HeapObject::cast(value);
52 MarkBit value_bit = Marking::MarkBitFrom(value_heap_obj); 52 MarkBit value_bit = Marking::MarkBitFrom(value_heap_obj);
53 DCHECK(!Marking::IsImpossible(value_bit));
54
53 MarkBit obj_bit = Marking::MarkBitFrom(obj); 55 MarkBit obj_bit = Marking::MarkBitFrom(obj);
56 DCHECK(!Marking::IsImpossible(obj_bit));
54 bool is_black = Marking::IsBlack(obj_bit); 57 bool is_black = Marking::IsBlack(obj_bit);
58
55 if (is_black && Marking::IsWhite(value_bit)) { 59 if (is_black && Marking::IsWhite(value_bit)) {
56 WhiteToGreyAndPush(value_heap_obj, value_bit); 60 WhiteToGreyAndPush(value_heap_obj, value_bit);
57 RestartIfNotMarking(); 61 RestartIfNotMarking();
58 } 62 }
59 return is_compacting_ && is_black; 63 return is_compacting_ && is_black;
60 } 64 }
61 65
62 66
63 void IncrementalMarking::RecordWriteSlow(HeapObject* obj, Object** slot, 67 void IncrementalMarking::RecordWriteSlow(HeapObject* obj, Object** slot,
64 Object* value) { 68 Object* value) {
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { 1246 void IncrementalMarking::IncrementIdleMarkingDelayCounter() {
1243 idle_marking_delay_counter_++; 1247 idle_marking_delay_counter_++;
1244 } 1248 }
1245 1249
1246 1250
1247 void IncrementalMarking::ClearIdleMarkingDelayCounter() { 1251 void IncrementalMarking::ClearIdleMarkingDelayCounter() {
1248 idle_marking_delay_counter_ = 0; 1252 idle_marking_delay_counter_ = 0;
1249 } 1253 }
1250 } // namespace internal 1254 } // namespace internal
1251 } // namespace v8 1255 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698