Chromium Code Reviews| Index: src/profile-generator.cc |
| diff --git a/src/profile-generator.cc b/src/profile-generator.cc |
| index 5d03fe6461f722c6139ba3c1bbda04de4219d928..195c8ea94cc186a13b969441238462ff3d38cb25 100644 |
| --- a/src/profile-generator.cc |
| +++ b/src/profile-generator.cc |
| @@ -1996,6 +1996,9 @@ void V8HeapExplorer::ExtractReferences(HeapObject* obj) { |
| ExtractCodeCache(entry, CodeCache::cast(obj)); |
| } else if (obj->IsCode()) { |
| ExtractCode(entry, Code::cast(obj)); |
| + } else if (obj->IsJSGlobalPropertyCell()) { |
| + ExtractJSGlobalPropertyCell(entry, JSGlobalPropertyCell::cast(obj)); |
| + extract_indexed_refs = false; |
| } |
| if (extract_indexed_refs) { |
| SetInternalReference(obj, entry, "map", obj->map(), HeapObject::kMapOffset); |
| @@ -2093,10 +2096,9 @@ void V8HeapExplorer::ExtractJSObject(HeapEntry* entry, JSObject* js_obj) { |
| void V8HeapExplorer::ExtractString(HeapEntry* entry, String* string) { |
| if (string->IsConsString()) { |
| ConsString* cs = ConsString::cast(string); |
| - SetInternalReference(cs, entry, 1, cs->first()); |
| - SetInternalReference(cs, entry, 2, cs->second()); |
| - } |
| - if (string->IsSlicedString()) { |
| + SetInternalReference(cs, entry, "first", cs->first()); |
| + SetInternalReference(cs, entry, "second", cs->second()); |
| + } else if (string->IsSlicedString()) { |
| SlicedString* ss = SlicedString::cast(string); |
| SetInternalReference(ss, entry, "parent", ss->parent()); |
| } |
| @@ -2229,7 +2231,28 @@ void V8HeapExplorer::ExtractCodeCache(HeapEntry* entry, CodeCache* code_cache) { |
| void V8HeapExplorer::ExtractCode(HeapEntry* entry, Code* code) { |
| TagObject(code->unchecked_relocation_info(), "(code relocation info)"); |
|
yurys
2012/04/25 06:26:16
btw, why we use unchecked_* accessors in this meth
alexeif
2012/04/25 09:55:10
I don't know. Changed them to checked versions.
|
| + SetInternalReference(code, entry, |
| + "relocation_info", code->relocation_info(), |
| + Code::kRelocationInfoOffset); |
| + SetInternalReference(code, entry, |
| + "handler_table", code->handler_table(), |
| + Code::kHandlerTableOffset); |
| TagObject(code->unchecked_deoptimization_data(), "(code deopt data)"); |
| + SetInternalReference(code, entry, |
| + "deoptimization_data", code->deoptimization_data(), |
| + Code::kDeoptimizationDataOffset); |
| + SetInternalReference(code, entry, |
| + "type_feedback_info", code->type_feedback_info(), |
| + Code::kTypeFeedbackInfoOffset); |
| + SetInternalReference(code, entry, |
| + "gc_metadata", code->gc_metadata(), |
| + Code::kGCMetadataOffset); |
| +} |
| + |
| + |
| +void V8HeapExplorer::ExtractJSGlobalPropertyCell(HeapEntry* entry, |
| + JSGlobalPropertyCell* cell) { |
| + SetInternalReference(cell, entry, "value", cell->value()); |
| } |