From 8d4cb7ffc11050eebb4d06684e0eb14d9aadacb5 Mon Sep 17 00:00:00 2001 From: Sharvil Nanavati Date: Fri, 24 Jul 2015 02:01:13 -0700 Subject: Dump raft logs in bugreports if they exist. Change-Id: I7773b8b86675d9ebf3f6d158eaaa11e47619800e --- cmds/dumpstate/dumpstate.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cmds') diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c index 1d9e6b8..58e2dc6 100644 --- a/cmds/dumpstate/dumpstate.c +++ b/cmds/dumpstate/dumpstate.c @@ -47,6 +47,7 @@ static char screenshot_path[PATH_MAX] = ""; #define PSTORE_LAST_KMSG "/sys/fs/pstore/console-ramoops" +#define RAFT_DIR "/data/misc/raft/" #define TOMBSTONE_DIR "/data/tombstones" #define TOMBSTONE_FILE_PREFIX TOMBSTONE_DIR "/tombstone_" /* Can accomodate a tombstone number up to 9999. */ @@ -348,6 +349,8 @@ static void dumpstate() { } run_command("RADIO LOG", timeout / 1000, "logcat", "-b", "radio", "-v", "threadtime", "-d", "*:v", NULL); + run_command("RAFT LOGS", 300, SU_PATH, "root", "logcompressor", "-r", RAFT_DIR, NULL); + /* show the traces we collected in main(), if that was done */ if (dump_traces_path != NULL) { dump_file("VM TRACES JUST NOW", dump_traces_path); -- cgit v1.1 From 72da7fb77cc0aaeb272b0359679c841d02d5edfe Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Mon, 28 Sep 2015 08:55:01 -0700 Subject: Installd: Fully decouple pre- and post-bootcomplete properties Do not fall back to dalvik.vm.dex2oat-threads if dalvik.vm.boot-dex2oat-threads is not set. Also do not ever use the value of dalvik.vm.image-dex2oat-threads. Instead use the default behavior of dex2oat in that situation. (cherry picked from commit 919461cbeef3e9f35388fc099a5fcdae1cb79cc6) Bug: 24413760 Change-Id: I42e60996341414b95b8df2d243d5e07f7f5ff9b6 --- cmds/installd/commands.cpp | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'cmds') diff --git a/cmds/installd/commands.cpp b/cmds/installd/commands.cpp index d4aa7d3..c05a3d3 100644 --- a/cmds/installd/commands.cpp +++ b/cmds/installd/commands.cpp @@ -770,24 +770,11 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name, dex2oat_compiler_filter_flag, NULL) > 0; char dex2oat_threads_buf[PROPERTY_VALUE_MAX]; - bool have_dex2oat_threads_flag = false; - if (!post_bootcomplete) { - have_dex2oat_threads_flag = property_get("dalvik.vm.boot-dex2oat-threads", - dex2oat_threads_buf, - NULL) > 0; - // If there's no boot property, fall back to the image property. - if (!have_dex2oat_threads_flag) { - have_dex2oat_threads_flag = property_get("dalvik.vm.image-dex2oat-threads", - dex2oat_threads_buf, - NULL) > 0; - } - // If there's neither, fall back to the default property. - } - if (!have_dex2oat_threads_flag) { - have_dex2oat_threads_flag = property_get("dalvik.vm.dex2oat-threads", - dex2oat_threads_buf, - NULL) > 0; - } + bool have_dex2oat_threads_flag = property_get(post_bootcomplete + ? "dalvik.vm.dex2oat-threads" + : "dalvik.vm.boot-dex2oat-threads", + dex2oat_threads_buf, + NULL) > 0; char dex2oat_threads_arg[PROPERTY_VALUE_MAX + 2]; if (have_dex2oat_threads_flag) { sprintf(dex2oat_threads_arg, "-j%s", dex2oat_threads_buf); -- cgit v1.1 From 05c862252d5021f55a69281473c67d76e7097422 Mon Sep 17 00:00:00 2001 From: Erik Wolsheimer Date: Fri, 2 Oct 2015 10:02:24 -0700 Subject: do not dumpstate raft BUG: 24159112 Change-Id: I344aa73808992b5f84cb0536201a3ab2eb6f2b3c --- cmds/dumpstate/dumpstate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmds') diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c index 713634c..59c1d12 100644 --- a/cmds/dumpstate/dumpstate.c +++ b/cmds/dumpstate/dumpstate.c @@ -351,7 +351,8 @@ static void dumpstate() { run_command("LOG STATISTICS", 10, "logcat", "-b", "all", "-S", NULL); - run_command("RAFT LOGS", 300, SU_PATH, "root", "logcompressor", "-r", RAFT_DIR, NULL); + // raft disabled as per http://b/24159112 + // run_command("RAFT LOGS", 300, SU_PATH, "root", "logcompressor", "-r", RAFT_DIR, NULL); /* show the traces we collected in main(), if that was done */ if (dump_traces_path != NULL) { -- cgit v1.1 From 31baf8d3c2833d13056b0be679f66ed0e53c8d26 Mon Sep 17 00:00:00 2001 From: Jason Parks Date: Mon, 12 Oct 2015 15:27:10 +0000 Subject: Revert "do not dumpstate raft BUG: 24159112" This reverts commit 05c862252d5021f55a69281473c67d76e7097422. Change-Id: Ib5984796734d2a0e33f47e0fb4e446b787e0d14f --- cmds/dumpstate/dumpstate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cmds') diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c index 59c1d12..713634c 100644 --- a/cmds/dumpstate/dumpstate.c +++ b/cmds/dumpstate/dumpstate.c @@ -351,8 +351,7 @@ static void dumpstate() { run_command("LOG STATISTICS", 10, "logcat", "-b", "all", "-S", NULL); - // raft disabled as per http://b/24159112 - // run_command("RAFT LOGS", 300, SU_PATH, "root", "logcompressor", "-r", RAFT_DIR, NULL); + run_command("RAFT LOGS", 300, SU_PATH, "root", "logcompressor", "-r", RAFT_DIR, NULL); /* show the traces we collected in main(), if that was done */ if (dump_traces_path != NULL) { -- cgit v1.1 From 804339a59e4abcbcf5a50a60ff0543e6b404e572 Mon Sep 17 00:00:00 2001 From: Sharvil Nanavati Date: Fri, 27 Nov 2015 21:04:11 -0800 Subject: Increase raft timeout to 10min so we get complete logs from older devices. Devices like dory get slammed when bugreports are taken and can't compress all the raft logs in the current 5min timeout. Our dogfooders spend their precious time getting us bugreports and then we can't act on them because we have broken raft logs. :( This change bumps up the timeout in the hopes that we can get complete logs from even our slowest devices. Change-Id: I10741a6185b39544f4c0531f0ee74864d74a1aa4 --- cmds/dumpstate/dumpstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds') diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c index 713634c..b88b605 100644 --- a/cmds/dumpstate/dumpstate.c +++ b/cmds/dumpstate/dumpstate.c @@ -351,7 +351,7 @@ static void dumpstate() { run_command("LOG STATISTICS", 10, "logcat", "-b", "all", "-S", NULL); - run_command("RAFT LOGS", 300, SU_PATH, "root", "logcompressor", "-r", RAFT_DIR, NULL); + run_command("RAFT LOGS", 600, SU_PATH, "root", "logcompressor", "-r", RAFT_DIR, NULL); /* show the traces we collected in main(), if that was done */ if (dump_traces_path != NULL) { -- cgit v1.1 From bd65161021cecc8d0cda8a5efb5650ce9782fee9 Mon Sep 17 00:00:00 2001 From: Tim Murray Date: Mon, 30 Nov 2015 10:59:55 -0800 Subject: DO NOT MERGE: add support for new sched tracepoint This tracepoint gives systrace the means to display the reason for uninterruptible sleep. bug 23350688 Change-Id: I9ee5b6904c27bcb5bd67c86fda66d45d0a3c0999 --- cmds/atrace/atrace.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'cmds') diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp index 26c5b4a..7201e77 100644 --- a/cmds/atrace/atrace.cpp +++ b/cmds/atrace/atrace.cpp @@ -93,6 +93,7 @@ static const TracingCategory k_categories[] = { { "sched", "CPU Scheduling", 0, { { REQ, "/sys/kernel/debug/tracing/events/sched/sched_switch/enable" }, { REQ, "/sys/kernel/debug/tracing/events/sched/sched_wakeup/enable" }, + { OPT, "/sys/kernel/debug/tracing/events/sched/sched_blocked_reason/enable" }, } }, { "irq", "IRQ Events", 0, { { REQ, "/sys/kernel/debug/tracing/events/irq/enable" }, -- cgit v1.1 From 03d61d95fa6a321bf26548b320a1a9c8dc78e124 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Fri, 18 Dec 2015 10:14:46 -0800 Subject: dumpstate: increase logcat timeout to 40 seconds (DO NOT MERGE) - temporary measure until root issues can be resolved. Bug: 23685592 Change-Id: Ia33f4e3928a457c3dcd730ad2c2c57d13fbf133d --- cmds/dumpstate/dumpstate.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'cmds') diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c index b88b605..a2e4f4b 100644 --- a/cmds/dumpstate/dumpstate.c +++ b/cmds/dumpstate/dumpstate.c @@ -262,6 +262,8 @@ static unsigned long logcat_timeout(char *name) { /* End copy from system/core/logd/LogBuffer.cpp */ +static const unsigned long logcat_min_timeout = 40000; /* ms */ + /* dumps the current system state to stdout */ static void dumpstate() { unsigned long timeout; @@ -334,18 +336,18 @@ static void dumpstate() { // dump_file("EVENT LOG TAGS", "/etc/event-log-tags"); // calculate timeout timeout = logcat_timeout("main") + logcat_timeout("system") + logcat_timeout("crash"); - if (timeout < 20000) { - timeout = 20000; + if (timeout < logcat_min_timeout) { + timeout = logcat_min_timeout; } run_command("SYSTEM LOG", timeout / 1000, "logcat", "-v", "threadtime", "-d", "*:v", NULL); timeout = logcat_timeout("events"); - if (timeout < 20000) { - timeout = 20000; + if (timeout < logcat_min_timeout) { + timeout = logcat_min_timeout; } run_command("EVENT LOG", timeout / 1000, "logcat", "-b", "events", "-v", "threadtime", "-d", "*:v", NULL); timeout = logcat_timeout("radio"); - if (timeout < 20000) { - timeout = 20000; + if (timeout < logcat_min_timeout) { + timeout = logcat_min_timeout; } run_command("RADIO LOG", timeout / 1000, "logcat", "-b", "radio", "-v", "threadtime", "-d", "*:v", NULL); -- cgit v1.1