Loading cmds/dumpstate/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ cc_binary { ], required: [ "atrace", "bugreport_procdump", "dmabuf_dump", "ip", "iptables", Loading cmds/dumpstate/dumpstate.cpp +2 −15 Original line number Diff line number Diff line Loading @@ -1600,7 +1600,8 @@ static Dumpstate::RunStatus dumpstate() { RunCommand("CPU INFO", {"top", "-b", "-n", "1", "-H", "-s", "6", "-o", "pid,tid,user,pr,ni,%cpu,s,virt,res,pcy,cmd,name"}); RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(RunCommand, "PROCRANK", {"procrank"}, AS_ROOT_20); RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(RunCommand, "BUGREPORT_PROCDUMP", {"bugreport_procdump"}, CommandOptions::AS_ROOT); RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(DumpVisibleWindowViews); Loading @@ -1617,9 +1618,6 @@ static Dumpstate::RunStatus dumpstate() { RunCommand("PROCESSES AND THREADS", {"ps", "-A", "-T", "-Z", "-O", "pri,nice,rtprio,sched,pcy,time"}); RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(RunCommand, "LIBRANK", {"librank"}, CommandOptions::AS_ROOT); if (ds.dump_pool_) { WAIT_TASK_WITH_CONSENT_CHECK(std::move(dump_hals)); } else { Loading Loading @@ -1649,8 +1647,6 @@ static Dumpstate::RunStatus dumpstate() { RunCommand("LIST OF OPEN FILES", {"lsof"}, CommandOptions::AS_ROOT); RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(for_each_pid, do_showmap, "SMAPS OF ALL PROCESSES"); for_each_tid(show_wchan, "BLOCKED PROCESS WAIT-CHANNELS"); for_each_pid(show_showtime, "PROCESS TIMES (pid cmd user system iowait+percentage)"); Loading Loading @@ -3891,15 +3887,6 @@ void do_dmesg() { return; } void do_showmap(int pid, const char *name) { char title[255]; char arg[255]; snprintf(title, sizeof(title), "SHOW MAP %d (%s)", pid, name); snprintf(arg, sizeof(arg), "%d", pid); RunCommand(title, {"showmap", "-q", arg}, CommandOptions::AS_ROOT); } int Dumpstate::DumpFile(const std::string& title, const std::string& path) { DurationReporter duration_reporter(title); Loading cmds/dumpstate/dumpstate.h +0 −3 Original line number Diff line number Diff line Loading @@ -619,9 +619,6 @@ void show_wchan(int pid, int tid, const char *name); /* Displays a processes times */ void show_showtime(int pid, const char *name); /* Runs "showmap" for a process */ void do_showmap(int pid, const char *name); /* Gets the dmesg output for the kernel */ void do_dmesg(); Loading Loading
cmds/dumpstate/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ cc_binary { ], required: [ "atrace", "bugreport_procdump", "dmabuf_dump", "ip", "iptables", Loading
cmds/dumpstate/dumpstate.cpp +2 −15 Original line number Diff line number Diff line Loading @@ -1600,7 +1600,8 @@ static Dumpstate::RunStatus dumpstate() { RunCommand("CPU INFO", {"top", "-b", "-n", "1", "-H", "-s", "6", "-o", "pid,tid,user,pr,ni,%cpu,s,virt,res,pcy,cmd,name"}); RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(RunCommand, "PROCRANK", {"procrank"}, AS_ROOT_20); RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(RunCommand, "BUGREPORT_PROCDUMP", {"bugreport_procdump"}, CommandOptions::AS_ROOT); RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(DumpVisibleWindowViews); Loading @@ -1617,9 +1618,6 @@ static Dumpstate::RunStatus dumpstate() { RunCommand("PROCESSES AND THREADS", {"ps", "-A", "-T", "-Z", "-O", "pri,nice,rtprio,sched,pcy,time"}); RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(RunCommand, "LIBRANK", {"librank"}, CommandOptions::AS_ROOT); if (ds.dump_pool_) { WAIT_TASK_WITH_CONSENT_CHECK(std::move(dump_hals)); } else { Loading Loading @@ -1649,8 +1647,6 @@ static Dumpstate::RunStatus dumpstate() { RunCommand("LIST OF OPEN FILES", {"lsof"}, CommandOptions::AS_ROOT); RUN_SLOW_FUNCTION_WITH_CONSENT_CHECK(for_each_pid, do_showmap, "SMAPS OF ALL PROCESSES"); for_each_tid(show_wchan, "BLOCKED PROCESS WAIT-CHANNELS"); for_each_pid(show_showtime, "PROCESS TIMES (pid cmd user system iowait+percentage)"); Loading Loading @@ -3891,15 +3887,6 @@ void do_dmesg() { return; } void do_showmap(int pid, const char *name) { char title[255]; char arg[255]; snprintf(title, sizeof(title), "SHOW MAP %d (%s)", pid, name); snprintf(arg, sizeof(arg), "%d", pid); RunCommand(title, {"showmap", "-q", arg}, CommandOptions::AS_ROOT); } int Dumpstate::DumpFile(const std::string& title, const std::string& path) { DurationReporter duration_reporter(title); Loading
cmds/dumpstate/dumpstate.h +0 −3 Original line number Diff line number Diff line Loading @@ -619,9 +619,6 @@ void show_wchan(int pid, int tid, const char *name); /* Displays a processes times */ void show_showtime(int pid, const char *name); /* Runs "showmap" for a process */ void do_showmap(int pid, const char *name); /* Gets the dmesg output for the kernel */ void do_dmesg(); Loading