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/objects-body-descriptors.h" |
(...skipping 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2240 HeapObjectsMap* heap_object_map_; | 2240 HeapObjectsMap* heap_object_map_; |
2241 HeapEntry::Type entries_type_; | 2241 HeapEntry::Type entries_type_; |
2242 }; | 2242 }; |
2243 | 2243 |
2244 | 2244 |
2245 HeapEntry* BasicHeapEntriesAllocator::AllocateEntry(HeapThing ptr) { | 2245 HeapEntry* BasicHeapEntriesAllocator::AllocateEntry(HeapThing ptr) { |
2246 v8::RetainedObjectInfo* info = reinterpret_cast<v8::RetainedObjectInfo*>(ptr); | 2246 v8::RetainedObjectInfo* info = reinterpret_cast<v8::RetainedObjectInfo*>(ptr); |
2247 intptr_t elements = info->GetElementCount(); | 2247 intptr_t elements = info->GetElementCount(); |
2248 intptr_t size = info->GetSizeInBytes(); | 2248 intptr_t size = info->GetSizeInBytes(); |
2249 const char* name = elements != -1 | 2249 const char* name = elements != -1 |
2250 ? names_->GetFormatted("%s / %" V8PRIdPTR " entries", | 2250 ? names_->GetFormatted( |
2251 info->GetLabel(), elements) | 2251 "%s / %" V8_PTR_PREFIX "d entries", info->GetLabel(), elements) |
2252 : names_->GetCopy(info->GetLabel()); | 2252 : names_->GetCopy(info->GetLabel()); |
2253 return snapshot_->AddEntry( | 2253 return snapshot_->AddEntry( |
2254 entries_type_, | 2254 entries_type_, |
2255 name, | 2255 name, |
2256 heap_object_map_->GenerateId(info), | 2256 heap_object_map_->GenerateId(info), |
2257 size != -1 ? static_cast<int>(size) : 0, | 2257 size != -1 ? static_cast<int>(size) : 0, |
2258 0); | 2258 0); |
2259 } | 2259 } |
2260 | 2260 |
2261 | 2261 |
2262 NativeObjectsExplorer::NativeObjectsExplorer( | 2262 NativeObjectsExplorer::NativeObjectsExplorer( |
(...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3139 for (int i = 1; i < sorted_strings.length(); ++i) { | 3139 for (int i = 1; i < sorted_strings.length(); ++i) { |
3140 writer_->AddCharacter(','); | 3140 writer_->AddCharacter(','); |
3141 SerializeString(sorted_strings[i]); | 3141 SerializeString(sorted_strings[i]); |
3142 if (writer_->aborted()) return; | 3142 if (writer_->aborted()) return; |
3143 } | 3143 } |
3144 } | 3144 } |
3145 | 3145 |
3146 | 3146 |
3147 } // namespace internal | 3147 } // namespace internal |
3148 } // namespace v8 | 3148 } // namespace v8 |
OLD | NEW |