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

Commit d40d76a7 authored by Gavin Corkery's avatar Gavin Corkery Committed by Gerrit Code Review
Browse files

Merge "Increase meminfo dumpsys timeout"

parents fb2bda2d fac7e2b5
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1240,8 +1240,15 @@ static Dumpstate::RunStatus RunDumpsysTextByPriority(const std::string& title, i
        if (status == OK) {
            dumpsys.writeDumpHeader(STDOUT_FILENO, service, priority);
            std::chrono::duration<double> elapsed_seconds;
            if (priority == IServiceManager::DUMP_FLAG_PRIORITY_HIGH &&
                service == String16("meminfo")) {
                // Use a longer timeout for meminfo, since 30s is not always enough.
                status = dumpsys.writeDump(STDOUT_FILENO, service, 60s,
                                           /* as_proto = */ false, elapsed_seconds, bytes_written);
            } else {
                status = dumpsys.writeDump(STDOUT_FILENO, service, service_timeout,
                                           /* as_proto = */ false, elapsed_seconds, bytes_written);
            }
            dumpsys.writeDumpFooter(STDOUT_FILENO, service, elapsed_seconds);
            bool dump_complete = (status == OK);
            dumpsys.stopDumpThread(dump_complete);