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

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

Issue 2197393003: Do not mark dependent_code arrays as weak 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 | test/cctest/test-heap-profiler.cc » ('j') | 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 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 Object* constructor_or_backpointer = map->constructor_or_backpointer(); 1312 Object* constructor_or_backpointer = map->constructor_or_backpointer();
1313 if (constructor_or_backpointer->IsMap()) { 1313 if (constructor_or_backpointer->IsMap()) {
1314 TagObject(constructor_or_backpointer, "(back pointer)"); 1314 TagObject(constructor_or_backpointer, "(back pointer)");
1315 SetInternalReference(map, entry, "back_pointer", constructor_or_backpointer, 1315 SetInternalReference(map, entry, "back_pointer", constructor_or_backpointer,
1316 Map::kConstructorOrBackPointerOffset); 1316 Map::kConstructorOrBackPointerOffset);
1317 } else { 1317 } else {
1318 SetInternalReference(map, entry, "constructor", constructor_or_backpointer, 1318 SetInternalReference(map, entry, "constructor", constructor_or_backpointer,
1319 Map::kConstructorOrBackPointerOffset); 1319 Map::kConstructorOrBackPointerOffset);
1320 } 1320 }
1321 TagObject(map->dependent_code(), "(dependent code)"); 1321 TagObject(map->dependent_code(), "(dependent code)");
1322 MarkAsWeakContainer(map->dependent_code());
1323 SetInternalReference(map, entry, "dependent_code", map->dependent_code(), 1322 SetInternalReference(map, entry, "dependent_code", map->dependent_code(),
1324 Map::kDependentCodeOffset); 1323 Map::kDependentCodeOffset);
1325 TagObject(map->weak_cell_cache(), "(weak cell)"); 1324 TagObject(map->weak_cell_cache(), "(weak cell)");
1326 SetInternalReference(map, entry, "weak_cell_cache", map->weak_cell_cache(), 1325 SetInternalReference(map, entry, "weak_cell_cache", map->weak_cell_cache(),
1327 Map::kWeakCellCacheOffset); 1326 Map::kWeakCellCacheOffset);
1328 } 1327 }
1329 1328
1330 1329
1331 void V8HeapExplorer::ExtractSharedFunctionInfoReferences( 1330 void V8HeapExplorer::ExtractSharedFunctionInfoReferences(
1332 int entry, SharedFunctionInfo* shared) { 1331 int entry, SharedFunctionInfo* shared) {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 void V8HeapExplorer::ExtractWeakCellReferences(int entry, WeakCell* weak_cell) { 1487 void V8HeapExplorer::ExtractWeakCellReferences(int entry, WeakCell* weak_cell) {
1489 TagObject(weak_cell, "(weak cell)"); 1488 TagObject(weak_cell, "(weak cell)");
1490 SetWeakReference(weak_cell, entry, "value", weak_cell->value(), 1489 SetWeakReference(weak_cell, entry, "value", weak_cell->value(),
1491 WeakCell::kValueOffset); 1490 WeakCell::kValueOffset);
1492 } 1491 }
1493 1492
1494 void V8HeapExplorer::ExtractPropertyCellReferences(int entry, 1493 void V8HeapExplorer::ExtractPropertyCellReferences(int entry,
1495 PropertyCell* cell) { 1494 PropertyCell* cell) {
1496 SetInternalReference(cell, entry, "value", cell->value(), 1495 SetInternalReference(cell, entry, "value", cell->value(),
1497 PropertyCell::kValueOffset); 1496 PropertyCell::kValueOffset);
1498 MarkAsWeakContainer(cell->dependent_code()); 1497 TagObject(cell->dependent_code(), "(dependent code)");
1499 SetInternalReference(cell, entry, "dependent_code", cell->dependent_code(), 1498 SetInternalReference(cell, entry, "dependent_code", cell->dependent_code(),
1500 PropertyCell::kDependentCodeOffset); 1499 PropertyCell::kDependentCodeOffset);
1501 } 1500 }
1502 1501
1503 1502
1504 void V8HeapExplorer::ExtractAllocationSiteReferences(int entry, 1503 void V8HeapExplorer::ExtractAllocationSiteReferences(int entry,
1505 AllocationSite* site) { 1504 AllocationSite* site) {
1506 SetInternalReference(site, entry, "transition_info", site->transition_info(), 1505 SetInternalReference(site, entry, "transition_info", site->transition_info(),
1507 AllocationSite::kTransitionInfoOffset); 1506 AllocationSite::kTransitionInfoOffset);
1508 SetInternalReference(site, entry, "nested_site", site->nested_site(), 1507 SetInternalReference(site, entry, "nested_site", site->nested_site(),
1509 AllocationSite::kNestedSiteOffset); 1508 AllocationSite::kNestedSiteOffset);
1510 MarkAsWeakContainer(site->dependent_code()); 1509 TagObject(site->dependent_code(), "(dependent code)");
1511 SetInternalReference(site, entry, "dependent_code", site->dependent_code(), 1510 SetInternalReference(site, entry, "dependent_code", site->dependent_code(),
1512 AllocationSite::kDependentCodeOffset); 1511 AllocationSite::kDependentCodeOffset);
1513 // Do not visit weak_next as it is not visited by the StaticVisitor, 1512 // Do not visit weak_next as it is not visited by the StaticVisitor,
1514 // and we're not very interested in weak_next field here. 1513 // and we're not very interested in weak_next field here.
1515 STATIC_ASSERT(AllocationSite::kWeakNextOffset >= 1514 STATIC_ASSERT(AllocationSite::kWeakNextOffset >=
1516 AllocationSite::kPointerFieldsEndOffset); 1515 AllocationSite::kPointerFieldsEndOffset);
1517 } 1516 }
1518 1517
1519 1518
1520 class JSArrayBufferDataEntryAllocator : public HeapEntriesAllocator { 1519 class JSArrayBufferDataEntryAllocator : public HeapEntriesAllocator {
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
3128 for (int i = 1; i < sorted_strings.length(); ++i) { 3127 for (int i = 1; i < sorted_strings.length(); ++i) {
3129 writer_->AddCharacter(','); 3128 writer_->AddCharacter(',');
3130 SerializeString(sorted_strings[i]); 3129 SerializeString(sorted_strings[i]);
3131 if (writer_->aborted()) return; 3130 if (writer_->aborted()) return;
3132 } 3131 }
3133 } 3132 }
3134 3133
3135 3134
3136 } // namespace internal 3135 } // namespace internal
3137 } // namespace v8 3136 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698