Commit a0b2ccea authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[object-stats] Track RelocInfo and SourcePositionTable

Change-Id: I98c03061600c1a58e1fde5936c78a877508c2fb4
Reviewed-on: https://chromium-review.googlesource.com/1101695Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53750}
parent 0948319a
...@@ -885,6 +885,20 @@ void ObjectStatsCollectorImpl::RecordVirtualCodeDetails(Code* code) { ...@@ -885,6 +885,20 @@ void ObjectStatsCollectorImpl::RecordVirtualCodeDetails(Code* code) {
CodeKindToVirtualInstanceType(code->kind())); CodeKindToVirtualInstanceType(code->kind()));
RecordSimpleVirtualObjectStats(code, code->deoptimization_data(), RecordSimpleVirtualObjectStats(code, code->deoptimization_data(),
ObjectStats::DEOPTIMIZATION_DATA_TYPE); ObjectStats::DEOPTIMIZATION_DATA_TYPE);
RecordSimpleVirtualObjectStats(code, code->relocation_info(),
ObjectStats::RELOC_INFO_TYPE);
Object* source_position_table = code->source_position_table();
if (source_position_table->IsSourcePositionTableWithFrameCache()) {
RecordSimpleVirtualObjectStats(
code,
SourcePositionTableWithFrameCache::cast(source_position_table)
->source_position_table(),
ObjectStats::SOURCE_POSITION_TABLE_TYPE);
} else if (source_position_table->IsHeapObject()) {
RecordSimpleVirtualObjectStats(code,
HeapObject::cast(source_position_table),
ObjectStats::SOURCE_POSITION_TABLE_TYPE);
}
if (code->kind() == Code::Kind::OPTIMIZED_FUNCTION) { if (code->kind() == Code::Kind::OPTIMIZED_FUNCTION) {
DeoptimizationData* input_data = DeoptimizationData* input_data =
DeoptimizationData::cast(code->deoptimization_data()); DeoptimizationData::cast(code->deoptimization_data());
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
V(OTHER_CONTEXT_TYPE) \ V(OTHER_CONTEXT_TYPE) \
V(PROTOTYPE_USERS_TYPE) \ V(PROTOTYPE_USERS_TYPE) \
V(REGEXP_MULTIPLE_CACHE_TYPE) \ V(REGEXP_MULTIPLE_CACHE_TYPE) \
V(RELOC_INFO_TYPE) \
V(RETAINED_MAPS_TYPE) \ V(RETAINED_MAPS_TYPE) \
V(SCRIPT_LIST_TYPE) \ V(SCRIPT_LIST_TYPE) \
V(SCRIPT_SHARED_FUNCTION_INFOS_TYPE) \ V(SCRIPT_SHARED_FUNCTION_INFOS_TYPE) \
...@@ -62,6 +63,7 @@ ...@@ -62,6 +63,7 @@
V(SINGLE_CHARACTER_STRING_CACHE_TYPE) \ V(SINGLE_CHARACTER_STRING_CACHE_TYPE) \
V(STRING_SPLIT_CACHE_TYPE) \ V(STRING_SPLIT_CACHE_TYPE) \
V(STRING_TABLE_TYPE) \ V(STRING_TABLE_TYPE) \
V(SOURCE_POSITION_TABLE_TYPE) \
V(UNCOMPILED_JS_FUNCTION_TYPE) \ V(UNCOMPILED_JS_FUNCTION_TYPE) \
V(UNCOMPILED_SHARED_FUNCTION_INFO_TYPE) \ V(UNCOMPILED_SHARED_FUNCTION_INFO_TYPE) \
V(WEAK_NEW_SPACE_OBJECT_TO_CODE_TYPE) V(WEAK_NEW_SPACE_OBJECT_TO_CODE_TYPE)
......
...@@ -165,10 +165,12 @@ const CATEGORIES = new Map([ ...@@ -165,10 +165,12 @@ const CATEGORIES = new Map([
'LOAD_HANDLER_TYPE', 'LOAD_HANDLER_TYPE',
'NOSCRIPT_SHARED_FUNCTION_INFOS_TYPE', 'NOSCRIPT_SHARED_FUNCTION_INFOS_TYPE',
'OPTIMIZED_CODE_LITERALS_TYPE', 'OPTIMIZED_CODE_LITERALS_TYPE',
'RELOC_INFO_TYPE',
'SCRIPT_SOURCE_EXTERNAL_TYPE', 'SCRIPT_SOURCE_EXTERNAL_TYPE',
'SCRIPT_SOURCE_NON_EXTERNAL_TYPE', 'SCRIPT_SOURCE_NON_EXTERNAL_TYPE',
'SCRIPT_TYPE', 'SCRIPT_TYPE',
'SHARED_FUNCTION_INFO_TYPE', 'SHARED_FUNCTION_INFO_TYPE',
'SOURCE_POSITION_TABLE_TYPE',
'STORE_HANDLER_TYPE', 'STORE_HANDLER_TYPE',
'UNCOMPILED_JS_FUNCTION_TYPE', 'UNCOMPILED_JS_FUNCTION_TYPE',
'UNCOMPILED_SHARED_FUNCTION_INFO_TYPE', 'UNCOMPILED_SHARED_FUNCTION_INFO_TYPE',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment