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

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

Issue 146843003: Allow arbitrary names for weak references in heap snapshots. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: reupload Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « src/heap-snapshot-generator.h ('k') | test/cctest/test-heap-profiler.cc » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 29 matching lines...) Expand all
40 40
41 41
42 HeapGraphEdge::HeapGraphEdge(Type type, const char* name, int from, int to) 42 HeapGraphEdge::HeapGraphEdge(Type type, const char* name, int from, int to)
43 : type_(type), 43 : type_(type),
44 from_index_(from), 44 from_index_(from),
45 to_index_(to), 45 to_index_(to),
46 name_(name) { 46 name_(name) {
47 ASSERT(type == kContextVariable 47 ASSERT(type == kContextVariable
48 || type == kProperty 48 || type == kProperty
49 || type == kInternal 49 || type == kInternal
50 || type == kShortcut); 50 || type == kShortcut
51 || type == kWeak);
51 } 52 }
52 53
53 54
54 HeapGraphEdge::HeapGraphEdge(Type type, int index, int from, int to) 55 HeapGraphEdge::HeapGraphEdge(Type type, int index, int from, int to)
55 : type_(type), 56 : type_(type),
56 from_index_(from), 57 from_index_(from),
57 to_index_(to), 58 to_index_(to),
58 index_(index) { 59 index_(index) {
59 ASSERT(type == kElement || type == kHidden || type == kWeak); 60 ASSERT(type == kElement || type == kHidden);
60 } 61 }
61 62
62 63
63 void HeapGraphEdge::ReplaceToIndexWithEntry(HeapSnapshot* snapshot) { 64 void HeapGraphEdge::ReplaceToIndexWithEntry(HeapSnapshot* snapshot) {
64 to_entry_ = &snapshot->entries()[to_index_]; 65 to_entry_ = &snapshot->entries()[to_index_];
65 } 66 }
66 67
67 68
68 const int HeapEntry::kNoEntry = -1; 69 const int HeapEntry::kNoEntry = -1;
69 70
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 case HeapGraphEdge::kHidden: 144 case HeapGraphEdge::kHidden:
144 edge_prefix = "$"; 145 edge_prefix = "$";
145 OS::SNPrintF(index, "%d", edge.index()); 146 OS::SNPrintF(index, "%d", edge.index());
146 break; 147 break;
147 case HeapGraphEdge::kShortcut: 148 case HeapGraphEdge::kShortcut:
148 edge_prefix = "^"; 149 edge_prefix = "^";
149 edge_name = edge.name(); 150 edge_name = edge.name();
150 break; 151 break;
151 case HeapGraphEdge::kWeak: 152 case HeapGraphEdge::kWeak:
152 edge_prefix = "w"; 153 edge_prefix = "w";
153 OS::SNPrintF(index, "%d", edge.index()); 154 edge_name = edge.name();
154 break; 155 break;
155 default: 156 default:
156 OS::SNPrintF(index, "!!! unknown edge type: %d ", edge.type()); 157 OS::SNPrintF(index, "!!! unknown edge type: %d ", edge.type());
157 } 158 }
158 edge.to()->Print(edge_prefix, edge_name, max_depth, indent + 2); 159 edge.to()->Print(edge_prefix, edge_name, max_depth, indent + 2);
159 } 160 }
160 } 161 }
161 162
162 163
163 const char* HeapEntry::TypeAsString() { 164 const char* HeapEntry::TypeAsString() {
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 js_fun->literals_or_bindings(), 1108 js_fun->literals_or_bindings(),
1108 JSFunction::kLiteralsOffset); 1109 JSFunction::kLiteralsOffset);
1109 TagObject(shared_info, "(shared function info)"); 1110 TagObject(shared_info, "(shared function info)");
1110 SetInternalReference(js_fun, entry, 1111 SetInternalReference(js_fun, entry,
1111 "shared", shared_info, 1112 "shared", shared_info,
1112 JSFunction::kSharedFunctionInfoOffset); 1113 JSFunction::kSharedFunctionInfoOffset);
1113 TagObject(js_fun->context(), "(context)"); 1114 TagObject(js_fun->context(), "(context)");
1114 SetInternalReference(js_fun, entry, 1115 SetInternalReference(js_fun, entry,
1115 "context", js_fun->context(), 1116 "context", js_fun->context(),
1116 JSFunction::kContextOffset); 1117 JSFunction::kContextOffset);
1117 for (int i = JSFunction::kNonWeakFieldsEndOffset; 1118 SetWeakReference(js_fun, entry,
1118 i < JSFunction::kSize; 1119 "next_function_link", js_fun->next_function_link(),
1119 i += kPointerSize) { 1120 JSFunction::kNextFunctionLinkOffset);
1120 SetWeakReference(js_fun, entry, i, *HeapObject::RawField(js_fun, i), i); 1121 STATIC_CHECK(JSFunction::kNextFunctionLinkOffset
1121 } 1122 == JSFunction::kNonWeakFieldsEndOffset);
1123 STATIC_CHECK(JSFunction::kNextFunctionLinkOffset + kPointerSize
1124 == JSFunction::kSize);
1122 } else if (obj->IsGlobalObject()) { 1125 } else if (obj->IsGlobalObject()) {
1123 GlobalObject* global_obj = GlobalObject::cast(obj); 1126 GlobalObject* global_obj = GlobalObject::cast(obj);
1124 SetInternalReference(global_obj, entry, 1127 SetInternalReference(global_obj, entry,
1125 "builtins", global_obj->builtins(), 1128 "builtins", global_obj->builtins(),
1126 GlobalObject::kBuiltinsOffset); 1129 GlobalObject::kBuiltinsOffset);
1127 SetInternalReference(global_obj, entry, 1130 SetInternalReference(global_obj, entry,
1128 "native_context", global_obj->native_context(), 1131 "native_context", global_obj->native_context(),
1129 GlobalObject::kNativeContextOffset); 1132 GlobalObject::kNativeContextOffset);
1130 SetInternalReference(global_obj, entry, 1133 SetInternalReference(global_obj, entry,
1131 "global_receiver", global_obj->global_receiver(), 1134 "global_receiver", global_obj->global_receiver(),
1132 GlobalObject::kGlobalReceiverOffset); 1135 GlobalObject::kGlobalReceiverOffset);
1133 } else if (obj->IsJSArrayBufferView()) { 1136 } else if (obj->IsJSArrayBufferView()) {
1134 JSArrayBufferView* view = JSArrayBufferView::cast(obj); 1137 JSArrayBufferView* view = JSArrayBufferView::cast(obj);
1135 SetInternalReference(view, entry, "buffer", view->buffer(), 1138 SetInternalReference(view, entry, "buffer", view->buffer(),
1136 JSArrayBufferView::kBufferOffset); 1139 JSArrayBufferView::kBufferOffset);
1137 SetWeakReference(view, entry, 1, view->weak_next(), 1140 SetWeakReference(view, entry, "weak_next", view->weak_next(),
1138 JSArrayBufferView::kWeakNextOffset); 1141 JSArrayBufferView::kWeakNextOffset);
1139 } else if (obj->IsJSArrayBuffer()) { 1142 } else if (obj->IsJSArrayBuffer()) {
1140 JSArrayBuffer* buffer = JSArrayBuffer::cast(obj); 1143 JSArrayBuffer* buffer = JSArrayBuffer::cast(obj);
1141 SetWeakReference(buffer, entry, 1, buffer->weak_next(), 1144 SetWeakReference(buffer, entry, "weak_next", buffer->weak_next(),
1142 JSArrayBuffer::kWeakNextOffset); 1145 JSArrayBuffer::kWeakNextOffset);
1143 SetWeakReference(buffer, entry, 2, buffer->weak_first_view(), 1146 SetWeakReference(buffer, entry,
1147 "weak_first_view", buffer->weak_first_view(),
1144 JSArrayBuffer::kWeakFirstViewOffset); 1148 JSArrayBuffer::kWeakFirstViewOffset);
1145 } 1149 }
1146 TagObject(js_obj->properties(), "(object properties)"); 1150 TagObject(js_obj->properties(), "(object properties)");
1147 SetInternalReference(obj, entry, 1151 SetInternalReference(obj, entry,
1148 "properties", js_obj->properties(), 1152 "properties", js_obj->properties(),
1149 JSObject::kPropertiesOffset); 1153 JSObject::kPropertiesOffset);
1150 TagObject(js_obj->elements(), "(object elements)"); 1154 TagObject(js_obj->elements(), "(object elements)");
1151 SetInternalReference(obj, entry, 1155 SetInternalReference(obj, entry,
1152 "elements", js_obj->elements(), 1156 "elements", js_obj->elements(),
1153 JSObject::kElementsOffset); 1157 JSObject::kElementsOffset);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 VariableMode mode; 1189 VariableMode mode;
1186 int idx = scope_info->FunctionContextSlotIndex(name, &mode); 1190 int idx = scope_info->FunctionContextSlotIndex(name, &mode);
1187 if (idx >= 0) { 1191 if (idx >= 0) {
1188 SetContextReference(context, entry, name, context->get(idx), 1192 SetContextReference(context, entry, name, context->get(idx),
1189 Context::OffsetOfElementAt(idx)); 1193 Context::OffsetOfElementAt(idx));
1190 } 1194 }
1191 } 1195 }
1192 } 1196 }
1193 1197
1194 #define EXTRACT_CONTEXT_FIELD(index, type, name) \ 1198 #define EXTRACT_CONTEXT_FIELD(index, type, name) \
1195 SetInternalReference(context, entry, #name, context->get(Context::index), \ 1199 if (Context::index < Context::FIRST_WEAK_SLOT) { \
1196 FixedArray::OffsetOfElementAt(Context::index)); 1200 SetInternalReference(context, entry, #name, context->get(Context::index), \
1201 FixedArray::OffsetOfElementAt(Context::index)); \
1202 } else { \
1203 SetWeakReference(context, entry, #name, context->get(Context::index), \
1204 FixedArray::OffsetOfElementAt(Context::index)); \
1205 }
1197 EXTRACT_CONTEXT_FIELD(CLOSURE_INDEX, JSFunction, closure); 1206 EXTRACT_CONTEXT_FIELD(CLOSURE_INDEX, JSFunction, closure);
1198 EXTRACT_CONTEXT_FIELD(PREVIOUS_INDEX, Context, previous); 1207 EXTRACT_CONTEXT_FIELD(PREVIOUS_INDEX, Context, previous);
1199 EXTRACT_CONTEXT_FIELD(EXTENSION_INDEX, Object, extension); 1208 EXTRACT_CONTEXT_FIELD(EXTENSION_INDEX, Object, extension);
1200 EXTRACT_CONTEXT_FIELD(GLOBAL_OBJECT_INDEX, GlobalObject, global); 1209 EXTRACT_CONTEXT_FIELD(GLOBAL_OBJECT_INDEX, GlobalObject, global);
1201 if (context->IsNativeContext()) { 1210 if (context->IsNativeContext()) {
1202 TagObject(context->jsfunction_result_caches(), 1211 TagObject(context->jsfunction_result_caches(),
1203 "(context func. result caches)"); 1212 "(context func. result caches)");
1204 TagObject(context->normalized_map_cache(), "(context norm. map cache)"); 1213 TagObject(context->normalized_map_cache(), "(context norm. map cache)");
1205 TagObject(context->runtime_context(), "(runtime context)"); 1214 TagObject(context->runtime_context(), "(runtime context)");
1206 TagObject(context->embedder_data(), "(context data)"); 1215 TagObject(context->embedder_data(), "(context data)");
1207 NATIVE_CONTEXT_FIELDS(EXTRACT_CONTEXT_FIELD); 1216 NATIVE_CONTEXT_FIELDS(EXTRACT_CONTEXT_FIELD);
1217 EXTRACT_CONTEXT_FIELD(OPTIMIZED_FUNCTIONS_LIST, unused,
1218 optimized_functions_list);
1219 EXTRACT_CONTEXT_FIELD(OPTIMIZED_CODE_LIST, unused, optimized_code_list);
1220 EXTRACT_CONTEXT_FIELD(DEOPTIMIZED_CODE_LIST, unused, deoptimized_code_list);
1221 EXTRACT_CONTEXT_FIELD(NEXT_CONTEXT_LINK, unused, next_context_link);
1208 #undef EXTRACT_CONTEXT_FIELD 1222 #undef EXTRACT_CONTEXT_FIELD
1209 for (int i = Context::FIRST_WEAK_SLOT; 1223 STATIC_CHECK(Context::OPTIMIZED_FUNCTIONS_LIST == Context::FIRST_WEAK_SLOT);
1210 i < Context::NATIVE_CONTEXT_SLOTS; 1224 STATIC_CHECK(Context::NEXT_CONTEXT_LINK + 1
1211 ++i) { 1225 == Context::NATIVE_CONTEXT_SLOTS);
1212 SetWeakReference(context, entry, i, context->get(i), 1226 STATIC_CHECK(Context::FIRST_WEAK_SLOT + 5 == Context::NATIVE_CONTEXT_SLOTS);
1213 FixedArray::OffsetOfElementAt(i));
1214 }
1215 } 1227 }
1216 } 1228 }
1217 1229
1218 1230
1219 void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) { 1231 void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
1220 if (map->HasTransitionArray()) { 1232 if (map->HasTransitionArray()) {
1221 TransitionArray* transitions = map->transitions(); 1233 TransitionArray* transitions = map->transitions();
1222 int transitions_entry = GetEntry(transitions)->index(); 1234 int transitions_entry = GetEntry(transitions)->index();
1223 Object* back_pointer = transitions->back_pointer_storage(); 1235 Object* back_pointer = transitions->back_pointer_storage();
1224 TagObject(back_pointer, "(back pointer)"); 1236 TagObject(back_pointer, "(back pointer)");
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 SetInternalReference(obj, entry, 1310 SetInternalReference(obj, entry,
1299 "debug_info", shared->debug_info(), 1311 "debug_info", shared->debug_info(),
1300 SharedFunctionInfo::kDebugInfoOffset); 1312 SharedFunctionInfo::kDebugInfoOffset);
1301 SetInternalReference(obj, entry, 1313 SetInternalReference(obj, entry,
1302 "inferred_name", shared->inferred_name(), 1314 "inferred_name", shared->inferred_name(),
1303 SharedFunctionInfo::kInferredNameOffset); 1315 SharedFunctionInfo::kInferredNameOffset);
1304 SetInternalReference(obj, entry, 1316 SetInternalReference(obj, entry,
1305 "optimized_code_map", shared->optimized_code_map(), 1317 "optimized_code_map", shared->optimized_code_map(),
1306 SharedFunctionInfo::kOptimizedCodeMapOffset); 1318 SharedFunctionInfo::kOptimizedCodeMapOffset);
1307 SetWeakReference(obj, entry, 1319 SetWeakReference(obj, entry,
1308 1, shared->initial_map(), 1320 "initial_map", shared->initial_map(),
1309 SharedFunctionInfo::kInitialMapOffset); 1321 SharedFunctionInfo::kInitialMapOffset);
1310 } 1322 }
1311 1323
1312 1324
1313 void V8HeapExplorer::ExtractScriptReferences(int entry, Script* script) { 1325 void V8HeapExplorer::ExtractScriptReferences(int entry, Script* script) {
1314 HeapObject* obj = script; 1326 HeapObject* obj = script;
1315 SetInternalReference(obj, entry, 1327 SetInternalReference(obj, entry,
1316 "source", script->source(), 1328 "source", script->source(),
1317 Script::kSourceOffset); 1329 Script::kSourceOffset);
1318 SetInternalReference(obj, entry, 1330 SetInternalReference(obj, entry,
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 filler_->SetIndexedReference(HeapGraphEdge::kHidden, 1840 filler_->SetIndexedReference(HeapGraphEdge::kHidden,
1829 parent_entry, 1841 parent_entry,
1830 index, 1842 index,
1831 child_entry); 1843 child_entry);
1832 } 1844 }
1833 } 1845 }
1834 1846
1835 1847
1836 void V8HeapExplorer::SetWeakReference(HeapObject* parent_obj, 1848 void V8HeapExplorer::SetWeakReference(HeapObject* parent_obj,
1837 int parent_entry, 1849 int parent_entry,
1838 int index, 1850 const char* reference_name,
1839 Object* child_obj, 1851 Object* child_obj,
1840 int field_offset) { 1852 int field_offset) {
1841 ASSERT(parent_entry == GetEntry(parent_obj)->index()); 1853 ASSERT(parent_entry == GetEntry(parent_obj)->index());
1842 HeapEntry* child_entry = GetEntry(child_obj); 1854 HeapEntry* child_entry = GetEntry(child_obj);
1843 if (child_entry == NULL) return; 1855 if (child_entry == NULL) return;
1844 if (IsEssentialObject(child_obj)) { 1856 if (IsEssentialObject(child_obj)) {
1845 filler_->SetIndexedReference(HeapGraphEdge::kWeak, 1857 filler_->SetNamedReference(HeapGraphEdge::kWeak,
1846 parent_entry, 1858 parent_entry,
1847 index, 1859 reference_name,
1848 child_entry); 1860 child_entry);
1849 } 1861 }
1850 IndexedReferencesExtractor::MarkVisitedField(parent_obj, field_offset); 1862 IndexedReferencesExtractor::MarkVisitedField(parent_obj, field_offset);
1851 } 1863 }
1852 1864
1853 1865
1854 void V8HeapExplorer::SetPropertyReference(HeapObject* parent_obj, 1866 void V8HeapExplorer::SetPropertyReference(HeapObject* parent_obj,
1855 int parent_entry, 1867 int parent_entry,
1856 Name* reference_name, 1868 Name* reference_name,
1857 Object* child_obj, 1869 Object* child_obj,
1858 const char* name_format_string, 1870 const char* name_format_string,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 HeapEntry* child_entry = GetEntry(child_obj); 1922 HeapEntry* child_entry = GetEntry(child_obj);
1911 if (child_entry != NULL) { 1923 if (child_entry != NULL) {
1912 const char* name = GetStrongGcSubrootName(child_obj); 1924 const char* name = GetStrongGcSubrootName(child_obj);
1913 if (name != NULL) { 1925 if (name != NULL) {
1914 filler_->SetNamedReference( 1926 filler_->SetNamedReference(
1915 HeapGraphEdge::kInternal, 1927 HeapGraphEdge::kInternal,
1916 snapshot_->gc_subroot(tag)->index(), 1928 snapshot_->gc_subroot(tag)->index(),
1917 name, 1929 name,
1918 child_entry); 1930 child_entry);
1919 } else { 1931 } else {
1920 filler_->SetIndexedAutoIndexReference( 1932 if (is_weak) {
1921 is_weak ? HeapGraphEdge::kWeak : HeapGraphEdge::kElement, 1933 filler_->SetNamedAutoIndexReference(
1922 snapshot_->gc_subroot(tag)->index(), 1934 HeapGraphEdge::kWeak,
1923 child_entry); 1935 snapshot_->gc_subroot(tag)->index(),
1936 child_entry);
1937 } else {
1938 filler_->SetIndexedAutoIndexReference(
1939 HeapGraphEdge::kElement,
1940 snapshot_->gc_subroot(tag)->index(),
1941 child_entry);
1942 }
1924 } 1943 }
1925 1944
1926 // Add a shortcut to JS global object reference at snapshot root. 1945 // Add a shortcut to JS global object reference at snapshot root.
1927 if (child_obj->IsNativeContext()) { 1946 if (child_obj->IsNativeContext()) {
1928 Context* context = Context::cast(child_obj); 1947 Context* context = Context::cast(child_obj);
1929 GlobalObject* global = context->global_object(); 1948 GlobalObject* global = context->global_object();
1930 if (global->IsJSGlobalObject()) { 1949 if (global->IsJSGlobalObject()) {
1931 bool is_debug_object = false; 1950 bool is_debug_object = false;
1932 #ifdef ENABLE_DEBUGGER_SUPPORT 1951 #ifdef ENABLE_DEBUGGER_SUPPORT
1933 is_debug_object = heap_->isolate()->debug()->IsDebugGlobal(global); 1952 is_debug_object = heap_->isolate()->debug()->IsDebugGlobal(global);
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
2647 2666
2648 2667
2649 void HeapSnapshotJSONSerializer::SerializeEdge(HeapGraphEdge* edge, 2668 void HeapSnapshotJSONSerializer::SerializeEdge(HeapGraphEdge* edge,
2650 bool first_edge) { 2669 bool first_edge) {
2651 // The buffer needs space for 3 unsigned ints, 3 commas, \n and \0 2670 // The buffer needs space for 3 unsigned ints, 3 commas, \n and \0
2652 static const int kBufferSize = 2671 static const int kBufferSize =
2653 MaxDecimalDigitsIn<sizeof(unsigned)>::kUnsigned * 3 + 3 + 2; // NOLINT 2672 MaxDecimalDigitsIn<sizeof(unsigned)>::kUnsigned * 3 + 3 + 2; // NOLINT
2654 EmbeddedVector<char, kBufferSize> buffer; 2673 EmbeddedVector<char, kBufferSize> buffer;
2655 int edge_name_or_index = edge->type() == HeapGraphEdge::kElement 2674 int edge_name_or_index = edge->type() == HeapGraphEdge::kElement
2656 || edge->type() == HeapGraphEdge::kHidden 2675 || edge->type() == HeapGraphEdge::kHidden
2657 || edge->type() == HeapGraphEdge::kWeak
2658 ? edge->index() : GetStringId(edge->name()); 2676 ? edge->index() : GetStringId(edge->name());
2659 int buffer_pos = 0; 2677 int buffer_pos = 0;
2660 if (!first_edge) { 2678 if (!first_edge) {
2661 buffer[buffer_pos++] = ','; 2679 buffer[buffer_pos++] = ',';
2662 } 2680 }
2663 buffer_pos = utoa(edge->type(), buffer, buffer_pos); 2681 buffer_pos = utoa(edge->type(), buffer, buffer_pos);
2664 buffer[buffer_pos++] = ','; 2682 buffer[buffer_pos++] = ',';
2665 buffer_pos = utoa(edge_name_or_index, buffer, buffer_pos); 2683 buffer_pos = utoa(edge_name_or_index, buffer, buffer_pos);
2666 buffer[buffer_pos++] = ','; 2684 buffer[buffer_pos++] = ',';
2667 buffer_pos = utoa(entry_index(edge->to()), buffer, buffer_pos); 2685 buffer_pos = utoa(entry_index(edge->to()), buffer, buffer_pos);
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
2966 writer_->AddString("\"<dummy>\""); 2984 writer_->AddString("\"<dummy>\"");
2967 for (int i = 1; i < sorted_strings.length(); ++i) { 2985 for (int i = 1; i < sorted_strings.length(); ++i) {
2968 writer_->AddCharacter(','); 2986 writer_->AddCharacter(',');
2969 SerializeString(sorted_strings[i]); 2987 SerializeString(sorted_strings[i]);
2970 if (writer_->aborted()) return; 2988 if (writer_->aborted()) return;
2971 } 2989 }
2972 } 2990 }
2973 2991
2974 2992
2975 } } // namespace v8::internal 2993 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap-snapshot-generator.h ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698