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 2146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2157 #define NAME_ENTRY(name) strong_gc_subroot_names_.SetTag(heap_->name(), #name); | 2157 #define NAME_ENTRY(name) strong_gc_subroot_names_.SetTag(heap_->name(), #name); |
2158 #define ROOT_NAME(type, name, camel_name) NAME_ENTRY(name) | 2158 #define ROOT_NAME(type, name, camel_name) NAME_ENTRY(name) |
2159 STRONG_ROOT_LIST(ROOT_NAME) | 2159 STRONG_ROOT_LIST(ROOT_NAME) |
2160 #undef ROOT_NAME | 2160 #undef ROOT_NAME |
2161 #define STRUCT_MAP_NAME(NAME, Name, name) NAME_ENTRY(name##_map) | 2161 #define STRUCT_MAP_NAME(NAME, Name, name) NAME_ENTRY(name##_map) |
2162 STRUCT_LIST(STRUCT_MAP_NAME) | 2162 STRUCT_LIST(STRUCT_MAP_NAME) |
2163 #undef STRUCT_MAP_NAME | 2163 #undef STRUCT_MAP_NAME |
2164 #define STRING_NAME(name, str) NAME_ENTRY(name) | 2164 #define STRING_NAME(name, str) NAME_ENTRY(name) |
2165 INTERNALIZED_STRING_LIST(STRING_NAME) | 2165 INTERNALIZED_STRING_LIST(STRING_NAME) |
2166 #undef STRING_NAME | 2166 #undef STRING_NAME |
2167 #define SYMBOL_NAME(name) NAME_ENTRY(name) | |
2168 PRIVATE_SYMBOL_LIST(SYMBOL_NAME) | |
2169 #undef SYMBOL_NAME | |
2170 #undef NAME_ENTRY | 2167 #undef NAME_ENTRY |
2171 CHECK(!strong_gc_subroot_names_.is_empty()); | 2168 CHECK(!strong_gc_subroot_names_.is_empty()); |
2172 } | 2169 } |
2173 return strong_gc_subroot_names_.GetTag(object); | 2170 return strong_gc_subroot_names_.GetTag(object); |
2174 } | 2171 } |
2175 | 2172 |
2176 | 2173 |
2177 void V8HeapExplorer::TagObject(Object* obj, const char* tag) { | 2174 void V8HeapExplorer::TagObject(Object* obj, const char* tag) { |
2178 if (IsEssentialObject(obj)) { | 2175 if (IsEssentialObject(obj)) { |
2179 HeapEntry* entry = GetEntry(obj); | 2176 HeapEntry* entry = GetEntry(obj); |
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3140 writer_->AddString("\"<dummy>\""); | 3137 writer_->AddString("\"<dummy>\""); |
3141 for (int i = 1; i < sorted_strings.length(); ++i) { | 3138 for (int i = 1; i < sorted_strings.length(); ++i) { |
3142 writer_->AddCharacter(','); | 3139 writer_->AddCharacter(','); |
3143 SerializeString(sorted_strings[i]); | 3140 SerializeString(sorted_strings[i]); |
3144 if (writer_->aborted()) return; | 3141 if (writer_->aborted()) return; |
3145 } | 3142 } |
3146 } | 3143 } |
3147 | 3144 |
3148 | 3145 |
3149 } } // namespace v8::internal | 3146 } } // namespace v8::internal |
OLD | NEW |