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

Side by Side Diff: src/incremental-marking-inl.h

Issue 10376008: Use correct size of promoted space for setting promotion and allocation limits. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove new-line Created 8 years, 7 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/incremental-marking.cc ('k') | src/mark-compact.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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 ASSERT(Marking::MarkBitFrom(obj) == mark_bit); 93 ASSERT(Marking::MarkBitFrom(obj) == mark_bit);
94 ASSERT(obj->Size() >= 2*kPointerSize); 94 ASSERT(obj->Size() >= 2*kPointerSize);
95 ASSERT(IsMarking()); 95 ASSERT(IsMarking());
96 Marking::BlackToGrey(mark_bit); 96 Marking::BlackToGrey(mark_bit);
97 int obj_size = obj->Size(); 97 int obj_size = obj->Size();
98 MemoryChunk::IncrementLiveBytesFromGC(obj->address(), -obj_size); 98 MemoryChunk::IncrementLiveBytesFromGC(obj->address(), -obj_size);
99 bytes_scanned_ -= obj_size; 99 bytes_scanned_ -= obj_size;
100 int64_t old_bytes_rescanned = bytes_rescanned_; 100 int64_t old_bytes_rescanned = bytes_rescanned_;
101 bytes_rescanned_ = old_bytes_rescanned + obj_size; 101 bytes_rescanned_ = old_bytes_rescanned + obj_size;
102 if ((bytes_rescanned_ >> 20) != (old_bytes_rescanned >> 20)) { 102 if ((bytes_rescanned_ >> 20) != (old_bytes_rescanned >> 20)) {
103 if (bytes_rescanned_ > 2 * heap_->PromotedSpaceSize()) { 103 if (bytes_rescanned_ > 2 * heap_->PromotedSpaceSizeOfObjects()) {
104 // If we have queued twice the heap size for rescanning then we are 104 // If we have queued twice the heap size for rescanning then we are
105 // going around in circles, scanning the same objects again and again 105 // going around in circles, scanning the same objects again and again
106 // as the program mutates the heap faster than we can incrementally 106 // as the program mutates the heap faster than we can incrementally
107 // trace it. In this case we switch to non-incremental marking in 107 // trace it. In this case we switch to non-incremental marking in
108 // order to finish off this marking phase. 108 // order to finish off this marking phase.
109 if (FLAG_trace_gc) { 109 if (FLAG_trace_gc) {
110 PrintF("Hurrying incremental marking because of lack of progress\n"); 110 PrintF("Hurrying incremental marking because of lack of progress\n");
111 } 111 }
112 allocation_marking_factor_ = kMaxAllocationMarkingFactor; 112 allocation_marking_factor_ = kMaxAllocationMarkingFactor;
113 } 113 }
(...skipping 10 matching lines...) Expand all
124 124
125 125
126 void IncrementalMarking::WhiteToGrey(HeapObject* obj, MarkBit mark_bit) { 126 void IncrementalMarking::WhiteToGrey(HeapObject* obj, MarkBit mark_bit) {
127 Marking::WhiteToGrey(mark_bit); 127 Marking::WhiteToGrey(mark_bit);
128 } 128 }
129 129
130 130
131 } } // namespace v8::internal 131 } } // namespace v8::internal
132 132
133 #endif // V8_INCREMENTAL_MARKING_INL_H_ 133 #endif // V8_INCREMENTAL_MARKING_INL_H_
OLDNEW
« no previous file with comments | « src/incremental-marking.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698