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

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

Issue 639753007: Revert "Make all references from root shortcuts (except one to GC roots)" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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_->SetNamedAutoIndexReference( 2520 filler_->SetIndexedAutoIndexReference(
2521 HeapGraphEdge::kShortcut, snapshot_->root()->index(), group_entry); 2521 HeapGraphEdge::kElement,
2522 snapshot_->root()->index(),
2523 group_entry);
2522 } 2524 }
2523 } 2525 }
2524 2526
2525 2527
2526 void NativeObjectsExplorer::VisitSubtreeWrapper(Object** p, uint16_t class_id) { 2528 void NativeObjectsExplorer::VisitSubtreeWrapper(Object** p, uint16_t class_id) {
2527 if (in_groups_.Contains(*p)) return; 2529 if (in_groups_.Contains(*p)) return;
2528 Isolate* isolate = isolate_; 2530 Isolate* isolate = isolate_;
2529 v8::RetainedObjectInfo* info = 2531 v8::RetainedObjectInfo* info =
2530 isolate->heap_profiler()->ExecuteWrapperClassCallback(class_id, p); 2532 isolate->heap_profiler()->ExecuteWrapperClassCallback(class_id, p);
2531 if (info == NULL) return; 2533 if (info == NULL) return;
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
3138 writer_->AddString("\"<dummy>\""); 3140 writer_->AddString("\"<dummy>\"");
3139 for (int i = 1; i < sorted_strings.length(); ++i) { 3141 for (int i = 1; i < sorted_strings.length(); ++i) {
3140 writer_->AddCharacter(','); 3142 writer_->AddCharacter(',');
3141 SerializeString(sorted_strings[i]); 3143 SerializeString(sorted_strings[i]);
3142 if (writer_->aborted()) return; 3144 if (writer_->aborted()) return;
3143 } 3145 }
3144 } 3146 }
3145 3147
3146 3148
3147 } } // namespace v8::internal 3149 } } // 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