summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-04-23 11:35:17 -0700
committerElliott Hughes <enh@google.com>2013-04-23 13:34:20 -0700
commit514eabb960969b513c24f9cdfc8dec94c96d9359 (patch)
tree647f63437972de61c1f3be7f6642bc123707194e
parent739bb122cfc866d599338a9def221e0661b54d20 (diff)
downloaddalvik-514eabb960969b513c24f9cdfc8dec94c96d9359.tar.gz
Remove spammy logging from 8470684 investigation.
This has been tracked down to a kernel bug, so we no longer need the extra diagnostics. Bug: 8470684 (cherry picked from commit 3a9dbd30eb1598c737af7ef6110d46767d6e0336) Change-Id: I0877a24a5a409695c3a1a9ddb5c7c4d78e6a578e
-rw-r--r--vm/Thread.cpp46
1 files changed, 3 insertions, 43 deletions
diff --git a/vm/Thread.cpp b/vm/Thread.cpp
index cfc43486d..7c8395e3f 100644
--- a/vm/Thread.cpp
+++ b/vm/Thread.cpp
@@ -1309,52 +1309,12 @@ bool dvmCreateInterpThread(Object* threadObj, int reqStackSize)
* so use OutOfMemoryError.
*/
-#if HAVE_ANDROID_OS
- struct mallinfo malloc_info;
- malloc_info = mallinfo();
- ALOGE("Native heap free: %zd of %zd bytes", malloc_info.fordblks, malloc_info.uordblks);
-#endif
-
- size_t thread_count = 0;
- DIR* d = opendir("/proc/self/task");
- if (d != NULL) {
- dirent* entry = NULL;
- while ((entry = readdir(d)) != NULL) {
- char* end;
- strtol(entry->d_name, &end, 10);
- if (!*end) {
- ++thread_count;
- }
- }
- closedir(d);
- }
-
- ALOGE("pthread_create (%d threads) failed: %s", thread_count, strerror(cc));
-
- // Super-verbose output to help track down http://b/8470684.
- size_t map_count = 0;
- FILE* fp = fopen("/proc/self/maps", "r");
- if (fp != NULL) {
- char buf[1024];
- while (fgets(buf, sizeof(buf), fp) != NULL) {
- ALOGE("/proc/self/maps: %s", buf);
- ++map_count;
- }
- fclose(fp);
- }
-
dvmSetFieldObject(threadObj, gDvm.offJavaLangThread_vmThread, NULL);
+ ALOGE("pthread_create (stack size %d bytes) failed: %s", stackSize, strerror(cc));
dvmThrowExceptionFmt(gDvm.exOutOfMemoryError,
- "pthread_create (%d threads, %d map entries, "
-#if HAVE_ANDROID_OS
- "%zd free of %zd native heap bytes"
-#endif
- ") failed: %s", thread_count, map_count,
-#if HAVE_ANDROID_OS
- malloc_info.fordblks, malloc_info.uordblks,
-#endif
- strerror(cc));
+ "pthread_create (stack size %d bytes) failed: %s",
+ stackSize, strerror(cc));
goto fail;
}