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

Unified Diff: src/profile-generator.cc

Issue 10166007: Add names to GlobalObject inline properties in heap snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index f722795f4857d73e75616f02d4929abf4b8e3e03..94317c7d9cbd6e139844cdf2579847d95c60c2c1 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -2037,6 +2037,17 @@ void V8HeapExplorer::ExtractReferences(HeapObject* obj) {
i += kPointerSize) {
SetWeakReference(js_fun, entry, i, *HeapObject::RawField(js_fun, i), i);
}
+ } else if (obj->IsGlobalObject()) {
+ GlobalObject* global_obj = GlobalObject::cast(obj);
+ SetInternalReference(global_obj, entry,
+ "builtins", global_obj->builtins(),
+ GlobalObject::kBuiltinsOffset);
+ SetInternalReference(global_obj, entry,
+ "global_context", global_obj->global_context(),
+ GlobalObject::kGlobalContextOffset);
+ SetInternalReference(global_obj, entry,
yurys 2012/04/23 05:36:18 Is it possible to merge such objects into the glob
alexeif 2012/04/23 15:23:43 Could you please elaborate?
yurys 2012/04/24 08:38:50 I meant that it may be hard to explain to the user
+ "global_receiver", global_obj->global_receiver(),
+ GlobalObject::kGlobalReceiverOffset);
}
TagObject(js_obj->properties(), "(object properties)");
SetInternalReference(obj, entry,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698