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

Unified Diff: runtime/vm/profiler.h

Issue 2363413004: VM: Avoid allocating strings when disassembling code. (Closed)
Patch Set: addressed comments Created 4 years, 3 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/object_test.cc ('k') | runtime/vm/profiler_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.h
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
index be4f0498a21597892dd3f5af43f8a9eed5201c60..529a193992fb1da176e8419c14dcfa02cbb4e937 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -434,8 +434,7 @@ class CodeDescriptor : public ZoneAllocated {
}
const char* Name() const {
- const String& name = String::Handle(code_.Name());
- return name.ToCString();
+ return code_.Name();
}
bool Contains(uword pc) const {
« no previous file with comments | « runtime/vm/object_test.cc ('k') | runtime/vm/profiler_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698