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

Side by Side Diff: src/heap-inl.h

Issue 356613004: Promotion is the backup strategy when semi-space copy fails and vice versa. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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.cc ('k') | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_INL_H_ 5 #ifndef V8_HEAP_INL_H_
6 #define V8_HEAP_INL_H_ 6 #define V8_HEAP_INL_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 } 381 }
382 382
383 383
384 bool Heap::OldGenerationAllocationLimitReached() { 384 bool Heap::OldGenerationAllocationLimitReached() {
385 if (!incremental_marking()->IsStopped()) return false; 385 if (!incremental_marking()->IsStopped()) return false;
386 return OldGenerationSpaceAvailable() < 0; 386 return OldGenerationSpaceAvailable() < 0;
387 } 387 }
388 388
389 389
390 bool Heap::ShouldBePromoted(Address old_address, int object_size) { 390 bool Heap::ShouldBePromoted(Address old_address, int object_size) {
391 // An object should be promoted if the object has survived a
392 // scavenge operation.
393 NewSpacePage* page = NewSpacePage::FromAddress(old_address); 391 NewSpacePage* page = NewSpacePage::FromAddress(old_address);
394 Address age_mark = new_space_.age_mark(); 392 Address age_mark = new_space_.age_mark();
395 return page->IsFlagSet(MemoryChunk::NEW_SPACE_BELOW_AGE_MARK) && 393 return page->IsFlagSet(MemoryChunk::NEW_SPACE_BELOW_AGE_MARK) &&
396 (!page->ContainsLimit(age_mark) || old_address < age_mark); 394 (!page->ContainsLimit(age_mark) || old_address < age_mark);
397 } 395 }
398 396
399 397
400 void Heap::RecordWrite(Address address, int offset) { 398 void Heap::RecordWrite(Address address, int offset) {
401 if (!InNewSpace(address)) store_buffer_.Mark(address + offset); 399 if (!InNewSpace(address)) store_buffer_.Mark(address + offset);
402 } 400 }
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 805
808 806
809 double GCTracer::SizeOfHeapObjects() { 807 double GCTracer::SizeOfHeapObjects() {
810 return (static_cast<double>(heap_->SizeOfObjects())) / MB; 808 return (static_cast<double>(heap_->SizeOfObjects())) / MB;
811 } 809 }
812 810
813 811
814 } } // namespace v8::internal 812 } } // namespace v8::internal
815 813
816 #endif // V8_HEAP_INL_H_ 814 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698