| 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/profiler/heap-snapshot-generator.h" | 5 #include "src/profiler/heap-snapshot-generator.h" |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/conversions.h" | 8 #include "src/conversions.h" |
| 9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
| 10 #include "src/objects-body-descriptors.h" | 10 #include "src/objects-body-descriptors.h" |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 const char* HeapObjectsSet::GetTag(Object* obj) { | 744 const char* HeapObjectsSet::GetTag(Object* obj) { |
| 745 HeapObject* object = HeapObject::cast(obj); | 745 HeapObject* object = HeapObject::cast(obj); |
| 746 base::HashMap::Entry* cache_entry = | 746 base::HashMap::Entry* cache_entry = |
| 747 entries_.Lookup(object, HeapEntriesMap::Hash(object)); | 747 entries_.Lookup(object, HeapEntriesMap::Hash(object)); |
| 748 return cache_entry != NULL | 748 return cache_entry != NULL |
| 749 ? reinterpret_cast<const char*>(cache_entry->value) | 749 ? reinterpret_cast<const char*>(cache_entry->value) |
| 750 : NULL; | 750 : NULL; |
| 751 } | 751 } |
| 752 | 752 |
| 753 | 753 |
| 754 void HeapObjectsSet::SetTag(Object* obj, const char* tag) { | 754 V8_NOINLINE void HeapObjectsSet::SetTag(Object* obj, const char* tag) { |
| 755 if (!obj->IsHeapObject()) return; | 755 if (!obj->IsHeapObject()) return; |
| 756 HeapObject* object = HeapObject::cast(obj); | 756 HeapObject* object = HeapObject::cast(obj); |
| 757 base::HashMap::Entry* cache_entry = | 757 base::HashMap::Entry* cache_entry = |
| 758 entries_.LookupOrInsert(object, HeapEntriesMap::Hash(object)); | 758 entries_.LookupOrInsert(object, HeapEntriesMap::Hash(object)); |
| 759 cache_entry->value = const_cast<char*>(tag); | 759 cache_entry->value = const_cast<char*>(tag); |
| 760 } | 760 } |
| 761 | 761 |
| 762 | 762 |
| 763 V8HeapExplorer::V8HeapExplorer( | 763 V8HeapExplorer::V8HeapExplorer( |
| 764 HeapSnapshot* snapshot, | 764 HeapSnapshot* snapshot, |
| (...skipping 2343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3108 for (int i = 1; i < sorted_strings.length(); ++i) { | 3108 for (int i = 1; i < sorted_strings.length(); ++i) { |
| 3109 writer_->AddCharacter(','); | 3109 writer_->AddCharacter(','); |
| 3110 SerializeString(sorted_strings[i]); | 3110 SerializeString(sorted_strings[i]); |
| 3111 if (writer_->aborted()) return; | 3111 if (writer_->aborted()) return; |
| 3112 } | 3112 } |
| 3113 } | 3113 } |
| 3114 | 3114 |
| 3115 | 3115 |
| 3116 } // namespace internal | 3116 } // namespace internal |
| 3117 } // namespace v8 | 3117 } // namespace v8 |
| OLD | NEW |