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

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

Issue 1153373003: Add new Float32x4 type for SIMD.js. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix int type mismatches. Created 5 years, 6 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/heap-snapshot-generator.h ('k') | src/heap/heap.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/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 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 return AddEntry(object, HeapEntry::kHidden, "system / NativeContext"); 855 return AddEntry(object, HeapEntry::kHidden, "system / NativeContext");
855 } else if (object->IsContext()) { 856 } else if (object->IsContext()) {
856 return AddEntry(object, HeapEntry::kObject, "system / Context"); 857 return AddEntry(object, HeapEntry::kObject, "system / Context");
857 } else if (object->IsFixedArray() || 858 } else if (object->IsFixedArray() ||
858 object->IsFixedDoubleArray() || 859 object->IsFixedDoubleArray() ||
859 object->IsByteArray() || 860 object->IsByteArray() ||
860 object->IsExternalArray()) { 861 object->IsExternalArray()) {
861 return AddEntry(object, HeapEntry::kArray, ""); 862 return AddEntry(object, HeapEntry::kArray, "");
862 } else if (object->IsHeapNumber()) { 863 } else if (object->IsHeapNumber()) {
863 return AddEntry(object, HeapEntry::kHeapNumber, "number"); 864 return AddEntry(object, HeapEntry::kHeapNumber, "number");
865 } else if (object->IsFloat32x4()) {
866 return AddEntry(object, HeapEntry::kSimdValue, "simd");
864 } 867 }
865 return AddEntry(object, HeapEntry::kHidden, GetSystemEntryName(object)); 868 return AddEntry(object, HeapEntry::kHidden, GetSystemEntryName(object));
866 } 869 }
867 870
868 871
869 HeapEntry* V8HeapExplorer::AddEntry(HeapObject* object, 872 HeapEntry* V8HeapExplorer::AddEntry(HeapObject* object,
870 HeapEntry::Type type, 873 HeapEntry::Type type,
871 const char* name) { 874 const char* name) {
872 return AddEntry(object->address(), type, name, object->Size()); 875 return AddEntry(object->address(), type, name, object->Size());
873 } 876 }
(...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after
3177 for (int i = 1; i < sorted_strings.length(); ++i) { 3180 for (int i = 1; i < sorted_strings.length(); ++i) {
3178 writer_->AddCharacter(','); 3181 writer_->AddCharacter(',');
3179 SerializeString(sorted_strings[i]); 3182 SerializeString(sorted_strings[i]);
3180 if (writer_->aborted()) return; 3183 if (writer_->aborted()) return;
3181 } 3184 }
3182 } 3185 }
3183 3186
3184 3187
3185 } // namespace internal 3188 } // namespace internal
3186 } // namespace v8 3189 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698