diff options
author | 2018-03-19 13:40:56 +0000 | |
---|---|---|
committer | 2018-03-19 17:50:47 +0000 | |
commit | be0c7cfdbb2b73d6beb1284fdedb8e07766630e9 (patch) | |
tree | 94afa41332e7b27d0e101c50187cc4aa9742edd5 /compiler/driver/compiler_driver.h | |
parent | 722093c305de5646759318fdeedc022c08a6723c (diff) |
Fix running some run-tests with -Xjitthreshold:0
Do not JIT non-compilable methods. Honor the $noinline$
directive for JIT and fix core image recognition.
Make sure the 597-deopt-invoke-stub that actually relies on
its own -Xjitthreshold: overrides the threshold we pass,
work around already running compiled code in 570-checker-osr
(and drop obsolete "doThrow" pattern replaced by $noinline$)
and add a few necessary $noinline$ directives.
Test: for t in \
461-get-reference-vreg \
536-checker-needs-access-check \
570-checker-osr \
597-deopt-invoke-stub \
655-jit-clinit \
; do \
art/test/run-test --host --jit $t \
--runtime-option -Xjitthreshold:0; \
done
Test: testrunner.py --host --jit
Bug: 62611253
Change-Id: Ia0a05c93e3fc8d913fe8556d3d7f23e7e61076c2
Diffstat (limited to 'compiler/driver/compiler_driver.h')
-rw-r--r-- | compiler/driver/compiler_driver.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index 8db892bf18..46d8373c52 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -371,9 +371,18 @@ class CompilerDriver { // Is `boot_image_filename` the name of a core image (small boot // image used for ART testing only)? static bool IsCoreImageFilename(const std::string& boot_image_filename) { - // TODO: This is under-approximating... - return android::base::EndsWith(boot_image_filename, "core.art") - || android::base::EndsWith(boot_image_filename, "core-optimizing.art"); + // Look for "core.art" or "core-*.art". + if (android::base::EndsWith(boot_image_filename, "core.art")) { + return true; + } + if (!android::base::EndsWith(boot_image_filename, ".art")) { + return false; + } + size_t dash_pos = boot_image_filename.find_last_of("-/"); + if (dash_pos == std::string::npos || boot_image_filename[dash_pos] != '-') { + return false; + } + return (dash_pos >= 4u) && (boot_image_filename.compare(dash_pos - 4u, 4u, "core") == 0); } optimizer::DexToDexCompiler& GetDexToDexCompiler() { |