diff options
author | Mike Lockwood <lockwood@android.com> | 2009-10-05 23:23:40 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2009-10-05 23:26:34 -0400 |
commit | bb6fa17558ff9212a48bd4be24aef235814b944e (patch) | |
tree | 679e7d4a2db39140db812f432b0994ae12fcf5dc | |
parent | 5fbaefc3d8840aac12b16458347b3c1ddbdaf542 (diff) | |
download | frameworks_base-bb6fa17558ff9212a48bd4be24aef235814b944e.zip frameworks_base-bb6fa17558ff9212a48bd4be24aef235814b944e.tar.gz frameworks_base-bb6fa17558ff9212a48bd4be24aef235814b944e.tar.bz2 |
dumpstate: Emit a logcat message at beginning and end of execution.
Since the logcat is not printed until later in the output, this will
make it easier to determine at what point the user pressed the key sequence
to initiate the bugreport, which can be helpful when debugging timing dependent problems.
b/2164183
Change-Id: I5b650a6163c383183ff28e344dac36fab11a2c7b
Signed-off-by: Mike Lockwood <lockwood@android.com>
-rw-r--r-- | cmds/dumpstate/dumpstate.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c index 4dda68c..4a71dc6 100644 --- a/cmds/dumpstate/dumpstate.c +++ b/cmds/dumpstate/dumpstate.c @@ -28,6 +28,10 @@ #include <cutils/sockets.h> #include "private/android_filesystem_config.h" +#define LOG_NDEBUG 0 +#define LOG_TAG "dumpstate" +#include <utils/Log.h> + #include "dumpstate.h" static char* const gzip_args[] = { "gzip", "-6", 0 }; @@ -182,6 +186,8 @@ int main(int argc, char *argv[]) { pid_t pid; gid_t groups[] = { AID_LOG, AID_SDCARD_RW }; + LOGI("begin\n"); + /* set as high priority, and protect from OOM killer */ setpriority(PRIO_PROCESS, 0, -20); protect_from_oom_killer(); @@ -332,6 +338,8 @@ int main(int argc, char *argv[]) { /* so gzip will terminate */ close(STDOUT_FILENO); + LOGI("done\n"); + return 0; } |