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

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

Issue 2452543003: Don't wrap roots in Handle just to dereference immediately. (Closed)
Patch Set: Created 4 years, 1 month 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/objects-inl.h ('k') | src/regexp/jsregexp.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 // 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 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 SetInternalReference(map, entry, "weak_cell_cache", map->weak_cell_cache(), 1305 SetInternalReference(map, entry, "weak_cell_cache", map->weak_cell_cache(),
1306 Map::kWeakCellCacheOffset); 1306 Map::kWeakCellCacheOffset);
1307 } 1307 }
1308 1308
1309 1309
1310 void V8HeapExplorer::ExtractSharedFunctionInfoReferences( 1310 void V8HeapExplorer::ExtractSharedFunctionInfoReferences(
1311 int entry, SharedFunctionInfo* shared) { 1311 int entry, SharedFunctionInfo* shared) {
1312 HeapObject* obj = shared; 1312 HeapObject* obj = shared;
1313 String* shared_name = shared->DebugName(); 1313 String* shared_name = shared->DebugName();
1314 const char* name = NULL; 1314 const char* name = NULL;
1315 if (shared_name != *heap_->isolate()->factory()->empty_string()) { 1315 if (shared_name != heap_->empty_string()) {
1316 name = names_->GetName(shared_name); 1316 name = names_->GetName(shared_name);
1317 TagObject(shared->code(), names_->GetFormatted("(code for %s)", name)); 1317 TagObject(shared->code(), names_->GetFormatted("(code for %s)", name));
1318 } else { 1318 } else {
1319 TagObject(shared->code(), names_->GetFormatted("(%s code)", 1319 TagObject(shared->code(), names_->GetFormatted("(%s code)",
1320 Code::Kind2String(shared->code()->kind()))); 1320 Code::Kind2String(shared->code()->kind())));
1321 } 1321 }
1322 1322
1323 SetInternalReference(obj, entry, 1323 SetInternalReference(obj, entry,
1324 "name", shared->name(), 1324 "name", shared->name(),
1325 SharedFunctionInfo::kNameOffset); 1325 SharedFunctionInfo::kNameOffset);
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after
3114 for (int i = 1; i < sorted_strings.length(); ++i) { 3114 for (int i = 1; i < sorted_strings.length(); ++i) {
3115 writer_->AddCharacter(','); 3115 writer_->AddCharacter(',');
3116 SerializeString(sorted_strings[i]); 3116 SerializeString(sorted_strings[i]);
3117 if (writer_->aborted()) return; 3117 if (writer_->aborted()) return;
3118 } 3118 }
3119 } 3119 }
3120 3120
3121 3121
3122 } // namespace internal 3122 } // namespace internal
3123 } // namespace v8 3123 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/regexp/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698