diff options
author | Colin Cross <ccross@android.com> | 2014-07-16 19:00:46 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2014-07-17 12:42:14 -0700 |
commit | 0d6180f122127a9541e6193e0e6eceb5b08c608c (patch) | |
tree | f2cedac0ddf6537e82808243973429cbb0012703 /cmds | |
parent | 8227caaabfdb6c693bac125cffbe559993450258 (diff) | |
download | frameworks_native-0d6180f122127a9541e6193e0e6eceb5b08c608c.zip frameworks_native-0d6180f122127a9541e6193e0e6eceb5b08c608c.tar.gz frameworks_native-0d6180f122127a9541e6193e0e6eceb5b08c608c.tar.bz2 |
dumpstate: fix dumping traces for vm processes on 64-bit
dumpstate was not dumping any stack traces for vm processes because
it was failing the string compare for /system/bin/app_process.
64-bit devices use app_process32 and app_process64 instead of
app_process, and zygote64 alongside zygote. Change the string
matching to be prefix matching.
(cherry picked from commit 8eb25d552b07ffa799b7b61ad46d0109e7512741)
Change-Id: I6b1568161fae278f0e6107990e5b750cf0ca902b
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/dumpstate/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c index 309a004..7694adb 100644 --- a/cmds/dumpstate/utils.c +++ b/cmds/dumpstate/utils.c @@ -565,7 +565,7 @@ const char *dump_traces() { } data[len] = '\0'; - if (!strcmp(data, "/system/bin/app_process")) { + if (!strncmp(data, "/system/bin/app_process", strlen("/system/bin/app_process"))) { /* skip zygote -- it won't dump its stack anyway */ snprintf(path, sizeof(path), "/proc/%d/cmdline", pid); int fd = open(path, O_RDONLY); @@ -575,7 +575,7 @@ const char *dump_traces() { continue; } data[len] = '\0'; - if (!strcmp(data, "zygote")) { + if (!strncmp(data, "zygote", strlen("zygote"))) { continue; } |