summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2015-03-21 00:14:27 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-03-21 00:14:27 +0000
commit6dad1713040a46ec6e2ca1b0df2cbe4240e9e2e9 (patch)
treecf565415dfa259cbe049f2ff26506bd77d17ee7a /cmds
parent701473cf9bb1d1da2a0f55d9732d3016e1f33d59 (diff)
parentd4a7b459f4f383988440c0512513b321ce03fc22 (diff)
downloadframeworks_native-6dad1713040a46ec6e2ca1b0df2cbe4240e9e2e9.zip
frameworks_native-6dad1713040a46ec6e2ca1b0df2cbe4240e9e2e9.tar.gz
frameworks_native-6dad1713040a46ec6e2ca1b0df2cbe4240e9e2e9.tar.bz2
Merge "Use verify-at-runtime if debug.usejit is true"
Diffstat (limited to 'cmds')
-rw-r--r--cmds/installd/commands.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index d9376e1..9133a34 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -749,6 +749,10 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name,
(strcmp(vold_decrypt, "trigger_restart_min_framework") == 0 ||
(strcmp(vold_decrypt, "1") == 0)));
+ char use_jit_property[PROPERTY_VALUE_MAX];
+ bool have_jit_property = property_get("debug.usejit", use_jit_property, NULL) > 0;
+ bool use_jit = have_jit_property && strcmp(use_jit_property, "true") == 0;
+
static const char* DEX2OAT_BIN = "/system/bin/dex2oat";
static const char* RUNTIME_ARG = "--runtime-arg";
@@ -813,6 +817,9 @@ static void run_dex2oat(int zip_fd, int oat_fd, const char* input_file_name,
} else if (vm_safe_mode) {
strcpy(dex2oat_compiler_filter_arg, "--compiler-filter=interpret-only");
have_dex2oat_compiler_filter_flag = true;
+ } else if (use_jit) {
+ strcpy(dex2oat_compiler_filter_arg, "--compiler-filter=verify-at-runtime");
+ have_dex2oat_compiler_filter_flag = true;
} else if (have_dex2oat_compiler_filter_flag) {
sprintf(dex2oat_compiler_filter_arg, "--compiler-filter=%s", dex2oat_compiler_filter_flag);
}