| 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/counters.h" | 7 #include "src/counters.h" |
| 8 #include "src/heap/heap-inl.h" | 8 #include "src/heap/heap-inl.h" |
| 9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
| 10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 void ObjectStatsCollector::RecordFixedArrayDetails(FixedArray* array) { | 458 void ObjectStatsCollector::RecordFixedArrayDetails(FixedArray* array) { |
| 459 if (array->IsContext()) { | 459 if (array->IsContext()) { |
| 460 RecordFixedArrayHelper(nullptr, array, CONTEXT_SUB_TYPE, 0); | 460 RecordFixedArrayHelper(nullptr, array, CONTEXT_SUB_TYPE, 0); |
| 461 } | 461 } |
| 462 if (IsCowArray(heap_, array) && CanRecordFixedArray(heap_, array)) { | 462 if (IsCowArray(heap_, array) && CanRecordFixedArray(heap_, array)) { |
| 463 stats_->RecordFixedArraySubTypeStats(array, COPY_ON_WRITE_SUB_TYPE, | 463 stats_->RecordFixedArraySubTypeStats(array, COPY_ON_WRITE_SUB_TYPE, |
| 464 array->Size(), 0); | 464 array->Size(), 0); |
| 465 } | 465 } |
| 466 if (array->IsNativeContext()) { | 466 if (array->IsNativeContext()) { |
| 467 Context* native_ctx = Context::cast(array); | 467 Context* native_ctx = Context::cast(array); |
| 468 RecordHashTableHelper(array, native_ctx->template_instantiations_cache(), | 468 RecordHashTableHelper(array, |
| 469 TEMPLATE_INSTANTIATIONS_CACHE_SUB_TYPE); | 469 native_ctx->slow_template_instantiations_cache(), |
| 470 SLOW_TEMPLATE_INSTANTIATIONS_CACHE_SUB_TYPE); |
| 471 FixedArray* fast_cache = native_ctx->fast_template_instantiations_cache(); |
| 472 stats_->RecordFixedArraySubTypeStats( |
| 473 fast_cache, FAST_TEMPLATE_INSTANTIATIONS_CACHE_SUB_TYPE, |
| 474 fast_cache->Size(), 0); |
| 470 } | 475 } |
| 471 } | 476 } |
| 472 | 477 |
| 473 } // namespace internal | 478 } // namespace internal |
| 474 } // namespace v8 | 479 } // namespace v8 |
| OLD | NEW |