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

Side by Side Diff: src/heap/incremental-marking-inl.h

Issue 2293883002: Make incremental marking tracing format consistent with GC tracing. (Closed)
Patch Set: Move marking restart function to inl file Created 4 years, 3 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/incremental-marking.cc ('k') | src/isolate.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 #ifndef V8_HEAP_INCREMENTAL_MARKING_INL_H_ 5 #ifndef V8_HEAP_INCREMENTAL_MARKING_INL_H_
6 #define V8_HEAP_INCREMENTAL_MARKING_INL_H_ 6 #define V8_HEAP_INCREMENTAL_MARKING_INL_H_
7 7
8 #include "src/heap/incremental-marking.h" 8 #include "src/heap/incremental-marking.h"
9 #include "src/isolate.h"
9 10
10 namespace v8 { 11 namespace v8 {
11 namespace internal { 12 namespace internal {
12 13
13 14
14 void IncrementalMarking::RecordWrite(HeapObject* obj, Object** slot, 15 void IncrementalMarking::RecordWrite(HeapObject* obj, Object** slot,
15 Object* value) { 16 Object* value) {
16 if (IsMarking() && value->IsHeapObject()) { 17 if (IsMarking() && value->IsHeapObject()) {
17 RecordWriteSlow(obj, slot, value); 18 RecordWriteSlow(obj, slot, value);
18 } 19 }
19 } 20 }
20 21
21 22
22 void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host, Object** slot, 23 void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host, Object** slot,
23 Code* value) { 24 Code* value) {
24 if (IsMarking()) { 25 if (IsMarking()) {
25 RecordWriteOfCodeEntrySlow(host, slot, value); 26 RecordWriteOfCodeEntrySlow(host, slot, value);
26 } 27 }
27 } 28 }
28 29
29 void IncrementalMarking::RecordWriteIntoCode(Code* host, RelocInfo* rinfo, 30 void IncrementalMarking::RecordWriteIntoCode(Code* host, RelocInfo* rinfo,
30 Object* value) { 31 Object* value) {
31 if (IsMarking() && value->IsHeapObject()) { 32 if (IsMarking() && value->IsHeapObject()) {
32 RecordWriteIntoCodeSlow(host, rinfo, value); 33 RecordWriteIntoCodeSlow(host, rinfo, value);
33 } 34 }
34 } 35 }
35 36
37 void IncrementalMarking::RestartIfNotMarking() {
38 if (state_ == COMPLETE) {
39 state_ = MARKING;
40 if (FLAG_trace_incremental_marking) {
41 heap()->isolate()->PrintWithTimestamp(
42 "[IncrementalMarking] Restarting (new grey objects)\n");
43 }
44 }
45 }
36 46
37 } // namespace internal 47 } // namespace internal
38 } // namespace v8 48 } // namespace v8
39 49
40 #endif // V8_HEAP_INCREMENTAL_MARKING_INL_H_ 50 #endif // V8_HEAP_INCREMENTAL_MARKING_INL_H_
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698