OLD | NEW |
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 #include "src/heap/heap.h" | 5 #include "src/heap/heap.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 5679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5690 | 5690 |
5691 // Set up the special root array entries containing the stack limits. | 5691 // Set up the special root array entries containing the stack limits. |
5692 // These are actually addresses, but the tag makes the GC ignore it. | 5692 // These are actually addresses, but the tag makes the GC ignore it. |
5693 roots_[kStackLimitRootIndex] = reinterpret_cast<Object*>( | 5693 roots_[kStackLimitRootIndex] = reinterpret_cast<Object*>( |
5694 (isolate_->stack_guard()->jslimit() & ~kSmiTagMask) | kSmiTag); | 5694 (isolate_->stack_guard()->jslimit() & ~kSmiTagMask) | kSmiTag); |
5695 roots_[kRealStackLimitRootIndex] = reinterpret_cast<Object*>( | 5695 roots_[kRealStackLimitRootIndex] = reinterpret_cast<Object*>( |
5696 (isolate_->stack_guard()->real_jslimit() & ~kSmiTagMask) | kSmiTag); | 5696 (isolate_->stack_guard()->real_jslimit() & ~kSmiTagMask) | kSmiTag); |
5697 } | 5697 } |
5698 | 5698 |
5699 | 5699 |
| 5700 void Heap::PrintAlloctionsHash() { |
| 5701 uint32_t hash = StringHasher::GetHashCore(raw_allocations_hash_); |
| 5702 PrintF("\n### Allocations = %u, hash = 0x%08x\n", allocations_count(), hash); |
| 5703 } |
| 5704 |
| 5705 |
5700 void Heap::NotifyDeserializationComplete() { | 5706 void Heap::NotifyDeserializationComplete() { |
5701 deserialization_complete_ = true; | 5707 deserialization_complete_ = true; |
5702 #ifdef DEBUG | 5708 #ifdef DEBUG |
5703 // All pages right after bootstrapping must be marked as never-evacuate. | 5709 // All pages right after bootstrapping must be marked as never-evacuate. |
5704 PagedSpaces spaces(this); | 5710 PagedSpaces spaces(this); |
5705 for (PagedSpace* s = spaces.next(); s != NULL; s = spaces.next()) { | 5711 for (PagedSpace* s = spaces.next(); s != NULL; s = spaces.next()) { |
5706 PageIterator it(s); | 5712 PageIterator it(s); |
5707 while (it.has_next()) CHECK(it.next()->NeverEvacuate()); | 5713 while (it.has_next()) CHECK(it.next()->NeverEvacuate()); |
5708 } | 5714 } |
5709 #endif // DEBUG | 5715 #endif // DEBUG |
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6737 *object_type = "CODE_TYPE"; \ | 6743 *object_type = "CODE_TYPE"; \ |
6738 *object_sub_type = "CODE_AGE/" #name; \ | 6744 *object_sub_type = "CODE_AGE/" #name; \ |
6739 return true; | 6745 return true; |
6740 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6746 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
6741 #undef COMPARE_AND_RETURN_NAME | 6747 #undef COMPARE_AND_RETURN_NAME |
6742 } | 6748 } |
6743 return false; | 6749 return false; |
6744 } | 6750 } |
6745 } // namespace internal | 6751 } // namespace internal |
6746 } // namespace v8 | 6752 } // namespace v8 |
OLD | NEW |