Commit eafc8c97 authored by alph@chromium.org's avatar alph@chromium.org

Provide named links to code objects in heap snapshot.

R=loislo@chromium.org, verwaest@chromium.org, yurys@chromium.org

Review URL: https://codereview.chromium.org/19397002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 871dacd4
......@@ -7556,6 +7556,7 @@ Handle<Value> HeapGraphEdge::GetName() const {
isolate->factory()->InternalizeUtf8String(edge->name()));
case i::HeapGraphEdge::kElement:
case i::HeapGraphEdge::kHidden:
case i::HeapGraphEdge::kWeak:
return ToApiHandle<Number>(
isolate->factory()->NewNumberFromInt(edge->index()));
default: UNREACHABLE();
......
......@@ -894,6 +894,11 @@ class IndexedReferencesExtractor : public ObjectVisitor {
parent_(parent),
next_index_(1) {
}
void VisitCodeEntry(Address entry_address) {
Code* code = Code::cast(Code::GetObjectFromEntryAddress(entry_address));
generator_->SetInternalReference(parent_obj_, parent_, "code", code);
generator_->TagObject(code, "(code)");
}
void VisitPointers(Object** start, Object** end) {
for (Object** p = start; p < end; p++) {
if (CheckVisitedAndUnmark(p)) continue;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment