| 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/assembler-inl.h" | 7 #include "src/assembler-inl.h" |
| 8 #include "src/compilation-cache.h" | 8 #include "src/compilation-cache.h" |
| 9 #include "src/counters.h" | 9 #include "src/counters.h" |
| 10 #include "src/heap/heap-inl.h" | 10 #include "src/heap/heap-inl.h" |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 if (array->HasEnumCache()) { | 455 if (array->HasEnumCache()) { |
| 456 RecordFixedArrayHelper(array, array->GetEnumCache(), ENUM_CACHE_SUB_TYPE, | 456 RecordFixedArrayHelper(array, array->GetEnumCache(), ENUM_CACHE_SUB_TYPE, |
| 457 0); | 457 0); |
| 458 } | 458 } |
| 459 if (array->HasEnumIndicesCache()) { | 459 if (array->HasEnumIndicesCache()) { |
| 460 RecordFixedArrayHelper(array, array->GetEnumIndicesCache(), | 460 RecordFixedArrayHelper(array, array->GetEnumIndicesCache(), |
| 461 ENUM_INDICES_CACHE_SUB_TYPE, 0); | 461 ENUM_INDICES_CACHE_SUB_TYPE, 0); |
| 462 } | 462 } |
| 463 } | 463 } |
| 464 | 464 |
| 465 if (map_obj->has_code_cache()) { | 465 FixedArray* code_cache = map_obj->code_cache(); |
| 466 FixedArray* code_cache = map_obj->code_cache(); | 466 if (code_cache->length() > 0) { |
| 467 if (code_cache->IsCodeCacheHashTable()) { | 467 if (code_cache->IsCodeCacheHashTable()) { |
| 468 RecordHashTableHelper(map_obj, CodeCacheHashTable::cast(code_cache), | 468 RecordHashTableHelper(map_obj, CodeCacheHashTable::cast(code_cache), |
| 469 MAP_CODE_CACHE_SUB_TYPE); | 469 MAP_CODE_CACHE_SUB_TYPE); |
| 470 } else { | 470 } else { |
| 471 RecordFixedArrayHelper(map_obj, code_cache, MAP_CODE_CACHE_SUB_TYPE, 0); | 471 RecordFixedArrayHelper(map_obj, code_cache, MAP_CODE_CACHE_SUB_TYPE, 0); |
| 472 } | 472 } |
| 473 } | 473 } |
| 474 | 474 |
| 475 for (DependentCode* cur_dependent_code = map_obj->dependent_code(); | 475 for (DependentCode* cur_dependent_code = map_obj->dependent_code(); |
| 476 cur_dependent_code != heap_->empty_fixed_array(); | 476 cur_dependent_code != heap_->empty_fixed_array(); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 SLOW_TEMPLATE_INSTANTIATIONS_CACHE_SUB_TYPE); | 572 SLOW_TEMPLATE_INSTANTIATIONS_CACHE_SUB_TYPE); |
| 573 FixedArray* fast_cache = native_ctx->fast_template_instantiations_cache(); | 573 FixedArray* fast_cache = native_ctx->fast_template_instantiations_cache(); |
| 574 stats_->RecordFixedArraySubTypeStats( | 574 stats_->RecordFixedArraySubTypeStats( |
| 575 fast_cache, FAST_TEMPLATE_INSTANTIATIONS_CACHE_SUB_TYPE, | 575 fast_cache, FAST_TEMPLATE_INSTANTIATIONS_CACHE_SUB_TYPE, |
| 576 fast_cache->Size(), 0); | 576 fast_cache->Size(), 0); |
| 577 } | 577 } |
| 578 } | 578 } |
| 579 | 579 |
| 580 } // namespace internal | 580 } // namespace internal |
| 581 } // namespace v8 | 581 } // namespace v8 |
| OLD | NEW |