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

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

Issue 2692933002: Revert of Remove SIMD.js from V8. (Closed)
Patch Set: Created 3 years, 10 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 | « src/profiler/heap-snapshot-generator.h ('k') | src/runtime/runtime.h » ('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 <utility> 7 #include <utility>
8 8
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 kNative: return "/native/"; 152 case kNative: return "/native/";
153 case kSynthetic: return "/synthetic/"; 153 case kSynthetic: return "/synthetic/";
154 case kConsString: return "/concatenated string/"; 154 case kConsString: return "/concatenated string/";
155 case kSlicedString: return "/sliced string/"; 155 case kSlicedString: return "/sliced string/";
156 case kSymbol: return "/symbol/"; 156 case kSymbol: return "/symbol/";
157 case kSimdValue: return "/simd/";
157 default: return "???"; 158 default: return "???";
158 } 159 }
159 } 160 }
160 161
161 162
162 // 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
163 // as small as possible. 164 // as small as possible.
164 namespace { // Avoid littering the global namespace. 165 namespace { // Avoid littering the global namespace.
165 166
166 template <size_t ptr_size> struct SnapshotSizeConstants; 167 template <size_t ptr_size> struct SnapshotSizeConstants;
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 : ""); 831 : "");
831 } else if (object->IsNativeContext()) { 832 } else if (object->IsNativeContext()) {
832 return AddEntry(object, HeapEntry::kHidden, "system / NativeContext"); 833 return AddEntry(object, HeapEntry::kHidden, "system / NativeContext");
833 } else if (object->IsContext()) { 834 } else if (object->IsContext()) {
834 return AddEntry(object, HeapEntry::kObject, "system / Context"); 835 return AddEntry(object, HeapEntry::kObject, "system / Context");
835 } else if (object->IsFixedArray() || object->IsFixedDoubleArray() || 836 } else if (object->IsFixedArray() || object->IsFixedDoubleArray() ||
836 object->IsByteArray()) { 837 object->IsByteArray()) {
837 return AddEntry(object, HeapEntry::kArray, ""); 838 return AddEntry(object, HeapEntry::kArray, "");
838 } else if (object->IsHeapNumber()) { 839 } else if (object->IsHeapNumber()) {
839 return AddEntry(object, HeapEntry::kHeapNumber, "number"); 840 return AddEntry(object, HeapEntry::kHeapNumber, "number");
841 } else if (object->IsSimd128Value()) {
842 return AddEntry(object, HeapEntry::kSimdValue, "simd");
840 } 843 }
841 return AddEntry(object, HeapEntry::kHidden, GetSystemEntryName(object)); 844 return AddEntry(object, HeapEntry::kHidden, GetSystemEntryName(object));
842 } 845 }
843 846
844 847
845 HeapEntry* V8HeapExplorer::AddEntry(HeapObject* object, 848 HeapEntry* V8HeapExplorer::AddEntry(HeapObject* object,
846 HeapEntry::Type type, 849 HeapEntry::Type type,
847 const char* name) { 850 const char* name) {
848 return AddEntry(object->address(), type, name, object->Size()); 851 return AddEntry(object->address(), type, name, object->Size());
849 } 852 }
(...skipping 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after
3128 for (int i = 1; i < sorted_strings.length(); ++i) { 3131 for (int i = 1; i < sorted_strings.length(); ++i) {
3129 writer_->AddCharacter(','); 3132 writer_->AddCharacter(',');
3130 SerializeString(sorted_strings[i]); 3133 SerializeString(sorted_strings[i]);
3131 if (writer_->aborted()) return; 3134 if (writer_->aborted()) return;
3132 } 3135 }
3133 } 3136 }
3134 3137
3135 3138
3136 } // namespace internal 3139 } // namespace internal
3137 } // namespace v8 3140 } // namespace v8
OLDNEW
« no previous file with comments | « src/profiler/heap-snapshot-generator.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698