diff options
| author | 2018-03-23 10:50:32 +0000 | |
|---|---|---|
| committer | 2018-03-23 10:50:32 +0000 | |
| commit | 5c3521d54fb8a3638d1246110bea0147110feb60 (patch) | |
| tree | db3169a3472fab21e4c8553ff1e13542e88de623 | |
| parent | 9d9782ec7edecd5533ac655569bb357f02f25817 (diff) | |
| parent | 28a89370f02b0c33d9580e870da086b7391d1500 (diff) | |
Merge "Fix mini-debug-info generation for apps with wrap.sh script."
| -rw-r--r-- | core/java/com/android/internal/os/WrapperInit.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/com/android/internal/os/WrapperInit.java b/core/java/com/android/internal/os/WrapperInit.java index 49010802c784..f0e779694c90 100644 --- a/core/java/com/android/internal/os/WrapperInit.java +++ b/core/java/com/android/internal/os/WrapperInit.java @@ -115,6 +115,14 @@ public class WrapperInit { command.append(' '); command.append(appProcess); + // Generate bare minimum of debug information to be able to backtrace through JITed code. + // We assume that if the invoke wrapper is used, backtraces are desirable: + // * The wrap.sh script can only be used by debuggable apps, which would enable this flag + // without the script anyway (the fork-zygote path). So this makes the two consistent. + // * The wrap.* property can only be used on userdebug builds and is likely to be used by + // developers (e.g. enable debug-malloc), in which case backtraces are also useful. + command.append(" -Xcompiler-option --generate-mini-debug-info"); + command.append(" /system/bin --application"); if (niceName != null) { command.append(" '--nice-name=").append(niceName).append("'"); |