aboutsummaryrefslogtreecommitdiffstats
path: root/libc/bionic/pthread.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-01-17 18:36:06 -0800
committerElliott Hughes <enh@google.com>2013-01-18 22:20:06 -0800
commit1e980b6bc8315d00a07312b25486531247abd98c (patch)
tree539f2c0c63fca27d5eb6ba184d658bb0e11a32d9 /libc/bionic/pthread.c
parente4ca88d9fa8757e4fb4056fcafa5bc15b406a2fd (diff)
downloadandroid_bionic-1e980b6bc8315d00a07312b25486531247abd98c.tar.gz
android_bionic-1e980b6bc8315d00a07312b25486531247abd98c.tar.bz2
android_bionic-1e980b6bc8315d00a07312b25486531247abd98c.zip
Fix the duplication in the debugging code.
We had two copies of the backtrace code, and two copies of the libcorkscrew /proc/pid/maps code. This patch gets us down to one. We also had hacks so we could log in the malloc debugging code. This patch pulls the non-allocating "printf" code out of the dynamic linker so everyone can share. This patch also makes the leak diagnostics easier to read, and makes it possible to paste them directly into the 'stack' tool (by using relative PCs). This patch also fixes the stdio standard stream leak that was causing a leak warning every time tf_daemon ran. Bug: 7291287 Change-Id: I66e4083ac2c5606c8d2737cb45c8ac8a32c7cfe8
Diffstat (limited to 'libc/bionic/pthread.c')
-rw-r--r--libc/bionic/pthread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/bionic/pthread.c b/libc/bionic/pthread.c
index f29472379..f2a7ebe44 100644
--- a/libc/bionic/pthread.c
+++ b/libc/bionic/pthread.c
@@ -50,6 +50,7 @@
#include "bionic_pthread.h"
#include "bionic_ssp.h"
#include "bionic_tls.h"
+#include "debug_format.h"
#include "pthread_internal.h"
#include "thread_private.h"
@@ -229,7 +230,7 @@ int _init_thread(pthread_internal_t* thread, pid_t kernel_id, const pthread_attr
// For backwards compatibility reasons, we just warn about failures here.
// error = errno;
const char* msg = "pthread_create sched_setscheduler call failed: %s\n";
- __libc_android_log_print(ANDROID_LOG_WARN, "libc", msg, strerror(errno));
+ __libc_format_log(ANDROID_LOG_WARN, "libc", msg, strerror(errno));
}
}