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

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

Issue 6639024: Get rid of distinction between below- and above-watermark in page allocation.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 9 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
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 HeapObject* object = HeapObject::cast(*p); 81 HeapObject* object = HeapObject::cast(*p);
82 if (IncrementalMarking::IsWhite(object)) { 82 if (IncrementalMarking::IsWhite(object)) {
83 IncrementalMarking::WhiteToGrey(object); 83 IncrementalMarking::WhiteToGrey(object);
84 } 84 }
85 } 85 }
86 }; 86 };
87 87
88 88
89 static void ClearMarkbits(PagedSpace* space) { 89 static void ClearMarkbits(PagedSpace* space) {
90 PageIterator it(space, PageIterator::PAGES_IN_USE); 90 PageIterator it(space);
91 91
92 while (it.has_next()) { 92 while (it.has_next()) {
93 Page* p = it.next(); 93 Page* p = it.next();
94 p->markbits()->Clear(); 94 p->markbits()->Clear();
95 } 95 }
96 } 96 }
97 97
98 98
99 static void ClearMarkbits() { 99 static void ClearMarkbits() {
100 // We are sweeping code and map spaces precisely so clearing is not required. 100 // TODO: Clear the mark bits in the sweeper.
101 ClearMarkbits(Heap::old_pointer_space()); 101 ClearMarkbits(Heap::old_pointer_space());
102 ClearMarkbits(Heap::old_data_space()); 102 ClearMarkbits(Heap::old_data_space());
103 ClearMarkbits(Heap::cell_space()); 103 ClearMarkbits(Heap::cell_space());
104 ClearMarkbits(Heap::map_space());
105 ClearMarkbits(Heap::code_space());
104 } 106 }
105 107
106 108
107 #ifdef DEBUG 109 #ifdef DEBUG
108 static void VerifyMarkbitsAreClean(PagedSpace* space) { 110 static void VerifyMarkbitsAreClean(PagedSpace* space) {
109 PageIterator it(space, PageIterator::PAGES_IN_USE); 111 PageIterator it(space);
110 112
111 while (it.has_next()) { 113 while (it.has_next()) {
112 Page* p = it.next(); 114 Page* p = it.next();
113 ASSERT(p->markbits()->IsClean()); 115 ASSERT(p->markbits()->IsClean());
114 } 116 }
115 } 117 }
116 118
117 static void VerifyMarkbitsAreClean() { 119 static void VerifyMarkbitsAreClean() {
118 VerifyMarkbitsAreClean(Heap::old_pointer_space()); 120 VerifyMarkbitsAreClean(Heap::old_pointer_space());
119 VerifyMarkbitsAreClean(Heap::old_data_space()); 121 VerifyMarkbitsAreClean(Heap::old_data_space());
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 static_cast<int>(end - start)); 281 static_cast<int>(end - start));
280 } 282 }
281 allocated = 0; 283 allocated = 0;
282 if (marking_stack_.is_empty()) MarkingComplete(); 284 if (marking_stack_.is_empty()) MarkingComplete();
283 } 285 }
284 } 286 }
285 } 287 }
286 288
287 289
288 } } // namespace v8::internal 290 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-profiler.cc ('k') | src/liveedit.cc » ('j') | src/spaces-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698