From cbd69fcb6011fc6b0b054727634a9eb460c661ca Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Tue, 20 Jul 2021 20:45:43 +0000 Subject: dumpsys: dump multiple types of info in one run I was looking at which processes were using too many threads, since almost all services in dumpsys report 0/16 threads out of use, and this looks like a lot of (potentially wasted threads). However, almost all of these come from system_server, so they are actually shared among all of the services. Though, from the existing output of dumpsys, it was a bit hard to actually understand this without comparing two outputs. This still isn't quite like lshal (which has columns), but at least now I can run `dumpsys --thread --pid` and I can see all the services and see their processes to make this analysis easier. Bug: N/A Test: dumpsys_test Change-Id: I88a6c80f4c9aed82b3f5a050b29c13ba86284562 --- cmds/dumpstate/dumpstate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmds/dumpstate/dumpstate.cpp') diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp index 8f466ca57e..1db2867bf2 100644 --- a/cmds/dumpstate/dumpstate.cpp +++ b/cmds/dumpstate/dumpstate.cpp @@ -1236,7 +1236,7 @@ static Dumpstate::RunStatus RunDumpsysTextByPriority(const std::string& title, i std::string path(title); path.append(" - ").append(String8(service).c_str()); size_t bytes_written = 0; - status_t status = dumpsys.startDumpThread(Dumpsys::Type::DUMP, service, args); + status_t status = dumpsys.startDumpThread(Dumpsys::TYPE_DUMP, service, args); if (status == OK) { dumpsys.writeDumpHeader(STDOUT_FILENO, service, priority); std::chrono::duration elapsed_seconds; @@ -1315,7 +1315,7 @@ static Dumpstate::RunStatus RunDumpsysProto(const std::string& title, int priori path.append("_HIGH"); } path.append(kProtoExt); - status_t status = dumpsys.startDumpThread(Dumpsys::Type::DUMP, service, args); + status_t status = dumpsys.startDumpThread(Dumpsys::TYPE_DUMP, service, args); if (status == OK) { status = ds.AddZipEntryFromFd(path, dumpsys.getDumpFd(), service_timeout); bool dumpTerminated = (status == OK); -- cgit v1.2.3-59-g8ed1b