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

Commit 6188412d authored by Felipe Leme's avatar Felipe Leme
Browse files

Increased some timeouts.

dumpsys meminfo from 30s to 90s.
Stack traces from 5s to 10s.

Change-Id: Ic420395811b13b4a33118d467af4c7878a55e50e
Fixes: 29275992
parent 194198f5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1315,7 +1315,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 MEMINFO", 90, "dumpsys", "-t", "90", "meminfo", "-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) */
+3 −1
Original line number Diff line number Diff line
@@ -51,6 +51,8 @@

static const int64_t NANOS_PER_SEC = 1000000000;

static const int TRACE_DUMP_TIMEOUT_MS = 10000; // 10 seconds

/* list of native processes to include in the native dumps */
// This matches the /proc/pid/exe link instead of /proc/pid/cmdline.
static const char* native_processes_to_dump[] = {
@@ -1093,7 +1095,7 @@ const char *dump_traces() {

            /* wait for the writable-close notification from inotify */
            struct pollfd pfd = { ifd, POLLIN, 0 };
            int ret = poll(&pfd, 1, 5000);  /* 5 sec timeout */
            int ret = poll(&pfd, 1, TRACE_DUMP_TIMEOUT_MS);
            if (ret < 0) {
                MYLOGE("poll: %s\n", strerror(errno));
            } else if (ret == 0) {