Reviewers: yurys, loislo, rossberg,
Message:
ptal
Description:
Add Box object to heap profiler.
LOG=Y
Please review this at https://codereview.chromium.org/143343006/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+8, -0 lines):
M src/heap-snapshot-generator.h
M src/heap-snapshot-generator.cc
Index: src/heap-snapshot-generator.cc
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc
index
bae1baed29ec072902f7601f289ca8e575b1f3d5..8d6337c0dc8682b6449549184bc2b57f0f1052bb
100644
--- a/src/heap-snapshot-generator.cc
+++ b/src/heap-snapshot-generator.cc
@@ -1046,6 +1046,8 @@ void V8HeapExplorer::ExtractReferences(HeapObject*
obj) {
ExtractCodeCacheReferences(entry, CodeCache::cast(obj));
} else if (obj->IsCode()) {
ExtractCodeReferences(entry, Code::cast(obj));
+ } else if (obj->IsBox()) {
+ ExtractBoxReferences(entry, Box::cast(obj));
} else if (obj->IsCell()) {
ExtractCellReferences(entry, Cell::cast(obj));
} else if (obj->IsPropertyCell()) {
@@ -1406,6 +1408,11 @@ void V8HeapExplorer::ExtractCodeReferences(int
entry, Code* code) {
}
+void V8HeapExplorer::ExtractBoxReferences(int entry, Box* box) {
+ SetInternalReference(box, entry, "value", box->value(),
Box::kValueOffset);
+}
+
+
void V8HeapExplorer::ExtractCellReferences(int entry, Cell* cell) {
SetInternalReference(cell, entry, "value", cell->value(),
Cell::kValueOffset);
}
Index: src/heap-snapshot-generator.h
diff --git a/src/heap-snapshot-generator.h b/src/heap-snapshot-generator.h
index
59d324e499cf8daeabc404a6f05f501a28397d0e..de5886284fcf57bfb83862a3c2e5b04daebe572f
100644
--- a/src/heap-snapshot-generator.h
+++ b/src/heap-snapshot-generator.h
@@ -410,6 +410,7 @@ class V8HeapExplorer : public HeapEntriesAllocator {
void ExtractAccessorPairReferences(int entry, AccessorPair* accessors);
void ExtractCodeCacheReferences(int entry, CodeCache* code_cache);
void ExtractCodeReferences(int entry, Code* code);
+ void ExtractBoxReferences(int entry, Box* box);
void ExtractCellReferences(int entry, Cell* cell);
void ExtractPropertyCellReferences(int entry, PropertyCell* cell);
void ExtractAllocationSiteReferences(int entry, AllocationSite* site);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.