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: | |
153 return "/simd/"; | |
rossberg
2015/07/02 13:35:43
Nit: consistent layout
bbudge
2015/07/06 23:59:04
Done (but this is git cl format)
| |
152 case kNative: return "/native/"; | 154 case kNative: return "/native/"; |
153 case kSynthetic: return "/synthetic/"; | 155 case kSynthetic: return "/synthetic/"; |
154 case kConsString: return "/concatenated string/"; | 156 case kConsString: return "/concatenated string/"; |
155 case kSlicedString: return "/sliced string/"; | 157 case kSlicedString: return "/sliced string/"; |
156 case kSymbol: return "/symbol/"; | 158 case kSymbol: return "/symbol/"; |
157 case kSimdValue: return "/simd/"; | |
158 default: return "???"; | 159 default: return "???"; |
159 } | 160 } |
160 } | 161 } |
161 | 162 |
162 | 163 |
163 // It is very important to keep objects that form a heap snapshot | 164 // It is very important to keep objects that form a heap snapshot |
164 // as small as possible. | 165 // as small as possible. |
165 namespace { // Avoid littering the global namespace. | 166 namespace { // Avoid littering the global namespace. |
166 | 167 |
167 template <size_t ptr_size> struct SnapshotSizeConstants; | 168 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) { | 3179 for (int i = 1; i < sorted_strings.length(); ++i) { |
3179 writer_->AddCharacter(','); | 3180 writer_->AddCharacter(','); |
3180 SerializeString(sorted_strings[i]); | 3181 SerializeString(sorted_strings[i]); |
3181 if (writer_->aborted()) return; | 3182 if (writer_->aborted()) return; |
3182 } | 3183 } |
3183 } | 3184 } |
3184 | 3185 |
3185 | 3186 |
3186 } // namespace internal | 3187 } // namespace internal |
3187 } // namespace v8 | 3188 } // namespace v8 |
OLD | NEW |