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

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

Issue 11415070: Forward white to grey transition only if slot is before the progress bar of a given object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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 | no next file » | 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 // 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 26 matching lines...) Expand all
37 bool IncrementalMarking::BaseRecordWrite(HeapObject* obj, 37 bool IncrementalMarking::BaseRecordWrite(HeapObject* obj,
38 Object** slot, 38 Object** slot,
39 Object* value) { 39 Object* value) {
40 HeapObject* value_heap_obj = HeapObject::cast(value); 40 HeapObject* value_heap_obj = HeapObject::cast(value);
41 MarkBit value_bit = Marking::MarkBitFrom(value_heap_obj); 41 MarkBit value_bit = Marking::MarkBitFrom(value_heap_obj);
42 if (Marking::IsWhite(value_bit)) { 42 if (Marking::IsWhite(value_bit)) {
43 MarkBit obj_bit = Marking::MarkBitFrom(obj); 43 MarkBit obj_bit = Marking::MarkBitFrom(obj);
44 if (Marking::IsBlack(obj_bit)) { 44 if (Marking::IsBlack(obj_bit)) {
45 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address()); 45 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address());
46 if (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) { 46 if (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) {
47 WhiteToGreyAndPush(value_heap_obj, value_bit); 47 if (reinterpret_cast<Address>(slot) - reinterpret_cast<Address>(obj)
Michael Starzinger 2012/11/21 17:11:38 We don't even need to record relocation slots when
Hannes Payer (out of office) 2012/11/21 18:03:57 Done.
48 RestartIfNotMarking(); 48 < chunk->progress_bar()) {
49 ASSERT(reinterpret_cast<Address>(slot)
50 > reinterpret_cast<Address>(obj));
51 WhiteToGreyAndPush(value_heap_obj, value_bit);
52 RestartIfNotMarking();
53 }
49 } else { 54 } else {
50 BlackToGreyAndUnshift(obj, obj_bit); 55 BlackToGreyAndUnshift(obj, obj_bit);
51 RestartIfNotMarking(); 56 RestartIfNotMarking();
52 return false; 57 return false;
53 } 58 }
54 } else { 59 } else {
55 return false; 60 return false;
56 } 61 }
57 } 62 }
58 if (!is_compacting_) return false; 63 if (!is_compacting_) return false;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 133
129 void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) { 134 void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) {
130 Marking::WhiteToGrey(mark_bit); 135 Marking::WhiteToGrey(mark_bit);
131 marking_deque_.PushGrey(obj); 136 marking_deque_.PushGrey(obj);
132 } 137 }
133 138
134 139
135 } } // namespace v8::internal 140 } } // namespace v8::internal
136 141
137 #endif // V8_INCREMENTAL_MARKING_INL_H_ 142 #endif // V8_INCREMENTAL_MARKING_INL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698