aboutsummaryrefslogtreecommitdiff
path: root/dexopt
diff options
context:
space:
mode:
authorDan Bornstein <danfuzz@android.com>2010-09-28 15:46:54 -0700
committerDan Bornstein <danfuzz@android.com>2010-09-28 15:57:50 -0700
commit148283d71a7e35b9b506cbb49294b6822719c25e (patch)
tree41d6428e05397958133bf17e88818a24c89ccaab /dexopt
parentde9cdfa9d6d5fa5c46a0ec0f3f1e8de08a688841 (diff)
Plumb SMP optimization control through to dexopt.
Change-Id: I3bfaf6723e7b14d001f9de60cc1c1fd4f8e1ed99
Diffstat (limited to 'dexopt')
-rw-r--r--dexopt/OptMain.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/dexopt/OptMain.c b/dexopt/OptMain.c
index ca55565e8..fbb794790 100644
--- a/dexopt/OptMain.c
+++ b/dexopt/OptMain.c
@@ -125,12 +125,12 @@ static int extractAndProcessZip(int zipFd, int cacheFd,
goto bail;
}
- /*
- * Prep the VM and perform the optimization.
- */
+ /* Parse the options. */
+
DexClassVerifyMode verifyMode = VERIFY_MODE_ALL;
DexOptimizerMode dexOptMode = OPTIMIZE_MODE_VERIFIED;
int dexoptFlags = 0; /* bit flags, from enum DexoptFlags */
+
if (dexoptFlagStr[0] != '\0') {
const char* opc;
const char* val;
@@ -159,7 +159,17 @@ static int extractAndProcessZip(int zipFd, int cacheFd,
if (opc != NULL) {
dexoptFlags |= DEXOPT_GEN_REGISTER_MAPS;
}
+
+ opc = strstr(dexoptFlagStr, "u=y"); /* uniprocessor target */
+ if (opc != NULL) {
+ dexoptFlags |= DEXOPT_UNIPROCESSOR;
+ }
}
+
+ /*
+ * Prep the VM and perform the optimization.
+ */
+
if (dvmPrepForDexOpt(bootClassPath, dexOptMode, verifyMode,
dexoptFlags) != 0)
{