summaryrefslogtreecommitdiffstats
path: root/debuggerd
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-07-29 23:26:05 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-29 23:26:05 +0000
commita9d3ed32e9553b97730ba9fafc4741c91dad7a3b (patch)
tree0aa9f16ecba591194d6b6141042b5a910d4956f8 /debuggerd
parentb81e6cf51c3aef835805bffb881872438073b59e (diff)
parent1d497f8a92994abeb5baeaacdec037268838af20 (diff)
downloadsystem_core-a9d3ed32e9553b97730ba9fafc4741c91dad7a3b.zip
system_core-a9d3ed32e9553b97730ba9fafc4741c91dad7a3b.tar.gz
system_core-a9d3ed32e9553b97730ba9fafc4741c91dad7a3b.tar.bz2
am 1d497f8a: am cddc97cb: Merge "debuggerd: tombstone: suppress logger request for logd process"
* commit '1d497f8a92994abeb5baeaacdec037268838af20': debuggerd: tombstone: suppress logger request for logd process
Diffstat (limited to 'debuggerd')
-rw-r--r--debuggerd/tombstone.cpp10
-rw-r--r--debuggerd/utility.h4
2 files changed, 13 insertions, 1 deletions
diff --git a/debuggerd/tombstone.cpp b/debuggerd/tombstone.cpp
index e447190..df982a9 100644
--- a/debuggerd/tombstone.cpp
+++ b/debuggerd/tombstone.cpp
@@ -210,6 +210,12 @@ static void dump_thread_info(log_t* log, pid_t pid, pid_t tid) {
}
}
}
+ // Blacklist logd, logd.reader, logd.writer, logd.auditd, logd.control ...
+ static const char logd[] = "logd";
+ if (!strncmp(threadname, logd, sizeof(logd) - 1)
+ && (!threadname[sizeof(logd) - 1] || (threadname[sizeof(logd) - 1] == '.'))) {
+ log->should_retrieve_logcat = false;
+ }
char procnamebuf[1024];
char* procname = NULL;
@@ -450,6 +456,10 @@ static void dump_log_file(
bool first = true;
struct logger_list* logger_list;
+ if (!log->should_retrieve_logcat) {
+ return;
+ }
+
logger_list = android_logger_list_open(
android_name_to_log_id(filename), O_RDONLY | O_NONBLOCK, tail, pid);
diff --git a/debuggerd/utility.h b/debuggerd/utility.h
index 31684ce..82413b8 100644
--- a/debuggerd/utility.h
+++ b/debuggerd/utility.h
@@ -46,9 +46,11 @@ struct log_t{
pid_t crashed_tid;
// The tid of the thread we are currently working with.
pid_t current_tid;
+ // logd daemon crash, can block asking for logcat data, allow suppression.
+ bool should_retrieve_logcat;
log_t()
- : tfd(-1), amfd(-1), crashed_tid(-1), current_tid(-1) {}
+ : tfd(-1), amfd(-1), crashed_tid(-1), current_tid(-1), should_retrieve_logcat(true) {}
};
// List of types of logs to simplify the logging decision in _LOG