summaryrefslogtreecommitdiffstats
path: root/core/java/android/os/Process.java
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2011-07-06 17:33:27 -0700
committerElliott Hughes <enh@google.com>2011-07-06 17:33:27 -0700
commitae07ecf3766c38af1c12822458b98036b28bd4c0 (patch)
treeb8205305fd7ed12016101ee81c498dddafdfd179 /core/java/android/os/Process.java
parenta0c26920b69a290869c44f97b1916506ee8d0a91 (diff)
downloadframeworks_base-ae07ecf3766c38af1c12822458b98036b28bd4c0.zip
frameworks_base-ae07ecf3766c38af1c12822458b98036b28bd4c0.tar.gz
frameworks_base-ae07ecf3766c38af1c12822458b98036b28bd4c0.tar.bz2
Add the "debug.jni.logging" property so third-party developers can debug their JNI problems.
This turns on the super-verbose but indispensible logging of all native method calls and all calls to JNI functions (for third-party code only). In particular, if you have a local reference bug, you can search for the reference given in the crash and see exactly where it came from. In every case I've seen so far, that's pinpointed the bug exactly. Change-Id: Ifb7ba02ae637bdd53cd8500febdcb9d4d7799bda
Diffstat (limited to 'core/java/android/os/Process.java')
-rw-r--r--core/java/android/os/Process.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index 05e39ac..673b187 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -522,6 +522,9 @@ public class Process {
argsForZygote.add("--runtime-init");
argsForZygote.add("--setuid=" + uid);
argsForZygote.add("--setgid=" + gid);
+ if ((debugFlags & Zygote.DEBUG_ENABLE_JNI_LOGGING) != 0) {
+ argsForZygote.add("--enable-jni-logging");
+ }
if ((debugFlags & Zygote.DEBUG_ENABLE_SAFEMODE) != 0) {
argsForZygote.add("--enable-safemode");
}