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

Unified Diff: src/heap-snapshot-generator.cc

Issue 19397002: Provide named links to code objects in heap snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add missing edge type to GetName API. Wondering how it worked before??? Created 7 years, 5 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
« no previous file with comments | « src/api.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-snapshot-generator.cc
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc
index 6d2d8912f1a3bd50b9cd6872b84b7a66a7210787..e3e2df0ed8fa6b94d4cef1283566bf1ffd950f73 100644
--- a/src/heap-snapshot-generator.cc
+++ b/src/heap-snapshot-generator.cc
@@ -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;
« no previous file with comments | « src/api.cc ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698