OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/object-stats.h" | 5 #include "src/heap/object-stats.h" |
6 | 6 |
7 #include "src/compilation-cache.h" | 7 #include "src/compilation-cache.h" |
8 #include "src/counters.h" | 8 #include "src/counters.h" |
9 #include "src/heap/heap-inl.h" | 9 #include "src/heap/heap-inl.h" |
10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 NOSCRIPT_SHARED_FUNCTION_INFOS_SUB_TYPE, 0); | 239 NOSCRIPT_SHARED_FUNCTION_INFOS_SUB_TYPE, 0); |
240 RecordFixedArrayHelper(nullptr, WeakFixedArray::cast(heap_->script_list()), | 240 RecordFixedArrayHelper(nullptr, WeakFixedArray::cast(heap_->script_list()), |
241 SCRIPT_LIST_SUB_TYPE, 0); | 241 SCRIPT_LIST_SUB_TYPE, 0); |
242 | 242 |
243 // Global hash tables. | 243 // Global hash tables. |
244 RecordHashTableHelper(nullptr, heap_->string_table(), STRING_TABLE_SUB_TYPE); | 244 RecordHashTableHelper(nullptr, heap_->string_table(), STRING_TABLE_SUB_TYPE); |
245 RecordHashTableHelper(nullptr, heap_->weak_object_to_code_table(), | 245 RecordHashTableHelper(nullptr, heap_->weak_object_to_code_table(), |
246 OBJECT_TO_CODE_SUB_TYPE); | 246 OBJECT_TO_CODE_SUB_TYPE); |
247 RecordHashTableHelper(nullptr, heap_->code_stubs(), | 247 RecordHashTableHelper(nullptr, heap_->code_stubs(), |
248 CODE_STUBS_TABLE_SUB_TYPE); | 248 CODE_STUBS_TABLE_SUB_TYPE); |
249 RecordHashTableHelper(nullptr, heap_->intrinsic_function_names(), | |
250 INTRINSIC_FUNCTION_NAMES_SUB_TYPE); | |
251 RecordHashTableHelper(nullptr, heap_->empty_properties_dictionary(), | 249 RecordHashTableHelper(nullptr, heap_->empty_properties_dictionary(), |
252 EMPTY_PROPERTIES_DICTIONARY_SUB_TYPE); | 250 EMPTY_PROPERTIES_DICTIONARY_SUB_TYPE); |
253 CompilationCache* compilation_cache = heap_->isolate()->compilation_cache(); | 251 CompilationCache* compilation_cache = heap_->isolate()->compilation_cache(); |
254 CompilationCacheTableVisitor v(this); | 252 CompilationCacheTableVisitor v(this); |
255 compilation_cache->Iterate(&v); | 253 compilation_cache->Iterate(&v); |
256 } | 254 } |
257 | 255 |
258 static bool CanRecordFixedArray(Heap* heap, FixedArrayBase* array) { | 256 static bool CanRecordFixedArray(Heap* heap, FixedArrayBase* array) { |
259 return array->map()->instance_type() == FIXED_ARRAY_TYPE && | 257 return array->map()->instance_type() == FIXED_ARRAY_TYPE && |
260 array->map() != heap->fixed_double_array_map() && | 258 array->map() != heap->fixed_double_array_map() && |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 SLOW_TEMPLATE_INSTANTIATIONS_CACHE_SUB_TYPE); | 531 SLOW_TEMPLATE_INSTANTIATIONS_CACHE_SUB_TYPE); |
534 FixedArray* fast_cache = native_ctx->fast_template_instantiations_cache(); | 532 FixedArray* fast_cache = native_ctx->fast_template_instantiations_cache(); |
535 stats_->RecordFixedArraySubTypeStats( | 533 stats_->RecordFixedArraySubTypeStats( |
536 fast_cache, FAST_TEMPLATE_INSTANTIATIONS_CACHE_SUB_TYPE, | 534 fast_cache, FAST_TEMPLATE_INSTANTIATIONS_CACHE_SUB_TYPE, |
537 fast_cache->Size(), 0); | 535 fast_cache->Size(), 0); |
538 } | 536 } |
539 } | 537 } |
540 | 538 |
541 } // namespace internal | 539 } // namespace internal |
542 } // namespace v8 | 540 } // namespace v8 |
OLD | NEW |