Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Unified Diff: src/heap/object-stats.cc

Issue 2190093002: [heap] ObjectStats: Record fixed arrays in BytecodeArray (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/object-stats.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(),
« no previous file with comments | « src/heap/object-stats.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698