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

Unified Diff: runtime/vm/service.cc

Issue 2554983002: Created methods to surface zone memory information for each isolate and thread in JSON. (Closed)
Patch Set: Created methods to surface zone memory information for each isolate and thread in JSON. Created 4 years 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/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index dce3eace094526f7a174917c6e957cd7111e8aa4..aa01c894def742bdaa9eb4996ed1e971b66e9129 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -3758,19 +3758,21 @@ static bool GetVersion(Thread* thread, JSONStream* js) {
class ServiceIsolateVisitor : public IsolateVisitor {
public:
- explicit ServiceIsolateVisitor(JSONArray* jsarr) : jsarr_(jsarr) {}
+ explicit ServiceIsolateVisitor(JSONArray* jsarr, bool ref = true)
zra 2016/12/08 18:54:13 Unless I'm missing something, this class only has
bkonyi 2016/12/08 20:58:32 You're right, it's only instantiated once. I've re
+ : jsarr_(jsarr), ref_(ref) {}
virtual ~ServiceIsolateVisitor() {}
void VisitIsolate(Isolate* isolate) {
if ((isolate != Dart::vm_isolate()) &&
!ServiceIsolate::IsServiceIsolateDescendant(isolate)) {
- jsarr_->AddValue(isolate);
+ jsarr_->AddValue(isolate, ref_);
}
}
private:
JSONArray* jsarr_;
+ bool ref_;
};
@@ -3800,7 +3802,7 @@ void Service::PrintJSONForVM(JSONStream* js, bool ref) {
// Construct the isolate list.
{
JSONArray jsarr(&jsobj, "isolates");
- ServiceIsolateVisitor visitor(&jsarr);
+ ServiceIsolateVisitor visitor(&jsarr, ref);
Isolate::VisitIsolates(&visitor);
}
}

Powered by Google App Engine
This is Rietveld 408576698