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

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

Issue 7302003: Support slots recording for compaction during incremental marking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: fix presubmit, remove last debug check Created 9 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/incremental-marking.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (FLAG_trace_incremental_marking) { 103 if (FLAG_trace_incremental_marking) {
104 PrintF("[IncrementalMarking] Restarting (new grey objects)\n"); 104 PrintF("[IncrementalMarking] Restarting (new grey objects)\n");
105 } 105 }
106 } 106 }
107 } 107 }
108 108
109 static void RecordWriteFromCode(HeapObject* obj, 109 static void RecordWriteFromCode(HeapObject* obj,
110 Object* value, 110 Object* value,
111 Isolate* isolate); 111 Isolate* isolate);
112 112
113 inline void RecordWrite(HeapObject* obj, Object* value); 113 static void RecordWriteForEvacuationFromCode(HeapObject* obj,
114 Object** slot,
115 Isolate* isolate);
116
117 inline void RecordWrite(HeapObject* obj, Object** slot, Object* value);
114 inline void RecordWriteOf(HeapObject* value); 118 inline void RecordWriteOf(HeapObject* value);
115 inline void RecordWrites(HeapObject* obj); 119 inline void RecordWrites(HeapObject* obj);
116 120
117 inline void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit); 121 inline void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit);
118 122
119 inline void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit); 123 inline void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit);
120 124
121 inline void WhiteToGrey(HeapObject* obj, MarkBit mark_bit); 125 inline void WhiteToGrey(HeapObject* obj, MarkBit mark_bit);
122 126
123 // Does white->black or grey->grey 127 // Does white->black or grey->grey
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 void DeactivateIncrementalWriteBarrier(); 189 void DeactivateIncrementalWriteBarrier();
186 190
187 static void SetOldSpacePageFlags(MemoryChunk* chunk, bool is_marking); 191 static void SetOldSpacePageFlags(MemoryChunk* chunk, bool is_marking);
188 static void SetNewSpacePageFlags(NewSpacePage* chunk, bool is_marking); 192 static void SetNewSpacePageFlags(NewSpacePage* chunk, bool is_marking);
189 193
190 void EnsureMarkingDequeIsCommitted(); 194 void EnsureMarkingDequeIsCommitted();
191 195
192 Heap* heap_; 196 Heap* heap_;
193 197
194 State state_; 198 State state_;
199 bool is_compacting_;
195 200
196 VirtualMemory* marking_deque_memory_; 201 VirtualMemory* marking_deque_memory_;
197 MarkingDeque marking_deque_; 202 MarkingDeque marking_deque_;
198 203
199 int steps_count_; 204 int steps_count_;
200 double steps_took_; 205 double steps_took_;
201 int steps_count_since_last_gc_; 206 int steps_count_since_last_gc_;
202 double steps_took_since_last_gc_; 207 double steps_took_since_last_gc_;
203 bool should_hurry_; 208 bool should_hurry_;
204 int allocation_marking_factor_; 209 int allocation_marking_factor_;
205 intptr_t allocated_; 210 intptr_t allocated_;
206 }; 211 };
207 212
208 } } // namespace v8::internal 213 } } // namespace v8::internal
209 214
210 #endif // V8_INCREMENTAL_MARKING_H_ 215 #endif // V8_INCREMENTAL_MARKING_H_
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698