Index: src/heap-snapshot-generator.cc |
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc |
index 6a5bb63a0ea2a50e5ee737a31bd52ddd9b116db3..99c20404f00b5418f5d53ccda30f0d52dde0fc47 100644 |
--- a/src/heap-snapshot-generator.cc |
+++ b/src/heap-snapshot-generator.cc |
@@ -175,6 +175,8 @@ const char* HeapEntry::TypeAsString() { |
case kHeapNumber: return "/number/"; |
case kNative: return "/native/"; |
case kSynthetic: return "/synthetic/"; |
+ case kConsString: return "/concatenated string/"; |
+ case kSlicedString: return "/sliced string/"; |
default: return "???"; |
} |
} |
@@ -782,6 +784,15 @@ HeapEntry* V8HeapExplorer::AddEntry(HeapObject* object) { |
} |
return AddEntry(object, HeapEntry::kObject, name); |
} else if (object->IsString()) { |
+ String* string = String::cast(object); |
+ if (string->IsConsString()) |
+ return AddEntry(object, |
+ HeapEntry::kConsString, |
+ "(concatenated string)"); |
+ if (string->IsSlicedString()) |
+ return AddEntry(object, |
+ HeapEntry::kSlicedString, |
+ "(sliced string)"); |
return AddEntry(object, |
HeapEntry::kString, |
collection_->names()->GetName(String::cast(object))); |
@@ -2585,7 +2596,9 @@ void HeapSnapshotJSONSerializer::SerializeSnapshot() { |
JSON_S("regexp") "," |
JSON_S("number") "," |
JSON_S("native") "," |
- JSON_S("synthetic")) "," |
+ JSON_S("synthetic") "," |
+ JSON_S("concatenated string") "," |
+ JSON_S("sliced string")) "," |
JSON_S("string") "," |
JSON_S("number") "," |
JSON_S("number") "," |