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/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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 const char* HeapEntry::TypeAsString() { | 142 const char* HeapEntry::TypeAsString() { |
143 switch (type()) { | 143 switch (type()) { |
144 case kHidden: return "/hidden/"; | 144 case kHidden: return "/hidden/"; |
145 case kObject: return "/object/"; | 145 case kObject: return "/object/"; |
146 case kClosure: return "/closure/"; | 146 case kClosure: return "/closure/"; |
147 case kString: return "/string/"; | 147 case kString: return "/string/"; |
148 case kCode: return "/code/"; | 148 case kCode: return "/code/"; |
149 case kArray: return "/array/"; | 149 case kArray: return "/array/"; |
150 case kRegExp: return "/regexp/"; | 150 case kRegExp: return "/regexp/"; |
151 case kHeapNumber: return "/number/"; | 151 case kHeapNumber: return "/number/"; |
| 152 case kSimdValue: return "/simd/"; |
152 case kNative: return "/native/"; | 153 case kNative: return "/native/"; |
153 case kSynthetic: return "/synthetic/"; | 154 case kSynthetic: return "/synthetic/"; |
154 case kConsString: return "/concatenated string/"; | 155 case kConsString: return "/concatenated string/"; |
155 case kSlicedString: return "/sliced string/"; | 156 case kSlicedString: return "/sliced string/"; |
156 case kSymbol: return "/symbol/"; | 157 case kSymbol: return "/symbol/"; |
157 case kSimdValue: return "/simd/"; | |
158 default: return "???"; | 158 default: return "???"; |
159 } | 159 } |
160 } | 160 } |
161 | 161 |
162 | 162 |
163 // It is very important to keep objects that form a heap snapshot | 163 // It is very important to keep objects that form a heap snapshot |
164 // as small as possible. | 164 // as small as possible. |
165 namespace { // Avoid littering the global namespace. | 165 namespace { // Avoid littering the global namespace. |
166 | 166 |
167 template <size_t ptr_size> struct SnapshotSizeConstants; | 167 template <size_t ptr_size> struct SnapshotSizeConstants; |
(...skipping 3010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3178 for (int i = 1; i < sorted_strings.length(); ++i) { | 3178 for (int i = 1; i < sorted_strings.length(); ++i) { |
3179 writer_->AddCharacter(','); | 3179 writer_->AddCharacter(','); |
3180 SerializeString(sorted_strings[i]); | 3180 SerializeString(sorted_strings[i]); |
3181 if (writer_->aborted()) return; | 3181 if (writer_->aborted()) return; |
3182 } | 3182 } |
3183 } | 3183 } |
3184 | 3184 |
3185 | 3185 |
3186 } // namespace internal | 3186 } // namespace internal |
3187 } // namespace v8 | 3187 } // namespace v8 |
OLD | NEW |