Index: src/profile-generator.cc |
diff --git a/src/profile-generator.cc b/src/profile-generator.cc |
index 61d7e80cde5af585aa33872854a53209455cbad1..02b9408cff3d326e4ce9f377d59b088cf246a804 100644 |
--- a/src/profile-generator.cc |
+++ b/src/profile-generator.cc |
@@ -1131,6 +1131,7 @@ const char* HeapEntry::TypeAsString() { |
case kRegExp: return "/regexp/"; |
case kHeapNumber: return "/number/"; |
case kNative: return "/native/"; |
+ case kArtificial: return "/artificial/"; |
default: return "???"; |
} |
} |
@@ -2738,7 +2739,7 @@ HeapEntry* NativeObjectsExplorer::AllocateEntry( |
intptr_t elements = info->GetElementCount(); |
intptr_t size = info->GetSizeInBytes(); |
return snapshot_->AddEntry( |
- HeapEntry::kNative, |
+ static_cast<HeapEntry::Type>(info->GetType()), |
elements != -1 ? |
collection_->names()->GetFormatted( |
"%s / %" V8_PTR_PREFIX "d entries", |
@@ -2862,6 +2863,9 @@ class NativeGroupRetainedObjectInfo : public v8::RetainedObjectInfo { |
} |
virtual intptr_t GetHash() { return hash_; } |
virtual const char* GetLabel() { return label_; } |
+ virtual HeapGraphNode::Type GetType() const { |
+ return HeapGraphNode::kArtificial; |
+ } |
private: |
bool disposed_; |
@@ -3547,7 +3551,8 @@ void HeapSnapshotJSONSerializer::SerializeNodes() { |
"," JSON_S("closure") |
"," JSON_S("regexp") |
"," JSON_S("number") |
- "," JSON_S("native")) |
+ "," JSON_S("native") |
+ "," JSON_S("artificial")) |
"," JSON_S("string") |
"," JSON_S("number") |
"," JSON_S("number") |