diff options
| author | 2018-03-19 13:40:56 +0000 | |
|---|---|---|
| committer | 2018-04-11 19:35:03 -0700 | |
| commit | 5abb0696dacb90ad35a571a5b660efb0c4dc3c01 (patch) | |
| tree | e11d74796ab4093f09ff32560b053a06252268d0 /compiler/driver/compiler_driver.h | |
| parent | 47b6ace4d75e69b28deca89c285d6365d4c4afff (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.
Partial cherry-pick of commit be0c7cfdbb2b73d6beb1284fdedb8e07766630e9.
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
Merged-In: Ia0a05c93e3fc8d913fe8556d3d7f23e7e61076c2
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 fffa3b345f..682cf16d45 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() { |