Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f072e93 authored by Fan Xu's avatar Fan Xu
Browse files

Add BufferClient information to dumpsys

Now "adb shell dumpsys bufferhubd" will tell you how many buffers have
been allocated via the binder service as well.

The reason for not having buffer info is because the info should be
stored with BufferNode, which is yet another pending CL. After
b/117790952 is resolved we can print them.

Test: run "adb shell dumpsys bufferhubd" after "atest
buffer_hub_binder_service-test" should print "Active BufferClients: 1"
Bug: 116526156

Change-Id: I72df3a2d4795bdba0ddf42c1a27a74cd5987f3d8
parent 3cc66c91
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -46,8 +46,14 @@ status_t BufferHubBinderService::dump(int fd, const Vector<String16>& args) {
            "Input arguments are ignored.\n");
            "Input arguments are ignored.\n");
  }
  }


  // TODO(b/116526156): output real data in this class once we have it
  fprintf(out, "Binder service:\n");
  // Active buffers
  fprintf(out, "Active BufferClients: %zu\n", client_list_.size());
  // TODO(b/117790952): print buffer information after BufferNode has it
  // TODO(b/116526156): print more information once we have them

  if (pdx_service_) {
  if (pdx_service_) {
    fprintf(out, "\nPDX service:\n");
    // BufferHubService::Dumpstate(size_t) is not actually using the param
    // BufferHubService::Dumpstate(size_t) is not actually using the param
    // So just using 0 as the length
    // So just using 0 as the length
    fprintf(out, "%s", pdx_service_->DumpState(0).c_str());
    fprintf(out, "%s", pdx_service_->DumpState(0).c_str());