summaryrefslogtreecommitdiffstats
path: root/cmds/dumpstate/dumpstate.c
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-03-18 02:11:06 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-03-18 02:11:06 +0100
commitdcadad708abe4fc3b5dfe122618f3f8d3a19e614 (patch)
tree258a05e0d0a8b9b3f1bffba3974aa95cdfd1f61a /cmds/dumpstate/dumpstate.c
parent932ec6cd7ae0fda0c186870c29c210a6afc8e692 (diff)
parent65a4c0c045185e8bf5ad54ef8db2a3dbbf6c2813 (diff)
downloadframeworks_native-dcadad708abe4fc3b5dfe122618f3f8d3a19e614.zip
frameworks_native-dcadad708abe4fc3b5dfe122618f3f8d3a19e614.tar.gz
frameworks_native-dcadad708abe4fc3b5dfe122618f3f8d3a19e614.tar.bz2
Merge branch 'cm-13.0' of https://github.com/CyanogenMod/android_frameworks_native into replicant-6.0
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Diffstat (limited to 'cmds/dumpstate/dumpstate.c')
-rw-r--r--cmds/dumpstate/dumpstate.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c
index 792f015..a2e4f4b 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. */
@@ -261,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;
@@ -333,23 +336,25 @@ 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);
run_command("LOG STATISTICS", 10, "logcat", "-b", "all", "-S", 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) {
dump_file("VM TRACES JUST NOW", dump_traces_path);