From be0c7cfdbb2b73d6beb1284fdedb8e07766630e9 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 19 Mar 2018 13:40:56 +0000 Subject: 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 --- compiler/driver/compiler_driver.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'compiler/driver/compiler_driver.h') 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() { -- cgit v1.2.3-59-g8ed1b