OLD | NEW |
---|---|
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); | 171 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); |
172 Object* target = rinfo->target_object(); | 172 Object* target = rinfo->target_object(); |
173 if (target->NonFailureIsHeapObject()) { | 173 if (target->NonFailureIsHeapObject()) { |
174 heap_->mark_compact_collector()->RecordRelocSlot(rinfo, target); | 174 heap_->mark_compact_collector()->RecordRelocSlot(rinfo, target); |
175 MarkObject(target); | 175 MarkObject(target); |
176 } | 176 } |
177 } | 177 } |
178 | 178 |
179 void VisitCodeTarget(RelocInfo* rinfo) { | 179 void VisitCodeTarget(RelocInfo* rinfo) { |
180 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); | 180 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); |
181 Object* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); | 181 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); |
182 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub() | |
183 && (target->context_disposed_count() != | |
184 heap_->global_context_disposed_count())) { | |
185 IC::Clear(rinfo->pc()); | |
Vyacheslav Egorov (Chromium)
2012/03/22 14:47:05
I would expect we reset counter to be equal to hea
ulan
2012/03/23 10:47:13
As discussed offline, this should work because we
| |
186 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); | |
187 } | |
182 heap_->mark_compact_collector()->RecordRelocSlot(rinfo, Code::cast(target)); | 188 heap_->mark_compact_collector()->RecordRelocSlot(rinfo, Code::cast(target)); |
183 MarkObject(target); | 189 MarkObject(target); |
184 } | 190 } |
185 | 191 |
186 void VisitDebugTarget(RelocInfo* rinfo) { | 192 void VisitDebugTarget(RelocInfo* rinfo) { |
187 ASSERT((RelocInfo::IsJSReturn(rinfo->rmode()) && | 193 ASSERT((RelocInfo::IsJSReturn(rinfo->rmode()) && |
188 rinfo->IsPatchedReturnSequence()) || | 194 rinfo->IsPatchedReturnSequence()) || |
189 (RelocInfo::IsDebugBreakSlot(rinfo->rmode()) && | 195 (RelocInfo::IsDebugBreakSlot(rinfo->rmode()) && |
190 rinfo->IsPatchedDebugBreakSlotSequence())); | 196 rinfo->IsPatchedDebugBreakSlotSequence())); |
191 Object* target = Code::GetCodeFromTargetAddress(rinfo->call_address()); | 197 Object* target = Code::GetCodeFromTargetAddress(rinfo->call_address()); |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
917 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 923 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
918 bytes_scanned_ = 0; | 924 bytes_scanned_ = 0; |
919 } | 925 } |
920 | 926 |
921 | 927 |
922 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 928 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
923 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 929 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); |
924 } | 930 } |
925 | 931 |
926 } } // namespace v8::internal | 932 } } // namespace v8::internal |
OLD | NEW |