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

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

Issue 10383182: Revert r11556 and r11558 to allow roll. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2012 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
11 // with the distribution. 11 // with the distribution.
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void RecordWriteOfCodeEntrySlow(JSFunction* host, Object** slot, Code* value); 147 void RecordWriteOfCodeEntrySlow(JSFunction* host, Object** slot, Code* value);
148 void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value); 148 void RecordCodeTargetPatch(Code* host, Address pc, HeapObject* value);
149 void RecordCodeTargetPatch(Address pc, HeapObject* value); 149 void RecordCodeTargetPatch(Address pc, HeapObject* value);
150 150
151 inline void RecordWrites(HeapObject* obj); 151 inline void RecordWrites(HeapObject* obj);
152 152
153 inline void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit); 153 inline void BlackToGreyAndUnshift(HeapObject* obj, MarkBit mark_bit);
154 154
155 inline void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit); 155 inline void WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit);
156 156
157 inline void WhiteToGrey(HeapObject* obj, MarkBit mark_bit);
158
157 // Does white->black or keeps gray or black color. Returns true if converting 159 // Does white->black or keeps gray or black color. Returns true if converting
158 // white to black. 160 // white to black.
159 inline bool MarkBlackOrKeepGrey(MarkBit mark_bit) { 161 inline bool MarkBlackOrKeepGrey(MarkBit mark_bit) {
160 ASSERT(!Marking::IsImpossible(mark_bit)); 162 ASSERT(!Marking::IsImpossible(mark_bit));
161 if (mark_bit.Get()) { 163 if (mark_bit.Get()) {
162 // Grey or black: Keep the color. 164 // Grey or black: Keep the color.
163 return false; 165 return false;
164 } 166 }
165 mark_bit.Set(); 167 mark_bit.Set();
166 ASSERT(Marking::IsBlack(mark_bit)); 168 ASSERT(Marking::IsBlack(mark_bit));
167 return true; 169 return true;
168 } 170 }
169 171
170 // Marks the object grey and pushes it on the marking stack.
171 // Returns true if object needed marking and false otherwise.
172 // This is for incremental marking only.
173 INLINE(bool MarkObjectAndPush(HeapObject* obj));
174
175 // Marks the object black without pushing it on the marking stack.
176 // Returns true if object needed marking and false otherwise.
177 // This is for incremental marking only.
178 INLINE(bool MarkObjectWithoutPush(HeapObject* obj));
179
180 inline int steps_count() { 172 inline int steps_count() {
181 return steps_count_; 173 return steps_count_;
182 } 174 }
183 175
184 inline double steps_took() { 176 inline double steps_took() {
185 return steps_took_; 177 return steps_took_;
186 } 178 }
187 179
188 inline double longest_step() { 180 inline double longest_step() {
189 return longest_step_; 181 return longest_step_;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 void VisitGlobalContext(Context* ctx, ObjectVisitor* v); 253 void VisitGlobalContext(Context* ctx, ObjectVisitor* v);
262 254
263 Heap* heap_; 255 Heap* heap_;
264 256
265 State state_; 257 State state_;
266 bool is_compacting_; 258 bool is_compacting_;
267 259
268 VirtualMemory* marking_deque_memory_; 260 VirtualMemory* marking_deque_memory_;
269 bool marking_deque_memory_committed_; 261 bool marking_deque_memory_committed_;
270 MarkingDeque marking_deque_; 262 MarkingDeque marking_deque_;
271 Marker<IncrementalMarking> marker_;
272 263
273 int steps_count_; 264 int steps_count_;
274 double steps_took_; 265 double steps_took_;
275 double longest_step_; 266 double longest_step_;
276 int64_t old_generation_space_available_at_start_of_incremental_; 267 int64_t old_generation_space_available_at_start_of_incremental_;
277 int64_t old_generation_space_used_at_start_of_incremental_; 268 int64_t old_generation_space_used_at_start_of_incremental_;
278 int steps_count_since_last_gc_; 269 int steps_count_since_last_gc_;
279 double steps_took_since_last_gc_; 270 double steps_took_since_last_gc_;
280 int64_t bytes_rescanned_; 271 int64_t bytes_rescanned_;
281 bool should_hurry_; 272 bool should_hurry_;
282 int allocation_marking_factor_; 273 int allocation_marking_factor_;
283 intptr_t bytes_scanned_; 274 intptr_t bytes_scanned_;
284 intptr_t allocated_; 275 intptr_t allocated_;
285 276
286 int no_marking_scope_depth_; 277 int no_marking_scope_depth_;
287 278
288 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); 279 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking);
289 }; 280 };
290 281
291 } } // namespace v8::internal 282 } } // namespace v8::internal
292 283
293 #endif // V8_INCREMENTAL_MARKING_H_ 284 #endif // V8_INCREMENTAL_MARKING_H_
OLDNEW
« no previous file with comments | « no previous file | src/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698