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

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

Issue 9179012: Reduce boot-up memory use of V8. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 11 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/heap-inl.h ('k') | src/mark-compact.cc » ('j') | src/spaces.h » ('J')
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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 void IncrementalMarking::SetOldSpacePageFlags(MemoryChunk* chunk, 281 void IncrementalMarking::SetOldSpacePageFlags(MemoryChunk* chunk,
282 bool is_marking, 282 bool is_marking,
283 bool is_compacting) { 283 bool is_compacting) {
284 if (is_marking) { 284 if (is_marking) {
285 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); 285 chunk->SetFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING);
286 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); 286 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING);
287 287
288 // It's difficult to filter out slots recorded for large objects. 288 // It's difficult to filter out slots recorded for large objects.
289 if (chunk->owner()->identity() == LO_SPACE && 289 if (chunk->owner()->identity() == LO_SPACE &&
290 chunk->size() > static_cast<size_t>(Page::kPageSize) && 290 chunk->size() > Page::kPageSize &&
291 is_compacting) { 291 is_compacting) {
292 chunk->SetFlag(MemoryChunk::RESCAN_ON_EVACUATION); 292 chunk->SetFlag(MemoryChunk::RESCAN_ON_EVACUATION);
293 } 293 }
294 } else if (chunk->owner()->identity() == CELL_SPACE || 294 } else if (chunk->owner()->identity() == CELL_SPACE ||
295 chunk->scan_on_scavenge()) { 295 chunk->scan_on_scavenge()) {
296 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); 296 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING);
297 chunk->ClearFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); 297 chunk->ClearFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING);
298 } else { 298 } else {
299 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING); 299 chunk->ClearFlag(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING);
300 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); 300 chunk->SetFlag(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING);
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
916 allocation_marking_factor_ = kInitialAllocationMarkingFactor; 916 allocation_marking_factor_ = kInitialAllocationMarkingFactor;
917 bytes_scanned_ = 0; 917 bytes_scanned_ = 0;
918 } 918 }
919 919
920 920
921 int64_t IncrementalMarking::SpaceLeftInOldSpace() { 921 int64_t IncrementalMarking::SpaceLeftInOldSpace() {
922 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); 922 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize();
923 } 923 }
924 924
925 } } // namespace v8::internal 925 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | src/mark-compact.cc » ('j') | src/spaces.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698