Index: src/heap/object-stats.cc |
diff --git a/src/heap/object-stats.cc b/src/heap/object-stats.cc |
index 743c46411b43f9353ea20988b88c15ef409150e9..271d1783548c95c371bdcd78a5b0178eebf4dff1 100644 |
--- a/src/heap/object-stats.cc |
+++ b/src/heap/object-stats.cc |
@@ -170,6 +170,9 @@ void ObjectStatsCollector::CollectStatistics(HeapObject* obj) { |
// Record specific sub types where possible. |
if (obj->IsMap()) RecordMapDetails(Map::cast(obj)); |
+ if (obj->IsBytecodeArray()) { |
+ RecordBytecodeArrayDetails(BytecodeArray::cast(obj)); |
+ } |
if (obj->IsCode()) RecordCodeDetails(Code::cast(obj)); |
if (obj->IsSharedFunctionInfo()) { |
RecordSharedFunctionInfoDetails(SharedFunctionInfo::cast(obj)); |
@@ -384,6 +387,13 @@ void ObjectStatsCollector::RecordMapDetails(Map* map_obj) { |
} |
} |
+void ObjectStatsCollector::RecordBytecodeArrayDetails(BytecodeArray* obj) { |
+ RecordFixedArrayHelper(obj, obj->constant_pool(), |
+ BYTECODE_ARRAY_CONSTANT_POOL_SUB_TYPE, 0); |
+ RecordFixedArrayHelper(obj, obj->handler_table(), |
+ BYTECODE_ARRAY_HANDLER_TABLE_SUB_TYPE, 0); |
+} |
+ |
void ObjectStatsCollector::RecordCodeDetails(Code* code) { |
stats_->RecordCodeSubTypeStats(code->kind(), code->GetAge(), code->Size()); |
RecordFixedArrayHelper(code, code->deoptimization_data(), |