Frameworks/base: Support dex2oat cpu-set system property
Check dalvik.vm.dex2oat-cpu-set in AndroidRuntime and pass to ART
with "--cpu-set=" as a compiler option, if found.
Check dalvik.vm.image-dex2oat-cpu-set in AndroidRuntime and pass
to ART with "--cpu-set=" as an image compiler option, if found.
Bug: 141446571
Bug: 149395059
Test: manual
Change-Id: Ica6a39048292d3d43aeb58d25f79f1398a7d5a79
Merged-In: Ica6a39048292d3d43aeb58d25f79f1398a7d5a79
(cherry picked from commit 870ce3f6d7)
This commit is contained in:
@@ -665,6 +665,8 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote)
|
|||||||
char dex2oatImageCompilerFilterBuf[sizeof("--compiler-filter=")-1 + PROPERTY_VALUE_MAX];
|
char dex2oatImageCompilerFilterBuf[sizeof("--compiler-filter=")-1 + PROPERTY_VALUE_MAX];
|
||||||
char dex2oatThreadsBuf[sizeof("-j")-1 + PROPERTY_VALUE_MAX];
|
char dex2oatThreadsBuf[sizeof("-j")-1 + PROPERTY_VALUE_MAX];
|
||||||
char dex2oatThreadsImageBuf[sizeof("-j")-1 + PROPERTY_VALUE_MAX];
|
char dex2oatThreadsImageBuf[sizeof("-j")-1 + PROPERTY_VALUE_MAX];
|
||||||
|
char dex2oatCpuSetBuf[sizeof("--cpu-set=")-1 + PROPERTY_VALUE_MAX];
|
||||||
|
char dex2oatCpuSetImageBuf[sizeof("--cpu-set=")-1 + PROPERTY_VALUE_MAX];
|
||||||
char dex2oat_isa_variant_key[PROPERTY_KEY_MAX];
|
char dex2oat_isa_variant_key[PROPERTY_KEY_MAX];
|
||||||
char dex2oat_isa_variant[sizeof("--instruction-set-variant=") -1 + PROPERTY_VALUE_MAX];
|
char dex2oat_isa_variant[sizeof("--instruction-set-variant=") -1 + PROPERTY_VALUE_MAX];
|
||||||
char dex2oat_isa_features_key[PROPERTY_KEY_MAX];
|
char dex2oat_isa_features_key[PROPERTY_KEY_MAX];
|
||||||
@@ -937,6 +939,10 @@ int AndroidRuntime::startVm(JavaVM** pJavaVM, JNIEnv** pEnv, bool zygote)
|
|||||||
parseCompilerOption("dalvik.vm.dex2oat-threads", dex2oatThreadsBuf, "-j", "-Xcompiler-option");
|
parseCompilerOption("dalvik.vm.dex2oat-threads", dex2oatThreadsBuf, "-j", "-Xcompiler-option");
|
||||||
parseCompilerOption("dalvik.vm.image-dex2oat-threads", dex2oatThreadsImageBuf, "-j",
|
parseCompilerOption("dalvik.vm.image-dex2oat-threads", dex2oatThreadsImageBuf, "-j",
|
||||||
"-Ximage-compiler-option");
|
"-Ximage-compiler-option");
|
||||||
|
parseCompilerOption("dalvik.vm.dex2oat-cpu-set", dex2oatCpuSetBuf, "--cpu-set=",
|
||||||
|
"-Xcompiler-option");
|
||||||
|
parseCompilerOption("dalvik.vm.image-dex2oat-cpu-set", dex2oatCpuSetImageBuf, "--cpu-set=",
|
||||||
|
"-Ximage-compiler-option");
|
||||||
|
|
||||||
// The runtime will compile a boot image, when necessary, not using installd. Thus, we need to
|
// The runtime will compile a boot image, when necessary, not using installd. Thus, we need to
|
||||||
// pass the instruction-set-features/variant as an image-compiler-option.
|
// pass the instruction-set-features/variant as an image-compiler-option.
|
||||||
|
|||||||
Reference in New Issue
Block a user