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

Unified Diff: runtime/vm/object_service.cc

Issue 2742333007: Add Observatory support for UnlinkedCall, SingleTargetCache and SubtypeTestCache. (Closed)
Patch Set: . Created 3 years, 9 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/observatory/observatory_sources.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_service.cc
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index 8cf15a8b97a15203ee5f19a65f1d9cc233424655..fe9566c0f9859ce8fb6dcfb3e48b47627e1533ad 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -756,12 +756,27 @@ void ExceptionHandlers::PrintJSONImpl(JSONStream* stream, bool ref) const {
void SingleTargetCache::PrintJSONImpl(JSONStream* stream, bool ref) const {
- Object::PrintJSONImpl(stream, ref);
+ JSONObject jsobj(stream);
+ AddCommonObjectProperties(&jsobj, "Object", ref);
+ jsobj.AddServiceId(*this);
+ jsobj.AddProperty("_target", Code::Handle(target()));
+ if (ref) {
+ return;
+ }
+ jsobj.AddProperty("_lowerLimit", lower_limit());
+ jsobj.AddProperty("_upperLimit", upper_limit());
}
void UnlinkedCall::PrintJSONImpl(JSONStream* stream, bool ref) const {
- Object::PrintJSONImpl(stream, ref);
+ JSONObject jsobj(stream);
+ AddCommonObjectProperties(&jsobj, "Object", ref);
+ jsobj.AddServiceId(*this);
+ jsobj.AddProperty("_selector", String::Handle(target_name()).ToCString());
+ if (ref) {
+ return;
+ }
+ jsobj.AddProperty("_argumentsDescriptor", Array::Handle(args_descriptor()));
}
@@ -925,7 +940,13 @@ void MegamorphicCache::PrintJSONImpl(JSONStream* stream, bool ref) const {
void SubtypeTestCache::PrintJSONImpl(JSONStream* stream, bool ref) const {
- Object::PrintJSONImpl(stream, ref);
+ JSONObject jsobj(stream);
+ AddCommonObjectProperties(&jsobj, "Object", ref);
+ jsobj.AddServiceId(*this);
+ if (ref) {
+ return;
+ }
+ jsobj.AddProperty("_cache", Array::Handle(cache()));
}
« no previous file with comments | « runtime/observatory/observatory_sources.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698