OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/heap-snapshot-generator-inl.h" | 7 #include "src/heap-snapshot-generator-inl.h" |
8 | 8 |
9 #include "src/allocation-tracker.h" | 9 #include "src/allocation-tracker.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2510 | 2510 |
2511 void NativeObjectsExplorer::SetRootNativeRootsReference() { | 2511 void NativeObjectsExplorer::SetRootNativeRootsReference() { |
2512 for (HashMap::Entry* entry = native_groups_.Start(); | 2512 for (HashMap::Entry* entry = native_groups_.Start(); |
2513 entry; | 2513 entry; |
2514 entry = native_groups_.Next(entry)) { | 2514 entry = native_groups_.Next(entry)) { |
2515 NativeGroupRetainedObjectInfo* group_info = | 2515 NativeGroupRetainedObjectInfo* group_info = |
2516 static_cast<NativeGroupRetainedObjectInfo*>(entry->value); | 2516 static_cast<NativeGroupRetainedObjectInfo*>(entry->value); |
2517 HeapEntry* group_entry = | 2517 HeapEntry* group_entry = |
2518 filler_->FindOrAddEntry(group_info, native_entries_allocator_); | 2518 filler_->FindOrAddEntry(group_info, native_entries_allocator_); |
2519 DCHECK(group_entry != NULL); | 2519 DCHECK(group_entry != NULL); |
2520 filler_->SetIndexedAutoIndexReference( | 2520 filler_->SetNamedAutoIndexReference( |
2521 HeapGraphEdge::kElement, | 2521 HeapGraphEdge::kShortcut, snapshot_->root()->index(), group_entry); |
2522 snapshot_->root()->index(), | |
2523 group_entry); | |
2524 } | 2522 } |
2525 } | 2523 } |
2526 | 2524 |
2527 | 2525 |
2528 void NativeObjectsExplorer::VisitSubtreeWrapper(Object** p, uint16_t class_id) { | 2526 void NativeObjectsExplorer::VisitSubtreeWrapper(Object** p, uint16_t class_id) { |
2529 if (in_groups_.Contains(*p)) return; | 2527 if (in_groups_.Contains(*p)) return; |
2530 Isolate* isolate = isolate_; | 2528 Isolate* isolate = isolate_; |
2531 v8::RetainedObjectInfo* info = | 2529 v8::RetainedObjectInfo* info = |
2532 isolate->heap_profiler()->ExecuteWrapperClassCallback(class_id, p); | 2530 isolate->heap_profiler()->ExecuteWrapperClassCallback(class_id, p); |
2533 if (info == NULL) return; | 2531 if (info == NULL) return; |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3140 writer_->AddString("\"<dummy>\""); | 3138 writer_->AddString("\"<dummy>\""); |
3141 for (int i = 1; i < sorted_strings.length(); ++i) { | 3139 for (int i = 1; i < sorted_strings.length(); ++i) { |
3142 writer_->AddCharacter(','); | 3140 writer_->AddCharacter(','); |
3143 SerializeString(sorted_strings[i]); | 3141 SerializeString(sorted_strings[i]); |
3144 if (writer_->aborted()) return; | 3142 if (writer_->aborted()) return; |
3145 } | 3143 } |
3146 } | 3144 } |
3147 | 3145 |
3148 | 3146 |
3149 } } // namespace v8::internal | 3147 } } // namespace v8::internal |
OLD | NEW |