summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2019-04-01 16:24:14 -0700
committer android-build-merger <android-build-merger@google.com> 2019-04-01 16:24:14 -0700
commitefeaad32256b562c10db11460264c603bda9198b (patch)
tree7434589767b4d17b1599b4d1ef005f7b82edc10e
parent4e32ac77549ea4f1d1d77a51c4fdf028b2be7ec7 (diff)
parent72e80b5b1a727e8f4aad628137d0c2be6c03e423 (diff)
Merge "Pass debug.allocTracker.stackDepth to runtime if it exists"
am: 72e80b5b1a Change-Id: Iaf05e6a285dbf626854a3b37101bea032af3a7a8
-rw-r--r--core/java/android/app/ActivityThread.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 9bc719eae223..7cd1b087d9ca 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -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);
}