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

Unified Diff: runtime/vm/disassembler_x64.cc

Issue 182703003: Cleanup native, collected, and stub code handling in profiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/disassembler_ia32.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/disassembler_x64.cc
diff --git a/runtime/vm/disassembler_x64.cc b/runtime/vm/disassembler_x64.cc
index 4d58672329e1be2e79ae3a93330e14a7aab605da..40a0e45309fa041f9b58d12b8ef7005949148252 100644
--- a/runtime/vm/disassembler_x64.cc
+++ b/runtime/vm/disassembler_x64.cc
@@ -802,7 +802,6 @@ static const char* ObjectToCStringNoGC(const Object& obj) {
void DisassemblerX64::AppendAddressToBuffer(uint8_t* addr_byte_ptr) {
- NoGCScope no_gc;
uword addr = reinterpret_cast<uword>(addr_byte_ptr);
AppendToBuffer("%#" Px "", addr);
// Try to print as heap object or stub name
@@ -810,6 +809,7 @@ void DisassemblerX64::AppendAddressToBuffer(uint8_t* addr_byte_ptr) {
reinterpret_cast<RawObject*>(addr)->IsOldObject() &&
!Isolate::Current()->heap()->CodeContains(addr) &&
Disassembler::CanFindOldObject(addr)) {
+ NoGCScope no_gc;
const Object& obj = Object::Handle(reinterpret_cast<RawObject*>(addr));
if (obj.IsArray()) {
const Array& arr = Array::Cast(obj);
@@ -838,13 +838,9 @@ void DisassemblerX64::AppendAddressToBuffer(uint8_t* addr_byte_ptr) {
// Print only if jumping to entry point.
const Code& code = Code::Handle(Code::LookupCode(addr));
if (!code.IsNull() && (code.EntryPoint() == addr)) {
- const Function& function = Function::Handle(code.function());
- if (function.IsNull()) {
- AppendToBuffer(" [ stub ]");
- } else {
- const char* name_of_function = function.ToFullyQualifiedCString();
- AppendToBuffer(" [%s]", name_of_function);
- }
+ const String& name = String::Handle(code.UserName());
+ const char* name_c = name.ToCString();
+ AppendToBuffer(" [%s]", name_c);
}
}
}
« no previous file with comments | « runtime/vm/disassembler_ia32.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698