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

Commit 34779822 authored by Chris Manton's avatar Chris Manton
Browse files

dumpsys: Log when each module starts and finished dumpsys

Bug: 342689958
Test: m .
Flag: EXEMPT, Logging Change
Change-Id: I4e47d2df81c76a0e94becc14f154ff7caf699af8
parent a0532fc8
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -55,7 +55,9 @@ void ModuleDumper::DumpState(std::string* output, std::ostringstream& /*oss*/) c
    log::assert_that(
        instance != module_registry_.started_modules_.end(),
        "assert failed: instance != module_registry_.started_modules_.end()");
    log::verbose("Starting dumpsys module:{}", instance->second->ToString());
    queue.push(instance->second->GetDumpsysData(&builder));
    log::verbose("Finished dumpsys module:{}", instance->second->ToString());
  }

  DumpsysDataBuilder data_builder(builder);
+4 −2
Original line number Diff line number Diff line
@@ -152,8 +152,10 @@ void Dumpsys::impl::DumpWithArgsAsync(int fd, const char** args) const {

void Dumpsys::impl::DumpWithArgsSync(int fd, const char** args, std::promise<void> promise) {
  if (com::android::bluetooth::flags::dumpsys_acquire_stack_when_executing()) {
    if (bluetooth::shim::Stack::GetInstance()->LockForDumpsys(
            [=, *this]() { this->DumpWithArgsAsync(fd, args); })) {
    if (bluetooth::shim::Stack::GetInstance()->LockForDumpsys([=, *this]() {
          log::info("Started dumpsys procedure");
          this->DumpWithArgsAsync(fd, args);
        })) {
      log::info("Successful dumpsys procedure");
    } else {
      log::info("Failed dumpsys procedure as stack was not longer active");