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

Unified Diff: src/profile-generator.cc

Issue 9323064: I'd like to introduce kSynthetic type of nodes for Heap Profiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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
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")

Powered by Google App Engine
This is Rietveld 408576698