OSDN Git Service

Turn on third-party JNI logging if the relevant bit is set.
authorElliott Hughes <enh@google.com>
Thu, 7 Jul 2011 00:26:38 +0000 (17:26 -0700)
committerElliott Hughes <enh@google.com>
Thu, 7 Jul 2011 00:26:38 +0000 (17:26 -0700)
Change-Id: I3260233516fa2d57c4876056168d31881d8666a9

vm/native/dalvik_system_Zygote.cpp

index 4d574e0..31fecfd 100644 (file)
@@ -39,6 +39,7 @@ enum {
     DEBUG_ENABLE_CHECKJNI           = 1 << 1,
     DEBUG_ENABLE_ASSERT             = 1 << 2,
     DEBUG_ENABLE_SAFEMODE           = 1 << 3,
+    DEBUG_ENABLE_JNI_LOGGING        = 1 << 4,
 };
 
 /*
@@ -285,6 +286,10 @@ static void enableDebugFeatures(u4 debugFlags)
         dvmLateEnableCheckedJni();
     }
 
+    if ((debugFlags & DEBUG_ENABLE_JNI_LOGGING) != 0) {
+        gDvmJni.logThirdPartyJni = true;
+    }
+
     if ((debugFlags & DEBUG_ENABLE_ASSERT) != 0) {
         /* turn it on if it's not already enabled */
         dvmLateEnableAssertions();