Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index c06bfd7f7323825d4c0f278c04e39260eaf3cc4f..ccdfacc46c483ce33e749658782f543dc06b0652 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -1631,11 +1631,18 @@ class MarkCompactMarkingVisitor::ObjectStatsTracker< |
TRANSITION_ARRAY_SUB_TYPE, |
fixed_array_size); |
} |
- if (map_obj->code_cache() != heap->empty_fixed_array()) { |
+ if (map_obj->has_code_cache()) { |
+ CodeCache* cache = CodeCache::cast(map_obj->code_cache()); |
heap->RecordObjectStats( |
FIXED_ARRAY_TYPE, |
MAP_CODE_CACHE_SUB_TYPE, |
- FixedArray::cast(map_obj->code_cache())->Size()); |
+ cache->default_cache()->Size()); |
+ if (!cache->normal_type_cache()->IsUndefined()) { |
+ heap->RecordObjectStats( |
+ FIXED_ARRAY_TYPE, |
+ MAP_CODE_CACHE_SUB_TYPE, |
+ FixedArray::cast(cache->normal_type_cache())->Size()); |
+ } |
} |
ObjectStatsVisitBase(kVisitMap, map, obj); |
} |