diff options
| author | 2018-01-30 22:05:48 +0000 | |
|---|---|---|
| committer | 2018-01-30 22:05:48 +0000 | |
| commit | c3ad975aa20e25507d157f2ddb7326b947aa87b9 (patch) | |
| tree | 7f0e345df913fda6c6d03bbf6b724540dfe6d180 | |
| parent | df8ec9fc71403aa53267430757c077fa62866bc2 (diff) | |
| parent | b65fecd875bcccb17274df11d2c351da8817d002 (diff) | |
Merge "Make AndroidRuntime only start the debugger for zygote forked apps." am: 5cdf28f38b am: 710b7c6626
am: b65fecd875
Change-Id: Iddea47fca8954f435c81a63695efdbd18aa30a66
| -rw-r--r-- | core/jni/AndroidRuntime.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index bf7a7794fcc6..720c9a81cd18 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -765,18 +765,17 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote) /* * Enable debugging only for apps forked from zygote. - * Set suspend=y to pause during VM init and use android ADB transport. */ if (zygote) { + // Set the JDWP provider and required arguments. By default let the runtime choose how JDWP is + // implemented. When this is not set the runtime defaults to not allowing JDWP. addOption("-XjdwpOptions:suspend=n,server=y"); + parseRuntimeOption("dalvik.vm.jdwp-provider", + jdwpProviderBuf, + "-XjdwpProvider:", + "default"); } - // Set the JDWP provider. By default let the runtime choose. - parseRuntimeOption("dalvik.vm.jdwp-provider", - jdwpProviderBuf, - "-XjdwpProvider:", - "default"); - parseRuntimeOption("dalvik.vm.lockprof.threshold", lockProfThresholdBuf, "-Xlockprofthreshold:"); |