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

Unified Diff: runtime/vm/object.cc

Issue 965593002: Improved profiler view and inclusive profile tree (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index f93e45982f9a1d4320e66f1f2739854b78e3ed0f..c9bb3e1ac5cbb8118f6ee5aeb42297ab37fac4f7 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -12523,11 +12523,16 @@ void Code::PrintJSONImpl(JSONStream* stream, bool ref) const {
jsobj.AddPropertyF("end", "%" Px "", EntryPoint() + Size());
jsobj.AddProperty("optimized", is_optimized());
jsobj.AddProperty("alive", is_alive());
- jsobj.AddProperty("kind", "Dart");
+ const Object& obj = Object::Handle(owner());
+ const bool is_stub = !obj.IsFunction();
siva 2015/03/02 21:58:44 It might be cleaner to have a bool IsStub() const
+ if (is_stub) {
+ jsobj.AddProperty("kind", "Stub");
+ } else {
+ jsobj.AddProperty("kind", "Dart");
+ }
const String& user_name = String::Handle(PrettyName());
const String& vm_name = String::Handle(Name());
AddNameProperties(&jsobj, user_name, vm_name);
- const Object& obj = Object::Handle(owner());
if (obj.IsFunction()) {
jsobj.AddProperty("function", obj);
} else {
@@ -12535,7 +12540,6 @@ void Code::PrintJSONImpl(JSONStream* stream, bool ref) const {
JSONObject func(&jsobj, "function");
func.AddProperty("type", "@Function");
func.AddProperty("kind", "Stub");
- func.AddPropertyF("id", "functions/stub-%" Pd "", EntryPoint());
func.AddProperty("name", user_name.ToCString());
AddNameProperties(&func, user_name, vm_name);
}

Powered by Google App Engine
This is Rietveld 408576698