Merge "Revert "Make AndroidRuntime only start the debugger for zygote forked apps.""

am: b3cef78e8d

Change-Id: I489a9ed838033ba72a62fb6241093b89b3fb54b2
This commit is contained in:
David Brazdil
2018-01-31 13:20:42 +00:00
committed by android-build-merger

View File

@@ -761,17 +761,18 @@ 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:");