• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/corennnnn


Commit MetaInfo

Revision968827ed27ae575a9906b1a27bc2b5f680a714b6 (tree)
Zeit2016-09-12 23:49:56
AutorLinux Build Service Account <lnxbuild@loca...>
CommiterLinux Build Service Account

Log Message

Merge e6784dcee14eaa54bafb49a6e495b670827076b8 on remote branch

Change-Id: I2c8baf7092fc4c9d8667ed9d5d61e94fb3716e16

Ändern Zusammenfassung

Diff

--- a/debuggerd/debuggerd.cpp
+++ b/debuggerd/debuggerd.cpp
@@ -671,7 +671,8 @@ static void worker_process(int fd, debugger_request_t& request) {
671671 }
672672
673673 static void monitor_worker_process(int child_pid, const debugger_request_t& request) {
674- struct timespec timeout = {.tv_sec = 10, .tv_nsec = 0 };
674+ // set the timeout to 3 sec, for trace collection
675+ struct timespec timeout = {.tv_sec = 3, .tv_nsec = 0 };
675676 if (should_attach_gdb(request)) {
676677 // If wait_for_gdb is enabled, set the timeout to something large.
677678 timeout.tv_sec = INT_MAX;
--- a/libcutils/debugger.c
+++ b/libcutils/debugger.c
@@ -76,7 +76,9 @@ static int make_dump_request(debugger_action_t action, pid_t tid, int timeout_se
7676 }
7777
7878 int dump_backtrace_to_file(pid_t tid, int fd) {
79- return dump_backtrace_to_file_timeout(tid, fd, 0);
79+ // Kind of a hack;
80+ // Use a timeout of 5 seconds for a given native proc
81+ return dump_backtrace_to_file_timeout(tid, fd, 5);
8082 }
8183
8284 int dump_backtrace_to_file_timeout(pid_t tid, int fd, int timeout_secs) {
@@ -89,13 +91,23 @@ int dump_backtrace_to_file_timeout(pid_t tid, int fd, int timeout_secs) {
8991 int result = 0;
9092 char buffer[1024];
9193 ssize_t n;
94+ int flag = 0;
95+
9296 while ((n = TEMP_FAILURE_RETRY(read(sock_fd, buffer, sizeof(buffer)))) > 0) {
97+ flag = 1;
9398 if (TEMP_FAILURE_RETRY(write(fd, buffer, n)) != n) {
9499 result = -1;
95100 break;
96101 }
97102 }
98103 close(sock_fd);
104+
105+ if (flag == 0) {
106+ ALOGE("Not even a single byte was read from debuggerd, for pid: %d", tid);
107+ }
108+ if (result == -1) {
109+ ALOGE("Failure(probably timeout) while reading data from debuggerd, for pid: %d", tid);
110+ }
99111 return result;
100112 }
101113
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -532,6 +532,7 @@ on boot
532532 chown system system /sys/class/leds/button-backlight/brightness
533533 chown system system /sys/class/leds/jogball-backlight/brightness
534534 chown system system /sys/class/leds/red/brightness
535+ chown system system /sys/class/leds/red/blink
535536 chown system system /sys/class/leds/green/brightness
536537 chown system system /sys/class/leds/blue/brightness
537538 chown system system /sys/class/leds/red/device/grpfreq