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

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

Issue 2203573004: Do not mark prototype transitions as weak container in heap snapshot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months 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
« 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/profiler/heap-snapshot-generator.h" 5 #include "src/profiler/heap-snapshot-generator.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/conversions.h" 8 #include "src/conversions.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/objects-body-descriptors.h" 10 #include "src/objects-body-descriptors.h"
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 } 1260 }
1261 } 1261 }
1262 1262
1263 1263
1264 void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) { 1264 void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
1265 Object* raw_transitions_or_prototype_info = map->raw_transitions(); 1265 Object* raw_transitions_or_prototype_info = map->raw_transitions();
1266 if (TransitionArray::IsFullTransitionArray( 1266 if (TransitionArray::IsFullTransitionArray(
1267 raw_transitions_or_prototype_info)) { 1267 raw_transitions_or_prototype_info)) {
1268 TransitionArray* transitions = 1268 TransitionArray* transitions =
1269 TransitionArray::cast(raw_transitions_or_prototype_info); 1269 TransitionArray::cast(raw_transitions_or_prototype_info);
1270 int transitions_entry = GetEntry(transitions)->index(); 1270 if (map->CanTransition() && transitions->HasPrototypeTransitions()) {
1271 1271 TagObject(transitions->GetPrototypeTransitions(),
1272 if (map->CanTransition()) { 1272 "(prototype transitions)");
1273 if (transitions->HasPrototypeTransitions()) {
1274 FixedArray* prototype_transitions =
1275 transitions->GetPrototypeTransitions();
1276 MarkAsWeakContainer(prototype_transitions);
1277 TagObject(prototype_transitions, "(prototype transitions");
1278 SetInternalReference(transitions, transitions_entry,
1279 "prototype_transitions", prototype_transitions);
1280 }
1281 // TODO(alph): transitions keys are strong links.
1282 MarkAsWeakContainer(transitions);
1283 } 1273 }
1284 1274
1285 TagObject(transitions, "(transition array)"); 1275 TagObject(transitions, "(transition array)");
1286 SetInternalReference(map, entry, "transitions", transitions, 1276 SetInternalReference(map, entry, "transitions", transitions,
1287 Map::kTransitionsOrPrototypeInfoOffset); 1277 Map::kTransitionsOrPrototypeInfoOffset);
1288 } else if (TransitionArray::IsSimpleTransition( 1278 } else if (TransitionArray::IsSimpleTransition(
1289 raw_transitions_or_prototype_info)) { 1279 raw_transitions_or_prototype_info)) {
1290 TagObject(raw_transitions_or_prototype_info, "(transition)"); 1280 TagObject(raw_transitions_or_prototype_info, "(transition)");
1291 SetInternalReference(map, entry, "transition", 1281 SetInternalReference(map, entry, "transition",
1292 raw_transitions_or_prototype_info, 1282 raw_transitions_or_prototype_info,
(...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after
3127 for (int i = 1; i < sorted_strings.length(); ++i) { 3117 for (int i = 1; i < sorted_strings.length(); ++i) {
3128 writer_->AddCharacter(','); 3118 writer_->AddCharacter(',');
3129 SerializeString(sorted_strings[i]); 3119 SerializeString(sorted_strings[i]);
3130 if (writer_->aborted()) return; 3120 if (writer_->aborted()) return;
3131 } 3121 }
3132 } 3122 }
3133 3123
3134 3124
3135 } // namespace internal 3125 } // namespace internal
3136 } // namespace v8 3126 } // namespace v8
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