Set object tags directly to the entry name in heap profiler.
Review URL: https://chromiumcodereview.appspot.com/10382106 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
818aba70b2
commit
7bf37bc6c6
@ -1710,8 +1710,7 @@ HeapEntry* V8HeapExplorer::AddEntry(HeapObject* object) {
|
||||
object->IsFixedDoubleArray() ||
|
||||
object->IsByteArray() ||
|
||||
object->IsExternalArray()) {
|
||||
const char* tag = objects_tags_.GetTag(object);
|
||||
return AddEntry(object, HeapEntry::kArray, tag != NULL ? tag : "");
|
||||
return AddEntry(object, HeapEntry::kArray, "");
|
||||
} else if (object->IsHeapNumber()) {
|
||||
return AddEntry(object, HeapEntry::kHeapNumber, "number");
|
||||
}
|
||||
@ -2635,7 +2634,10 @@ const char* V8HeapExplorer::GetStrongGcSubrootName(Object* object) {
|
||||
|
||||
void V8HeapExplorer::TagObject(Object* obj, const char* tag) {
|
||||
if (IsEssentialObject(obj)) {
|
||||
objects_tags_.SetTag(obj, tag);
|
||||
HeapEntry* entry = GetEntry(obj);
|
||||
if (entry->name()[0] == '\0') {
|
||||
entry->set_name(tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -526,6 +526,7 @@ class HeapEntry BASE_EMBEDDED {
|
||||
HeapSnapshot* snapshot() { return snapshot_; }
|
||||
Type type() { return static_cast<Type>(type_); }
|
||||
const char* name() { return name_; }
|
||||
void set_name(const char* name) { name_ = name; }
|
||||
inline SnapshotObjectId id() { return id_; }
|
||||
int self_size() { return self_size_; }
|
||||
int retained_size() { return retained_size_; }
|
||||
|
Loading…
Reference in New Issue
Block a user