diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2018-08-28 08:42:37 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-08-28 08:42:37 +0000 |
commit | 19379b58bd433da91230e4fe6cd96e7416d16adc (patch) | |
tree | 8ed63cf734578fdfb275363d6970c82b24538e7b | |
parent | 56f64eb28b6f2c590031ca34b41ccc84bd7bf6e7 (diff) | |
parent | a5ca8ebef24e38348213cef31417a4ccc7c3dd1a (diff) |
Merge "Default to usejit:true."
-rw-r--r-- | runtime/parsed_options.cc | 9 | ||||
-rw-r--r-- | runtime/runtime_options.def | 2 | ||||
-rw-r--r-- | test/638-checker-inline-cache-intrinsic/run | 2 | ||||
-rwxr-xr-x | test/916-obsolete-jit/run | 10 | ||||
-rwxr-xr-x | test/etc/run-test-jar | 6 | ||||
-rw-r--r-- | test/knownfailures.json | 7 |
6 files changed, 20 insertions, 16 deletions
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc index a44e5a4b54..0d98d90f1e 100644 --- a/runtime/parsed_options.cc +++ b/runtime/parsed_options.cc @@ -518,9 +518,12 @@ bool ParsedOptions::DoParse(const RuntimeOptions& options, LOG(INFO) << "setting boot class path to " << *args.Get(M::BootClassPath); } - if (args.GetOrDefault(M::UseJitCompilation) && args.GetOrDefault(M::Interpret)) { - Usage("-Xusejit:true and -Xint cannot be specified together"); - Exit(0); + if (args.GetOrDefault(M::Interpret)) { + if (args.Exists(M::UseJitCompilation) && *args.Get(M::UseJitCompilation)) { + Usage("-Xusejit:true and -Xint cannot be specified together\n"); + Exit(0); + } + args.Set(M::UseJitCompilation, false); } // Set a default boot class path if we didn't get an explicit one via command line. diff --git a/runtime/runtime_options.def b/runtime/runtime_options.def index ef21f9f9e0..5e12bbce05 100644 --- a/runtime/runtime_options.def +++ b/runtime/runtime_options.def @@ -69,7 +69,7 @@ RUNTIME_OPTIONS_KEY (Unit, IgnoreMaxFootprint) RUNTIME_OPTIONS_KEY (Unit, LowMemoryMode) RUNTIME_OPTIONS_KEY (bool, UseTLAB, (kUseTlab || kUseReadBarrier)) RUNTIME_OPTIONS_KEY (bool, EnableHSpaceCompactForOOM, true) -RUNTIME_OPTIONS_KEY (bool, UseJitCompilation, false) +RUNTIME_OPTIONS_KEY (bool, UseJitCompilation, true) RUNTIME_OPTIONS_KEY (bool, DumpNativeStackOnSigQuit, true) RUNTIME_OPTIONS_KEY (bool, MadviseRandomAccess, false) RUNTIME_OPTIONS_KEY (unsigned int, JITCompileThreshold) diff --git a/test/638-checker-inline-cache-intrinsic/run b/test/638-checker-inline-cache-intrinsic/run index f43681dd56..15403100f5 100644 --- a/test/638-checker-inline-cache-intrinsic/run +++ b/test/638-checker-inline-cache-intrinsic/run @@ -14,4 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Set threshold to 100 to math the iterations done in the test. +# Pass --verbose-methods to only generate the CFG of these methods. exec ${RUN} --jit --runtime-option -Xjitthreshold:100 -Xcompiler-option --verbose-methods=inlineMonomorphic,knownReceiverType,stringEquals $@ diff --git a/test/916-obsolete-jit/run b/test/916-obsolete-jit/run index b6d406fd99..c6e62ae6cd 100755 --- a/test/916-obsolete-jit/run +++ b/test/916-obsolete-jit/run @@ -14,12 +14,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -# We are testing the redefinition of compiled code but with jvmti we only allow -# jitted compiled code so always add the --jit argument. -if [[ "$@" == *"--jit"* ]]; then - other_args="" -else - other_args="--jit" -fi -./default-run "$@" ${other_args} \ - --jvmti +./default-run "$@" --jvmti diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar index 713fd35523..5c4ad21bd6 100755 --- a/test/etc/run-test-jar +++ b/test/etc/run-test-jar @@ -588,7 +588,7 @@ if [ "$USE_GDB" = "y" ]; then fi if [ "$INTERPRETER" = "y" ]; then - INT_OPTS="-Xint" + INT_OPTS="${INT_OPTS} -Xint" if [ "$VERIFY" = "y" ] ; then INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=quicken" COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=quicken" @@ -604,7 +604,7 @@ if [ "$INTERPRETER" = "y" ]; then fi if [ "$JIT" = "y" ]; then - INT_OPTS="-Xusejit:true" + INT_OPTS="${INT_OPTS} -Xusejit:true" if [ "$VERIFY" = "y" ] ; then INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=quicken" COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=quicken" @@ -613,6 +613,8 @@ if [ "$JIT" = "y" ]; then COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=assume-verified" DEX_VERIFY="${DEX_VERIFY} -Xverify:none" fi +else + INT_OPTS="${INT_OPTS} -Xusejit:false" fi JNI_OPTS="-Xjnigreflimit:512 -Xcheck:jni" diff --git a/test/knownfailures.json b/test/knownfailures.json index a280f8522b..f71e9363cb 100644 --- a/test/knownfailures.json +++ b/test/knownfailures.json @@ -246,7 +246,7 @@ "613-inlining-dex-cache", "626-set-resolved-string", "638-checker-inline-cache-intrinsic"], - "variant": "trace | stream", + "variant": "trace | stream", "description": ["These tests expect JIT compilation, which is", "suppressed when tracing."] }, @@ -257,6 +257,11 @@ "suppressed when tracing."] }, { + "tests": "638-checker-inline-cache-intrinsic", + "variant": "interpreter | interp-ac", + "description": ["Test expects JIT compilation"] + }, + { "tests": "597-deopt-invoke-stub", "variant": "speed-profile | interp-ac | interpreter | optimizing | trace | stream", "description": ["This test expects JIT compilation and no AOT for", |