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;
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)
{
gDvm.dexOptMode = dexOptMode;
gDvm.classVerifyMode = verifyMode;
gDvm.generateRegisterMaps = (dexoptFlags & DEXOPT_GEN_REGISTER_MAPS) != 0;
+ gDvm.dexOptForSmp = (dexoptFlags & DEXOPT_UNIPROCESSOR) == 0;
/*
* Initialize the heap, some basic thread control mutexes, and
/* some additional bit flags for dexopt */
enum DexoptFlags {
DEXOPT_GEN_REGISTER_MAPS = 1, /* generate register maps during verify */
+ DEXOPT_UNIPROCESSOR = 1 << 1, /* assume a uniprocessor target */
};
/*