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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 map_space_(NULL), | 82 map_space_(NULL), |
83 lo_space_(NULL), | 83 lo_space_(NULL), |
84 gc_state_(NOT_IN_GC), | 84 gc_state_(NOT_IN_GC), |
85 gc_post_processing_depth_(0), | 85 gc_post_processing_depth_(0), |
86 allocations_count_(0), | 86 allocations_count_(0), |
87 raw_allocations_hash_(0), | 87 raw_allocations_hash_(0), |
88 dump_allocations_hash_countdown_(FLAG_dump_allocations_digest_at_alloc), | 88 dump_allocations_hash_countdown_(FLAG_dump_allocations_digest_at_alloc), |
89 ms_count_(0), | 89 ms_count_(0), |
90 gc_count_(0), | 90 gc_count_(0), |
91 remembered_unmapped_pages_index_(0), | 91 remembered_unmapped_pages_index_(0), |
92 unflattened_strings_length_(0), | |
93 #ifdef DEBUG | 92 #ifdef DEBUG |
94 allocation_timeout_(0), | 93 allocation_timeout_(0), |
95 #endif // DEBUG | 94 #endif // DEBUG |
96 old_generation_allocation_limit_(initial_old_generation_size_), | 95 old_generation_allocation_limit_(initial_old_generation_size_), |
97 old_gen_exhausted_(false), | 96 old_gen_exhausted_(false), |
98 optimize_for_memory_usage_(false), | 97 optimize_for_memory_usage_(false), |
99 inline_allocation_disabled_(false), | 98 inline_allocation_disabled_(false), |
100 store_buffer_rebuilder_(store_buffer()), | 99 store_buffer_rebuilder_(store_buffer()), |
101 hidden_string_(NULL), | 100 hidden_string_(NULL), |
102 total_regexp_code_generated_(0), | 101 total_regexp_code_generated_(0), |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 | 394 |
396 void Heap::IncrementDeferredCount(v8::Isolate::UseCounterFeature feature) { | 395 void Heap::IncrementDeferredCount(v8::Isolate::UseCounterFeature feature) { |
397 deferred_counters_[feature]++; | 396 deferred_counters_[feature]++; |
398 } | 397 } |
399 | 398 |
400 | 399 |
401 void Heap::GarbageCollectionPrologue() { | 400 void Heap::GarbageCollectionPrologue() { |
402 { | 401 { |
403 AllowHeapAllocation for_the_first_part_of_prologue; | 402 AllowHeapAllocation for_the_first_part_of_prologue; |
404 gc_count_++; | 403 gc_count_++; |
405 unflattened_strings_length_ = 0; | |
406 | 404 |
407 if (FLAG_flush_code) { | 405 if (FLAG_flush_code) { |
408 mark_compact_collector()->EnableCodeFlushing(true); | 406 mark_compact_collector()->EnableCodeFlushing(true); |
409 } | 407 } |
410 | 408 |
411 #ifdef VERIFY_HEAP | 409 #ifdef VERIFY_HEAP |
412 if (FLAG_verify_heap) { | 410 if (FLAG_verify_heap) { |
413 Verify(); | 411 Verify(); |
414 } | 412 } |
415 #endif | 413 #endif |
(...skipping 6487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6903 *object_type = "CODE_TYPE"; \ | 6901 *object_type = "CODE_TYPE"; \ |
6904 *object_sub_type = "CODE_AGE/" #name; \ | 6902 *object_sub_type = "CODE_AGE/" #name; \ |
6905 return true; | 6903 return true; |
6906 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6904 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
6907 #undef COMPARE_AND_RETURN_NAME | 6905 #undef COMPARE_AND_RETURN_NAME |
6908 } | 6906 } |
6909 return false; | 6907 return false; |
6910 } | 6908 } |
6911 } // namespace internal | 6909 } // namespace internal |
6912 } // namespace v8 | 6910 } // namespace v8 |
OLD | NEW |