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

Unified Diff: runtime/vm/object_store.cc

Issue 2012333002: Make the object store visible in Observatory. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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_store.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_store.cc
diff --git a/runtime/vm/object_store.cc b/runtime/vm/object_store.cc
index 9affdcb0fd0f881663df459f2911fa1d17529c94..e1ca9dd94a742f09d812450556660023be87edca 100644
--- a/runtime/vm/object_store.cc
+++ b/runtime/vm/object_store.cc
@@ -120,6 +120,24 @@ void ObjectStore::Init(Isolate* isolate) {
}
+void ObjectStore::PrintToJSONObject(JSONObject* jsobj) {
+ if (!FLAG_support_service) {
+ return;
+ }
+ jsobj->AddProperty("type", "_ObjectStore");
+
+ {
+ JSONObject fields(jsobj, "fields");
+ Object& value = Object::Handle();
+#define PRINT_OBJECT_STORE_FIELD(type, name) \
+ value = name; \
+ fields.AddProperty(#name, value);
+OBJECT_STORE_FIELD_LIST(PRINT_OBJECT_STORE_FIELD);
+#undef PRINT_OBJECT_STORE_FIELD
+ }
+}
+
+
RawError* ObjectStore::PreallocateObjects() {
Thread* thread = Thread::Current();
Isolate* isolate = thread->isolate();
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698