Merge "Pass debug.allocTracker.stackDepth to runtime if it exists"

am: 72e80b5b1a

Change-Id: Iaf05e6a285dbf626854a3b37101bea032af3a7a8
This commit is contained in:
Mathieu Chartier
2019-04-01 16:24:14 -07:00
committed by android-build-merger

View File

@@ -5659,6 +5659,11 @@ public final class ActivityThread extends ClientTransactionHandler {
private void handleBindApplication(AppBindData data) {
// Register the UI Thread as a sensitive thread to the runtime.
VMRuntime.registerSensitiveThread();
// In the case the stack depth property exists, pass it down to the runtime.
String property = SystemProperties.get("debug.allocTracker.stackDepth");
if (property.length() != 0) {
VMDebug.setAllocTrackerStackDepth(Integer.parseInt(property));
}
if (data.trackAllocation) {
DdmVmInternal.enableRecentAllocations(true);
}