AndroidRuntime: when CheckJNI is enabled log a message
This matches behaviour described in: https://developer.android.com/training/articles/perf-jni#extended-checking All output from CheckJNI state was disabled as part of quietening logspam, but now we log a message only if CheckJNI is enabled. CheckJNI is off by default and only used as a developer correctness tool. Bug: N/A Test: adb root; adb shell stop; \ adb shell setprop dalvik.vm.checkjni 1; \ adb shell start; adb logcat -d | grep CheckJNI Change-Id: I93bc2d097a8769b7768c633b705b29fc1aac634a
This commit is contained in:
@@ -746,8 +746,9 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote, bool p
|
||||
}
|
||||
|
||||
const bool checkJni = GetBoolProperty("dalvik.vm.checkjni", false);
|
||||
ALOGV("CheckJNI is %s\n", checkJni ? "ON" : "OFF");
|
||||
if (checkJni) {
|
||||
ALOGD("CheckJNI is ON");
|
||||
|
||||
/* extended JNI checking */
|
||||
addOption("-Xcheck:jni");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user