| 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/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/profiler/allocation-tracker.h" | 11 #include "src/profiler/allocation-tracker.h" |
| 11 #include "src/profiler/heap-profiler.h" | 12 #include "src/profiler/heap-profiler.h" |
| 12 #include "src/profiler/heap-snapshot-generator-inl.h" | 13 #include "src/profiler/heap-snapshot-generator-inl.h" |
| 13 #include "src/types.h" | 14 #include "src/types.h" |
| 14 | 15 |
| 15 namespace v8 { | 16 namespace v8 { |
| 16 namespace internal { | 17 namespace internal { |
| 17 | 18 |
| 18 | 19 |
| 19 HeapGraphEdge::HeapGraphEdge(Type type, const char* name, int from, int to) | 20 HeapGraphEdge::HeapGraphEdge(Type type, const char* name, int from, int to) |
| (...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1535 SetInternalReference(site, entry, "transition_info", site->transition_info(), | 1536 SetInternalReference(site, entry, "transition_info", site->transition_info(), |
| 1536 AllocationSite::kTransitionInfoOffset); | 1537 AllocationSite::kTransitionInfoOffset); |
| 1537 SetInternalReference(site, entry, "nested_site", site->nested_site(), | 1538 SetInternalReference(site, entry, "nested_site", site->nested_site(), |
| 1538 AllocationSite::kNestedSiteOffset); | 1539 AllocationSite::kNestedSiteOffset); |
| 1539 MarkAsWeakContainer(site->dependent_code()); | 1540 MarkAsWeakContainer(site->dependent_code()); |
| 1540 SetInternalReference(site, entry, "dependent_code", site->dependent_code(), | 1541 SetInternalReference(site, entry, "dependent_code", site->dependent_code(), |
| 1541 AllocationSite::kDependentCodeOffset); | 1542 AllocationSite::kDependentCodeOffset); |
| 1542 // Do not visit weak_next as it is not visited by the StaticVisitor, | 1543 // Do not visit weak_next as it is not visited by the StaticVisitor, |
| 1543 // and we're not very interested in weak_next field here. | 1544 // and we're not very interested in weak_next field here. |
| 1544 STATIC_ASSERT(AllocationSite::kWeakNextOffset >= | 1545 STATIC_ASSERT(AllocationSite::kWeakNextOffset >= |
| 1545 AllocationSite::BodyDescriptor::kEndOffset); | 1546 AllocationSite::BodyDescriptor::kEndOffset); |
| 1546 } | 1547 } |
| 1547 | 1548 |
| 1548 | 1549 |
| 1549 class JSArrayBufferDataEntryAllocator : public HeapEntriesAllocator { | 1550 class JSArrayBufferDataEntryAllocator : public HeapEntriesAllocator { |
| 1550 public: | 1551 public: |
| 1551 JSArrayBufferDataEntryAllocator(size_t size, V8HeapExplorer* explorer) | 1552 JSArrayBufferDataEntryAllocator(size_t size, V8HeapExplorer* explorer) |
| 1552 : size_(size) | 1553 : size_(size) |
| 1553 , explorer_(explorer) { | 1554 , explorer_(explorer) { |
| 1554 } | 1555 } |
| 1555 virtual HeapEntry* AllocateEntry(HeapThing ptr) { | 1556 virtual HeapEntry* AllocateEntry(HeapThing ptr) { |
| (...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3170 for (int i = 1; i < sorted_strings.length(); ++i) { | 3171 for (int i = 1; i < sorted_strings.length(); ++i) { |
| 3171 writer_->AddCharacter(','); | 3172 writer_->AddCharacter(','); |
| 3172 SerializeString(sorted_strings[i]); | 3173 SerializeString(sorted_strings[i]); |
| 3173 if (writer_->aborted()) return; | 3174 if (writer_->aborted()) return; |
| 3174 } | 3175 } |
| 3175 } | 3176 } |
| 3176 | 3177 |
| 3177 | 3178 |
| 3178 } // namespace internal | 3179 } // namespace internal |
| 3179 } // namespace v8 | 3180 } // namespace v8 |
| OLD | NEW |