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

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

Issue 2189633003: Force v8::internal::HeapObjectsSet::SetTag to be out-of-lined. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | 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 "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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698