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

Side by Side Diff: src/mark-compact.cc

Issue 1759005: Switch to aggresive promotion in mark-sweep collections. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 8 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 | 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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 for (Address current = from_bottom; current < from_top; current += size) { 1203 for (Address current = from_bottom; current < from_top; current += size) {
1204 HeapObject* object = HeapObject::FromAddress(current); 1204 HeapObject* object = HeapObject::FromAddress(current);
1205 1205
1206 if (object->IsMarked()) { 1206 if (object->IsMarked()) {
1207 object->ClearMark(); 1207 object->ClearMark();
1208 MarkCompactCollector::tracer()->decrement_marked_count(); 1208 MarkCompactCollector::tracer()->decrement_marked_count();
1209 1209
1210 size = object->Size(); 1210 size = object->Size();
1211 survivors_size += size; 1211 survivors_size += size;
1212 1212
1213 if (Heap::ShouldBePromoted(current, size) && 1213 // Aggressively promote young survivors to the old space.
1214 TryPromoteObject(object, size)) { 1214 if (TryPromoteObject(object, size)) {
1215 continue; 1215 continue;
1216 } 1216 }
1217 1217
1218 // Promotion either failed or not required. 1218 // Promotion either failed or not required.
1219 // Copy the content of the object. 1219 // Copy the content of the object.
1220 Object* target = space->AllocateRaw(size); 1220 Object* target = space->AllocateRaw(size);
1221 1221
1222 // Allocation cannot fail at this point: semispaces are of equal size. 1222 // Allocation cannot fail at this point: semispaces are of equal size.
1223 ASSERT(!target->IsFailure()); 1223 ASSERT(!target->IsFailure());
1224 1224
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
2210 #ifdef ENABLE_LOGGING_AND_PROFILING 2210 #ifdef ENABLE_LOGGING_AND_PROFILING
2211 if (obj->IsCode()) { 2211 if (obj->IsCode()) {
2212 PROFILE(CodeDeleteEvent(obj->address())); 2212 PROFILE(CodeDeleteEvent(obj->address()));
2213 } else if (obj->IsJSFunction()) { 2213 } else if (obj->IsJSFunction()) {
2214 PROFILE(FunctionDeleteEvent(obj->address())); 2214 PROFILE(FunctionDeleteEvent(obj->address()));
2215 } 2215 }
2216 #endif 2216 #endif
2217 } 2217 }
2218 2218
2219 } } // namespace v8::internal 2219 } } // namespace v8::internal
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