Commit 021f02b5 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[object-stats] Add virtual types

- JSObject: Record elements and properties
- JSCollecton: Record table
- Record global caches

Bug: v8:7266
Change-Id: I16b2eb511bed3dc0fb6f7af0e7037c6d42f03885
Reviewed-on: https://chromium-review.googlesource.com/878326
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50766}
parent 9f7fb728
This diff is collapsed.
...@@ -22,18 +22,27 @@ ...@@ -22,18 +22,27 @@
#define VIRTUAL_INSTANCE_TYPE_LIST(V) \ #define VIRTUAL_INSTANCE_TYPE_LIST(V) \
CODE_KIND_LIST(V) \ CODE_KIND_LIST(V) \
V(BOILERPLATE_ELEMENTS_TYPE) \ V(BOILERPLATE_ELEMENTS_TYPE) \
V(BOILERPLATE_NAME_DICTIONARY_TYPE) \
V(BOILERPLATE_PROPERTY_ARRAY_TYPE) \ V(BOILERPLATE_PROPERTY_ARRAY_TYPE) \
V(BOILERPLATE_PROPERTY_DICTIONARY_TYPE) \
V(BYTECODE_ARRAY_CONSTANT_POOL_TYPE) \ V(BYTECODE_ARRAY_CONSTANT_POOL_TYPE) \
V(BYTECODE_ARRAY_HANDLER_TABLE_TYPE) \ V(BYTECODE_ARRAY_HANDLER_TABLE_TYPE) \
V(CODE_STUBS_TABLE_TYPE) \
V(COW_ARRAY_TYPE) \
V(DEPENDENT_CODE_TYPE) \ V(DEPENDENT_CODE_TYPE) \
V(ELEMENTS_TYPE) \
V(ENUM_CACHE_TYPE) \ V(ENUM_CACHE_TYPE) \
V(ENUM_INDICES_CACHE_TYPE) \ V(ENUM_INDICES_CACHE_TYPE) \
V(FEEDBACK_VECTOR_ENTRY_TYPE) \ V(FEEDBACK_VECTOR_ENTRY_TYPE) \
V(GLOBAL_ELEMENTS_TYPE) \
V(GLOBAL_PROPERTIES_TYPE) \
V(JS_ARRAY_BOILERPLATE_TYPE) \ V(JS_ARRAY_BOILERPLATE_TYPE) \
V(JS_COLLETION_TABLE_TYPE) \
V(JS_OBJECT_BOILERPLATE_TYPE) \ V(JS_OBJECT_BOILERPLATE_TYPE) \
V(NOSCRIPT_SHARED_FUNCTION_INFOS_TYPE) \ V(NOSCRIPT_SHARED_FUNCTION_INFOS_TYPE) \
V(NUMBER_STRING_CACHE_TYPE) \ V(NUMBER_STRING_CACHE_TYPE) \
V(OBJECT_TO_CODE_TYPE) \
V(PROPERTY_ARRAY_TYPE) \
V(PROPERTY_DICTIONARY_TYPE) \
V(PROTOTYPE_USERS_TYPE) \ V(PROTOTYPE_USERS_TYPE) \
V(REGEXP_MULTIPLE_CACHE_TYPE) \ V(REGEXP_MULTIPLE_CACHE_TYPE) \
V(RETAINED_MAPS_TYPE) \ V(RETAINED_MAPS_TYPE) \
...@@ -41,6 +50,7 @@ ...@@ -41,6 +50,7 @@
V(SERIALIZED_OBJECTS_TYPE) \ V(SERIALIZED_OBJECTS_TYPE) \
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(WEAK_NEW_SPACE_OBJECT_TO_CODE_TYPE) V(WEAK_NEW_SPACE_OBJECT_TO_CODE_TYPE)
namespace v8 { namespace v8 {
......
...@@ -9,6 +9,7 @@ const CATEGORIES = new Map([ ...@@ -9,6 +9,7 @@ const CATEGORIES = new Map([
'CONS_ONE_BYTE_STRING_TYPE', 'CONS_ONE_BYTE_STRING_TYPE',
'CONS_STRING_TYPE', 'CONS_STRING_TYPE',
'DESCRIPTOR_ARRAY_TYPE', 'DESCRIPTOR_ARRAY_TYPE',
'ELEMENTS_TYPE',
'EXTERNAL_INTERNALIZED_STRING_TYPE', 'EXTERNAL_INTERNALIZED_STRING_TYPE',
'EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE', 'EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE',
'EXTERNAL_ONE_BYTE_STRING_TYPE', 'EXTERNAL_ONE_BYTE_STRING_TYPE',
...@@ -24,6 +25,8 @@ const CATEGORIES = new Map([ ...@@ -24,6 +25,8 @@ const CATEGORIES = new Map([
'FIXED_UINT32_ARRAY_TYPE', 'FIXED_UINT32_ARRAY_TYPE',
'FIXED_UINT8_ARRAY_TYPE', 'FIXED_UINT8_ARRAY_TYPE',
'FIXED_UINT8_CLAMPED_ARRAY_TYPE', 'FIXED_UINT8_CLAMPED_ARRAY_TYPE',
'GLOBAL_ELEMENTS_TYPE',
'GLOBAL_PROPERTIES_TYPE',
'HEAP_NUMBER_TYPE', 'HEAP_NUMBER_TYPE',
'INTERNALIZED_STRING_TYPE', 'INTERNALIZED_STRING_TYPE',
'JS_ARGUMENTS_TYPE', 'JS_ARGUMENTS_TYPE',
...@@ -50,6 +53,7 @@ const CATEGORIES = new Map([ ...@@ -50,6 +53,7 @@ const CATEGORIES = new Map([
'JS_PROMISE_TYPE', 'JS_PROMISE_TYPE',
'JS_REGEXP_TYPE', 'JS_REGEXP_TYPE',
'JS_SET_TYPE', 'JS_SET_TYPE',
'JS_SET_VALUE_ITERATOR_TYPE',
'JS_STRING_ITERATOR_TYPE', 'JS_STRING_ITERATOR_TYPE',
'JS_TYPED_ARRAY_TYPE', 'JS_TYPED_ARRAY_TYPE',
'JS_VALUE_TYPE', 'JS_VALUE_TYPE',
...@@ -58,6 +62,7 @@ const CATEGORIES = new Map([ ...@@ -58,6 +62,7 @@ const CATEGORIES = new Map([
'ONE_BYTE_INTERNALIZED_STRING_TYPE', 'ONE_BYTE_INTERNALIZED_STRING_TYPE',
'ONE_BYTE_STRING_TYPE', 'ONE_BYTE_STRING_TYPE',
'PROPERTY_ARRAY_TYPE', 'PROPERTY_ARRAY_TYPE',
'PROPERTY_DICTIONARY_TYPE',
'SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE', 'SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE',
'SHORT_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE', 'SHORT_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE',
'SHORT_EXTERNAL_ONE_BYTE_STRING_TYPE', 'SHORT_EXTERNAL_ONE_BYTE_STRING_TYPE',
...@@ -78,10 +83,11 @@ const CATEGORIES = new Map([ ...@@ -78,10 +83,11 @@ const CATEGORIES = new Map([
'ALLOCATION_MEMENTO_TYPE', 'ALLOCATION_MEMENTO_TYPE',
'ALLOCATION_SITE_TYPE', 'ALLOCATION_SITE_TYPE',
'BOILERPLATE_ELEMENTS_TYPE', 'BOILERPLATE_ELEMENTS_TYPE',
'BOILERPLATE_NAME_DICTIONARY_TYPE',
'BOILERPLATE_PROPERTY_ARRAY_TYPE', 'BOILERPLATE_PROPERTY_ARRAY_TYPE',
'BOILERPLATE_PROPERTY_DICTIONARY_TYPE',
'BYTE_ARRAY_TYPE', 'BYTE_ARRAY_TYPE',
'CELL_TYPE', 'CELL_TYPE',
'CODE_STUBS_TABLE_TYPE',
'CONTEXT_EXTENSION_TYPE', 'CONTEXT_EXTENSION_TYPE',
'ENUM_CACHE_TYPE', 'ENUM_CACHE_TYPE',
'ENUM_INDICES_CACHE_TYPE', 'ENUM_INDICES_CACHE_TYPE',
...@@ -93,16 +99,26 @@ const CATEGORIES = new Map([ ...@@ -93,16 +99,26 @@ const CATEGORIES = new Map([
'JS_OBJECT_BOILERPLATE_TYPE', 'JS_OBJECT_BOILERPLATE_TYPE',
'JS_SPECIAL_API_OBJECT_TYPE', 'JS_SPECIAL_API_OBJECT_TYPE',
'MAP_TYPE', 'MAP_TYPE',
'NUMBER_STRING_CACHE_TYPE',
'OBJECT_TEMPLATE_INFO_TYPE', 'OBJECT_TEMPLATE_INFO_TYPE',
'OBJECT_TO_CODE_TYPE',
'ODDBALL_TYPE', 'ODDBALL_TYPE',
'PROMISE_REACTION_JOB_INFO_TYPE', 'PROMISE_REACTION_JOB_INFO_TYPE',
'PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE', 'PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE',
'PROPERTY_CELL_TYPE', 'PROPERTY_CELL_TYPE',
'PROTOTYPE_INFO_TYPE', 'PROTOTYPE_INFO_TYPE',
'PROTOTYPE_USERS_TYPE', 'PROTOTYPE_USERS_TYPE',
'REGEXP_MULTIPLE_CACHE_TYPE',
'RETAINED_MAPS_TYPE',
'SCRIPT_LIST_TYPE',
'SERIALIZED_OBJECTS_TYPE',
'SINGLE_CHARACTER_STRING_CACHE_TYPE',
'STACK_FRAME_INFO_TYPE', 'STACK_FRAME_INFO_TYPE',
'STRING_SPLIT_CACHE_TYPE',
'STRING_TABLE_TYPE',
'TRANSITION_ARRAY_TYPE', 'TRANSITION_ARRAY_TYPE',
'WEAK_CELL_TYPE' 'WEAK_CELL_TYPE',
'WEAK_NEW_SPACE_OBJECT_TO_CODE_TYPE',
]) ])
], ],
[ [
...@@ -119,6 +135,7 @@ const CATEGORIES = new Map([ ...@@ -119,6 +135,7 @@ const CATEGORIES = new Map([
'FEEDBACK_VECTOR_ENTRY_TYPE', 'FEEDBACK_VECTOR_ENTRY_TYPE',
'FEEDBACK_VECTOR_TYPE', 'FEEDBACK_VECTOR_TYPE',
'LOAD_HANDLER_TYPE', 'LOAD_HANDLER_TYPE',
'NOSCRIPT_SHARED_FUNCTION_INFOS_TYPE',
'SCRIPT_TYPE', 'SCRIPT_TYPE',
'SHARED_FUNCTION_INFO_TYPE', 'SHARED_FUNCTION_INFO_TYPE',
'STORE_HANDLER_TYPE', 'STORE_HANDLER_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