From d2edbaff37663cb3aaef3ddf1d0db7fab746dc8a Mon Sep 17 00:00:00 2001 From: Eric House Date: Thu, 4 Aug 2016 06:46:34 -0700 Subject: [PATCH] log more about jni thread mapping --- xwords4/android/XWords4/jni/xwjni.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xwords4/android/XWords4/jni/xwjni.c b/xwords4/android/XWords4/jni/xwjni.c index 09365a86c..7caf96015 100644 --- a/xwords4/android/XWords4/jni/xwjni.c +++ b/xwords4/android/XWords4/jni/xwjni.c @@ -62,7 +62,8 @@ typedef struct _JNIGlobalState { MPSLOT } JNIGlobalState; -// #define LOG_MAPPING +#define LOG_MAPPING +// #define LOG_MAPPING_ALL #define GAMEPTR_IS_OBJECT #ifdef GAMEPTR_IS_OBJECT @@ -79,7 +80,9 @@ countUsed(const EnvThreadInfo* ti) for ( int ii = 0; ii < ti->nEntries; ++ii ) { EnvThreadEntry* entry = &ti->entries[ii]; if ( 0 != entry->owner ) { +# ifdef LOG_MAPPING_ALL XP_LOGF( "%s(): ii=%d; owner: %x", __func__, ii, (unsigned int)entry->owner ); +# endif ++count; } } @@ -145,7 +148,7 @@ map_thread( EnvThreadInfo* ti, JNIEnv* env ) } pthread_mutex_unlock( &ti->mtxThreads ); -} +} /* map_thread */ static void map_init( MPFORMAL EnvThreadInfo* ti, JNIEnv* env )