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

Side by Side Diff: src/spaces.cc

Issue 10041025: Merged r11143, r11162, r11174, r11208, r11213, r11222 into 3.9 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.9
Patch Set: Created 8 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 | « src/runtime-profiler.cc ('k') | src/version.cc » ('j') | no next file with comments »
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 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 1180 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 Address old_top = allocation_info_.top; 1191 Address old_top = allocation_info_.top;
1192 Address new_top = old_top + size_in_bytes; 1192 Address new_top = old_top + size_in_bytes;
1193 Address high = to_space_.page_high(); 1193 Address high = to_space_.page_high();
1194 if (allocation_info_.limit < high) { 1194 if (allocation_info_.limit < high) {
1195 // Incremental marking has lowered the limit to get a 1195 // Incremental marking has lowered the limit to get a
1196 // chance to do a step. 1196 // chance to do a step.
1197 allocation_info_.limit = Min( 1197 allocation_info_.limit = Min(
1198 allocation_info_.limit + inline_allocation_limit_step_, 1198 allocation_info_.limit + inline_allocation_limit_step_,
1199 high); 1199 high);
1200 int bytes_allocated = static_cast<int>(new_top - top_on_previous_step_); 1200 int bytes_allocated = static_cast<int>(new_top - top_on_previous_step_);
1201 heap()->incremental_marking()->Step(bytes_allocated); 1201 heap()->incremental_marking()->Step(
1202 bytes_allocated, IncrementalMarking::GC_VIA_STACK_GUARD);
1202 top_on_previous_step_ = new_top; 1203 top_on_previous_step_ = new_top;
1203 return AllocateRaw(size_in_bytes); 1204 return AllocateRaw(size_in_bytes);
1204 } else if (AddFreshPage()) { 1205 } else if (AddFreshPage()) {
1205 // Switched to new page. Try allocating again. 1206 // Switched to new page. Try allocating again.
1206 int bytes_allocated = static_cast<int>(old_top - top_on_previous_step_); 1207 int bytes_allocated = static_cast<int>(old_top - top_on_previous_step_);
1207 heap()->incremental_marking()->Step(bytes_allocated); 1208 heap()->incremental_marking()->Step(
1209 bytes_allocated, IncrementalMarking::GC_VIA_STACK_GUARD);
1208 top_on_previous_step_ = to_space_.page_low(); 1210 top_on_previous_step_ = to_space_.page_low();
1209 return AllocateRaw(size_in_bytes); 1211 return AllocateRaw(size_in_bytes);
1210 } else { 1212 } else {
1211 return Failure::RetryAfterGC(); 1213 return Failure::RetryAfterGC();
1212 } 1214 }
1213 } 1215 }
1214 1216
1215 1217
1216 #ifdef DEBUG 1218 #ifdef DEBUG
1217 // We do not use the SemiSpaceIterator because verification doesn't assume 1219 // We do not use the SemiSpaceIterator because verification doesn't assume
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after
2814 object->ShortPrint(); 2816 object->ShortPrint();
2815 PrintF("\n"); 2817 PrintF("\n");
2816 } 2818 }
2817 printf(" --------------------------------------\n"); 2819 printf(" --------------------------------------\n");
2818 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 2820 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
2819 } 2821 }
2820 2822
2821 #endif // DEBUG 2823 #endif // DEBUG
2822 2824
2823 } } // namespace v8::internal 2825 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime-profiler.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698