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

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

Issue 10386046: Implement map collection for incremental marking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Major cleanup of prototype. 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') | src/incremental-marking.cc » ('J')
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 2012 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 ASSERT(!Marking::IsImpossible(mark_bit)); 162 ASSERT(!Marking::IsImpossible(mark_bit));
163 if (mark_bit.Get()) { 163 if (mark_bit.Get()) {
164 // Grey or black: Keep the color. 164 // Grey or black: Keep the color.
165 return false; 165 return false;
166 } 166 }
167 mark_bit.Set(); 167 mark_bit.Set();
168 ASSERT(Marking::IsBlack(mark_bit)); 168 ASSERT(Marking::IsBlack(mark_bit));
169 return true; 169 return true;
170 } 170 }
171 171
172 // Marks the object grey and pushes it on the marking stack.
173 // Returns true if object needed marking and false otherwise.
174 // This is for incremental marking only.
175 INLINE(bool MarkObject(HeapObject* obj));
176
177 // Marks the object black without pushing it on the marking stack.
178 // Returns true if object needed marking and false otherwise.
179 // This is for incremental marking only.
180 INLINE(bool MarkObjectWithoutPush(HeapObject* obj));
181
172 inline int steps_count() { 182 inline int steps_count() {
173 return steps_count_; 183 return steps_count_;
174 } 184 }
175 185
176 inline double steps_took() { 186 inline double steps_took() {
177 return steps_took_; 187 return steps_took_;
178 } 188 }
179 189
180 inline double longest_step() { 190 inline double longest_step() {
181 return longest_step_; 191 return longest_step_;
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 void VisitGlobalContext(Context* ctx, ObjectVisitor* v); 263 void VisitGlobalContext(Context* ctx, ObjectVisitor* v);
254 264
255 Heap* heap_; 265 Heap* heap_;
256 266
257 State state_; 267 State state_;
258 bool is_compacting_; 268 bool is_compacting_;
259 269
260 VirtualMemory* marking_deque_memory_; 270 VirtualMemory* marking_deque_memory_;
261 bool marking_deque_memory_committed_; 271 bool marking_deque_memory_committed_;
262 MarkingDeque marking_deque_; 272 MarkingDeque marking_deque_;
273 Marker<IncrementalMarking> marker_;
263 274
264 int steps_count_; 275 int steps_count_;
265 double steps_took_; 276 double steps_took_;
266 double longest_step_; 277 double longest_step_;
267 int64_t old_generation_space_available_at_start_of_incremental_; 278 int64_t old_generation_space_available_at_start_of_incremental_;
268 int64_t old_generation_space_used_at_start_of_incremental_; 279 int64_t old_generation_space_used_at_start_of_incremental_;
269 int steps_count_since_last_gc_; 280 int steps_count_since_last_gc_;
270 double steps_took_since_last_gc_; 281 double steps_took_since_last_gc_;
271 int64_t bytes_rescanned_; 282 int64_t bytes_rescanned_;
272 bool should_hurry_; 283 bool should_hurry_;
273 int allocation_marking_factor_; 284 int allocation_marking_factor_;
274 intptr_t bytes_scanned_; 285 intptr_t bytes_scanned_;
275 intptr_t allocated_; 286 intptr_t allocated_;
276 287
277 int no_marking_scope_depth_; 288 int no_marking_scope_depth_;
278 289
279 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); 290 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking);
280 }; 291 };
281 292
282 } } // namespace v8::internal 293 } } // namespace v8::internal
283 294
284 #endif // V8_INCREMENTAL_MARKING_H_ 295 #endif // V8_INCREMENTAL_MARKING_H_
OLDNEW
« no previous file with comments | « no previous file | src/incremental-marking.cc » ('j') | src/incremental-marking.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698