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

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

Issue 11308177: Reset progress bar of object to 0 when RecordWrites changes object color to grey. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 if (IsMarking() && value->NonFailureIsHeapObject()) { 83 if (IsMarking() && value->NonFailureIsHeapObject()) {
84 RecordWriteIntoCodeSlow(obj, rinfo, value); 84 RecordWriteIntoCodeSlow(obj, rinfo, value);
85 } 85 }
86 } 86 }
87 87
88 88
89 void IncrementalMarking::RecordWrites(HeapObject* obj) { 89 void IncrementalMarking::RecordWrites(HeapObject* obj) {
90 if (IsMarking()) { 90 if (IsMarking()) {
91 MarkBit obj_bit = Marking::MarkBitFrom(obj); 91 MarkBit obj_bit = Marking::MarkBitFrom(obj);
92 if (Marking::IsBlack(obj_bit)) { 92 if (Marking::IsBlack(obj_bit)) {
93 MemoryChunk* chunk = MemoryChunk::FromAddress(obj->address());
94 if (chunk->IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) {
95 chunk->set_progress_bar(0);
96 }
93 BlackToGreyAndUnshift(obj, obj_bit); 97 BlackToGreyAndUnshift(obj, obj_bit);
94 RestartIfNotMarking(); 98 RestartIfNotMarking();
95 } 99 }
96 } 100 }
97 } 101 }
98 102
99 103
100 void IncrementalMarking::BlackToGreyAndUnshift(HeapObject* obj, 104 void IncrementalMarking::BlackToGreyAndUnshift(HeapObject* obj,
101 MarkBit mark_bit) { 105 MarkBit mark_bit) {
102 ASSERT(Marking::MarkBitFrom(obj) == mark_bit); 106 ASSERT(Marking::MarkBitFrom(obj) == mark_bit);
(...skipping 25 matching lines...) Expand all
128 132
129 void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) { 133 void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) {
130 Marking::WhiteToGrey(mark_bit); 134 Marking::WhiteToGrey(mark_bit);
131 marking_deque_.PushGrey(obj); 135 marking_deque_.PushGrey(obj);
132 } 136 }
133 137
134 138
135 } } // namespace v8::internal 139 } } // namespace v8::internal
136 140
137 #endif // V8_INCREMENTAL_MARKING_INL_H_ 141 #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