summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Leme <felipeal@google.com>2016-06-08 09:51:29 -0700
committerFelipe Leme <felipeal@google.com>2016-06-08 09:51:29 -0700
commit7cff462202437da5bba003a8687582af21fa0a0b (patch)
tree85f3b57f95111bbdaf98045131cda12e31057fa0
parent0950fb3d20d100f62961db1cc3eff51b51f9ca6b (diff)
downloadnative-7cff462202437da5bba003a8687582af21fa0a0b.tar.gz
Explicitly sets dumpsys timeout.
The run_command() function takes a timeout as argument, and dumpsys can also optionally takes a timeout with the -t argument, hence it makes sense to pass the same value for both (otherwise dumpsys will timeout in 10s). BUG: 29042642 Change-Id: Ib6e987d94e966686bab71223d7f910af9e549814
-rw-r--r--cmds/dumpstate/dumpstate.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index 1add3469c0..51fdb931e9 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -824,7 +824,7 @@ static void dumpstate(const std::string& screenshot_path, const std::string& ver
#endif
dump_file("INTERRUPTS (1)", "/proc/interrupts");
- run_command("NETWORK DIAGNOSTICS", 10, "dumpsys", "connectivity", "--diag", NULL);
+ run_command("NETWORK DIAGNOSTICS", 10, "dumpsys", "-t", "10", "connectivity", "--diag", NULL);
#ifdef FWDUMP_bcmdhd
run_command("DUMP WIFI STATUS", 20,
@@ -900,30 +900,30 @@ static void dumpstate(const std::string& screenshot_path, const std::string& ver
printf("== Checkins\n");
printf("========================================================\n");
- run_command("CHECKIN BATTERYSTATS", 30, "dumpsys", "batterystats", "-c", NULL);
- run_command("CHECKIN MEMINFO", 30, "dumpsys", "meminfo", "--checkin", NULL);
- run_command("CHECKIN NETSTATS", 30, "dumpsys", "netstats", "--checkin", NULL);
- run_command("CHECKIN PROCSTATS", 30, "dumpsys", "procstats", "-c", NULL);
- run_command("CHECKIN USAGESTATS", 30, "dumpsys", "usagestats", "-c", NULL);
- run_command("CHECKIN PACKAGE", 30, "dumpsys", "package", "--checkin", NULL);
+ run_command("CHECKIN BATTERYSTATS", 30, "dumpsys", "-t", "30", "batterystats", "-c", NULL);
+ run_command("CHECKIN MEMINFO", 30, "dumpsys", "-t", "30", "meminfo", "--checkin", NULL);
+ run_command("CHECKIN NETSTATS", 30, "dumpsys", "-t", "30", "netstats", "--checkin", NULL);
+ run_command("CHECKIN PROCSTATS", 30, "dumpsys", "-t", "30", "procstats", "-c", NULL);
+ run_command("CHECKIN USAGESTATS", 30, "dumpsys", "-t", "30", "usagestats", "-c", NULL);
+ run_command("CHECKIN PACKAGE", 30, "dumpsys", "-t", "30", "package", "--checkin", NULL);
printf("========================================================\n");
printf("== Running Application Activities\n");
printf("========================================================\n");
- run_command("APP ACTIVITIES", 30, "dumpsys", "activity", "all", NULL);
+ run_command("APP ACTIVITIES", 30, "-t", "30", "dumpsys", "activity", "all", NULL);
printf("========================================================\n");
printf("== Running Application Services\n");
printf("========================================================\n");
- run_command("APP SERVICES", 30, "dumpsys", "activity", "service", "all", NULL);
+ run_command("APP SERVICES", 30, "-t", "30", "dumpsys", "activity", "service", "all", NULL);
printf("========================================================\n");
printf("== Running Application Providers\n");
printf("========================================================\n");
- run_command("APP SERVICES", 30, "dumpsys", "activity", "provider", "all", NULL);
+ run_command("APP SERVICES", 30, "-t", "30", "dumpsys", "activity", "provider", "all", NULL);
printf("========================================================\n");
@@ -1278,7 +1278,7 @@ int main(int argc, char *argv[]) {
// Invoking the following dumpsys calls before dump_traces() to try and
// keep the system stats as close to its initial state as possible.
run_command_as_shell("DUMPSYS MEMINFO", 30, "dumpsys", "-t", "30", "meminfo", "-a", NULL);
- run_command_as_shell("DUMPSYS CPUINFO", 10, "dumpsys", "cpuinfo", "-a", NULL);
+ run_command_as_shell("DUMPSYS CPUINFO", 10, "dumpsys", "-t", "10", "cpuinfo", "-a", NULL);
/* collect stack traces from Dalvik and native processes (needs root) */
dump_traces_path = dump_traces();