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

Side by Side Diff: src/heap-snapshot-generator.cc

Issue 681743002: Make all references from root shortcuts (except one to GC roots) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ran git cl format Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« 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