summaryrefslogtreecommitdiff
path: root/cmds/dumpstate/dumpstate.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2019-10-08 13:53:28 -0700
committer Steven Moreland <smoreland@google.com> 2019-10-11 12:52:19 -0700
commit5a30d34320a60cc81da28a544233419b011c6f45 (patch)
tree44ec8f5ce240e2ae705845f0cf3b30ac209b807a /cmds/dumpstate/dumpstate.cpp
parent3f6764362eae1126f0c86d28f2489ef9116ce40d (diff)
dumpsys: add --pid option
We can't change the output format of dumpsys since too many places rely on it, so introducing a separate option to dump the PID of a service. Fixes: 141187318 Test: dumpsys_test, bugreport, also: $ adb shell dumpsys --pid ... ------------------------------------------------------------------------------- DUMP OF SERVICE package_native: 1165 --------- 0.001s was the duration of dumpsys package_native, ending at: 2019-10-08 20:35:32 ... (dumps pids of all services) or with specific service name only: $ dumpsys --pid package_native 1165 Change-Id: Iaa2478568245ca7d10d2e3f8ebafe43d2d26df2c
Diffstat (limited to 'cmds/dumpstate/dumpstate.cpp')
-rw-r--r--cmds/dumpstate/dumpstate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index 739f9ca8e3..67f12e8efe 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -1082,7 +1082,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(service, args);
+ status_t status = dumpsys.startDumpThread(Dumpsys::Type::DUMP, service, args);
if (status == OK) {
dumpsys.writeDumpHeader(STDOUT_FILENO, service, priority);
std::chrono::duration<double> elapsed_seconds;
@@ -1154,7 +1154,7 @@ static Dumpstate::RunStatus RunDumpsysProto(const std::string& title, int priori
path.append("_HIGH");
}
path.append(kProtoExt);
- status_t status = dumpsys.startDumpThread(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);