diff options
author | 2018-10-10 14:21:55 +0100 | |
---|---|---|
committer | 2018-10-10 15:25:26 +0100 | |
commit | a2da9b99fa1ea3d25d52da71308a623b2aae216c (patch) | |
tree | 5533be23eee7c24b68b1b72272cbae3f35a708cb | |
parent | dc3b4670b170b39a8bd6498d4de69c1513af1db2 (diff) |
ART: Completely remove the --compile-pic option.
And the PIC-related fields from image header.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: Pixel 2 XL boots.
Test: testrunner.py --target --optimizing
Bug: 77856493
Change-Id: I3787369378f12d8cd9003bebeae62830a67def33
23 files changed, 28 insertions, 118 deletions
diff --git a/build/Android.oat.mk b/build/Android.oat.mk index c4ae593a5b..2824a099b2 100644 --- a/build/Android.oat.mk +++ b/build/Android.oat.mk @@ -104,7 +104,7 @@ $$(core_image_name): $$(HOST_CORE_DEX_LOCATIONS) $$(core_dex2oat_dependency) --base=$$(LIBART_IMG_HOST_BASE_ADDRESS) --instruction-set=$$($(2)ART_HOST_ARCH) \ $$(LOCAL_$(2)DEX2OAT_HOST_INSTRUCTION_SET_FEATURES_OPTION) \ --host --android-root=$$(HOST_OUT) \ - --generate-debug-info --generate-build-id --compile-pic \ + --generate-debug-info --generate-build-id \ --runtime-arg -XX:SlowDebug=true \ $$(PRIVATE_CORE_MULTI_PARAM) $$(PRIVATE_CORE_COMPILE_OPTIONS) @@ -197,7 +197,7 @@ $$(core_image_name): $$(TARGET_CORE_DEX_FILES) $$(core_dex2oat_dependency) --instruction-set-variant=$$($(2)DEX2OAT_TARGET_CPU_VARIANT) \ --instruction-set-features=$$($(2)DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \ --android-root=$$(PRODUCT_OUT)/system \ - --generate-debug-info --generate-build-id --compile-pic \ + --generate-debug-info --generate-build-id \ --runtime-arg -XX:SlowDebug=true \ $$(PRIVATE_CORE_COMPILE_OPTIONS) || (rm $$(PRIVATE_CORE_OAT_NAME); exit 1) diff --git a/compiler/driver/compiler_options_map-inl.h b/compiler/driver/compiler_options_map-inl.h index 9914d81122..d4a582fb35 100644 --- a/compiler/driver/compiler_options_map-inl.h +++ b/compiler/driver/compiler_options_map-inl.h @@ -43,9 +43,6 @@ inline bool ReadCompilerOptions(Base& map, CompilerOptions* options, std::string } options->SetCompilerFilter(compiler_filter); } - if (map.Exists(Base::PIC)) { - options->compile_pic_ = true; - } map.AssignIfExists(Base::HugeMethodMaxThreshold, &options->huge_method_threshold_); map.AssignIfExists(Base::LargeMethodMaxThreshold, &options->large_method_threshold_); map.AssignIfExists(Base::SmallMethodMaxThreshold, &options->small_method_threshold_); @@ -109,9 +106,6 @@ inline void AddCompilerOptionsArgumentParserOptions(Builder& b) { .template WithType<std::string>() .IntoKey(Map::CompilerFilter) - .Define("--compile-pic") - .IntoKey(Map::PIC) - .Define("--huge-method-max=_") .template WithType<unsigned int>() .IntoKey(Map::HugeMethodMaxThreshold) diff --git a/compiler/optimizing/code_generator_arm64.cc b/compiler/optimizing/code_generator_arm64.cc index 25eadcdc72..0a28f6557a 100644 --- a/compiler/optimizing/code_generator_arm64.cc +++ b/compiler/optimizing/code_generator_arm64.cc @@ -4350,7 +4350,7 @@ void CodeGeneratorARM64::LoadBootImageAddress(vixl::aarch64::Register reg, // Add ADD with its PC-relative type patch. vixl::aarch64::Label* add_label = NewBootImageIntrinsicPatch(boot_image_reference, adrp_label); EmitAddPlaceholder(add_label, reg.X(), reg.X()); - } else if (Runtime::Current()->IsAotCompiler()) { + } else if (GetCompilerOptions().GetCompilePic()) { // Add ADRP with its PC-relative .data.bimg.rel.ro patch. vixl::aarch64::Label* adrp_label = NewBootImageRelRoPatch(boot_image_reference); EmitAdrpPlaceholder(adrp_label, reg.X()); diff --git a/compiler/optimizing/code_generator_arm_vixl.cc b/compiler/optimizing/code_generator_arm_vixl.cc index 130ccf3126..8bd4af50f3 100644 --- a/compiler/optimizing/code_generator_arm_vixl.cc +++ b/compiler/optimizing/code_generator_arm_vixl.cc @@ -8914,7 +8914,7 @@ void CodeGeneratorARMVIXL::LoadBootImageAddress(vixl32::Register reg, CodeGeneratorARMVIXL::PcRelativePatchInfo* labels = NewBootImageIntrinsicPatch(boot_image_reference); EmitMovwMovtPlaceholder(labels, reg); - } else if (Runtime::Current()->IsAotCompiler()) { + } else if (GetCompilerOptions().GetCompilePic()) { CodeGeneratorARMVIXL::PcRelativePatchInfo* labels = NewBootImageRelRoPatch(boot_image_reference); EmitMovwMovtPlaceholder(labels, reg); diff --git a/compiler/optimizing/code_generator_mips.cc b/compiler/optimizing/code_generator_mips.cc index 1cf55152bb..1f0e200cb7 100644 --- a/compiler/optimizing/code_generator_mips.cc +++ b/compiler/optimizing/code_generator_mips.cc @@ -1766,7 +1766,7 @@ void CodeGeneratorMIPS::LoadBootImageAddress(Register reg, uint32_t boot_image_r PcRelativePatchInfo* info_low = NewBootImageIntrinsicPatch(boot_image_reference, info_high); EmitPcRelativeAddressPlaceholderHigh(info_high, TMP, /* base */ ZERO); __ Addiu(reg, TMP, /* placeholder */ 0x5678, &info_low->label); - } else if (Runtime::Current()->IsAotCompiler()) { + } else if (GetCompilerOptions().GetCompilePic()) { PcRelativePatchInfo* info_high = NewBootImageRelRoPatch(boot_image_reference); PcRelativePatchInfo* info_low = NewBootImageRelRoPatch(boot_image_reference, info_high); EmitPcRelativeAddressPlaceholderHigh(info_high, reg, /* base */ ZERO); diff --git a/compiler/optimizing/code_generator_mips64.cc b/compiler/optimizing/code_generator_mips64.cc index 27534b004a..0005d8f6b6 100644 --- a/compiler/optimizing/code_generator_mips64.cc +++ b/compiler/optimizing/code_generator_mips64.cc @@ -1680,7 +1680,7 @@ void CodeGeneratorMIPS64::LoadBootImageAddress(GpuRegister reg, uint32_t boot_im PcRelativePatchInfo* info_low = NewBootImageIntrinsicPatch(boot_image_reference, info_high); EmitPcRelativeAddressPlaceholderHigh(info_high, AT, info_low); __ Daddiu(reg, AT, /* placeholder */ 0x5678); - } else if (Runtime::Current()->IsAotCompiler()) { + } else if (GetCompilerOptions().GetCompilePic()) { PcRelativePatchInfo* info_high = NewBootImageRelRoPatch(boot_image_reference); PcRelativePatchInfo* info_low = NewBootImageRelRoPatch(boot_image_reference, info_high); EmitPcRelativeAddressPlaceholderHigh(info_high, AT, info_low); diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc index 39cbe5e850..ca1e93b75e 100644 --- a/compiler/optimizing/code_generator_x86.cc +++ b/compiler/optimizing/code_generator_x86.cc @@ -4988,7 +4988,7 @@ void CodeGeneratorX86::LoadBootImageAddress(Register reg, invoke->GetLocations()->InAt(invoke->GetSpecialInputIndex()).AsRegister<Register>(); __ leal(reg, Address(method_address_reg, CodeGeneratorX86::kDummy32BitOffset)); RecordBootImageIntrinsicPatch(method_address, boot_image_reference); - } else if (Runtime::Current()->IsAotCompiler()) { + } else if (GetCompilerOptions().GetCompilePic()) { DCHECK_EQ(invoke->InputCount(), invoke->GetNumberOfArguments() + 1u); HX86ComputeBaseMethodAddress* method_address = invoke->InputAt(invoke->GetSpecialInputIndex())->AsX86ComputeBaseMethodAddress(); diff --git a/compiler/optimizing/code_generator_x86_64.cc b/compiler/optimizing/code_generator_x86_64.cc index e458dfffb4..e6643fb08c 100644 --- a/compiler/optimizing/code_generator_x86_64.cc +++ b/compiler/optimizing/code_generator_x86_64.cc @@ -1125,7 +1125,7 @@ void CodeGeneratorX86_64::LoadBootImageAddress(CpuRegister reg, uint32_t boot_im if (GetCompilerOptions().IsBootImage()) { __ leal(reg, Address::Absolute(CodeGeneratorX86_64::kDummy32BitOffset, /* no_rip */ false)); RecordBootImageIntrinsicPatch(boot_image_reference); - } else if (Runtime::Current()->IsAotCompiler()) { + } else if (GetCompilerOptions().GetCompilePic()) { __ movl(reg, Address::Absolute(CodeGeneratorX86_64::kDummy32BitOffset, /* no_rip */ false)); RecordBootImageRelRoPatch(boot_image_reference); } else { diff --git a/compiler/optimizing/pc_relative_fixups_x86.cc b/compiler/optimizing/pc_relative_fixups_x86.cc index 4b07d5b621..4ff293c46c 100644 --- a/compiler/optimizing/pc_relative_fixups_x86.cc +++ b/compiler/optimizing/pc_relative_fixups_x86.cc @@ -17,7 +17,6 @@ #include "pc_relative_fixups_x86.h" #include "code_generator_x86.h" #include "intrinsics_x86.h" -#include "runtime.h" namespace art { namespace x86 { @@ -239,7 +238,7 @@ class PCRelativeHandlerVisitor : public HGraphVisitor { case Intrinsics::kIntegerValueOf: // This intrinsic can be call free if it loads the address of the boot image object. // If we're compiling PIC, we need the address base for loading from .data.bimg.rel.ro. - if (Runtime::Current()->UseJitCompilation()) { + if (!codegen_->GetCompilerOptions().GetCompilePic()) { break; } FALLTHROUGH_INTENDED; diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc index 690802b4cd..48d0b17927 100644 --- a/dex2oat/dex2oat.cc +++ b/dex2oat/dex2oat.cc @@ -296,9 +296,6 @@ NO_RETURN static void Usage(const char* fmt, ...) { UsageError(" Example: --instruction-set-features=div"); UsageError(" Default: default"); UsageError(""); - UsageError(" --compile-pic: Force indirect use of code, methods, and classes"); - UsageError(" Default: disabled for apps (ignored for boot image which is always PIC)"); - UsageError(""); UsageError(" --compiler-backend=(Quick|Optimizing): select compiler backend"); UsageError(" set."); UsageError(" Example: --compiler-backend=Optimizing"); @@ -727,10 +724,8 @@ class Dex2Oat final { } void ProcessOptions(ParserOptions* parser_options) { + compiler_options_->compile_pic_ = true; // All AOT compilation is PIC. compiler_options_->boot_image_ = !image_filenames_.empty(); - if (compiler_options_->boot_image_) { - compiler_options_->compile_pic_ = true; - } compiler_options_->app_image_ = app_image_fd_ != -1 || !app_image_file_name_.empty(); if (IsBootImage() && image_filenames_.size() == 1) { @@ -1987,7 +1982,6 @@ class Dex2Oat final { image_writer_.reset(new linker::ImageWriter(*compiler_options_, image_base_, - compiler_options_->GetCompilePic(), IsAppImage(), image_storage_mode_, oat_filenames_, @@ -2610,32 +2604,9 @@ class Dex2Oat final { for (size_t i = 0, size = oat_filenames_.size(); i != size; ++i) { oat_data_begins.push_back(image_writer_->GetOatDataBegin(i)); } - // Destroy ImageWriter before doing FixupElf. + // Destroy ImageWriter. image_writer_.reset(); - for (size_t i = 0, size = oat_filenames_.size(); i != size; ++i) { - const char* oat_filename = oat_filenames_[i]; - // Do not fix up the ELF file if we are --compile-pic or compiling the app image - if (!compiler_options_->GetCompilePic() && IsBootImage()) { - std::unique_ptr<File> oat_file(OS::OpenFileReadWrite(oat_filename)); - if (oat_file.get() == nullptr) { - PLOG(ERROR) << "Failed to open ELF file: " << oat_filename; - return false; - } - - if (!linker::ElfWriter::Fixup(oat_file.get(), oat_data_begins[i])) { - oat_file->Erase(); - LOG(ERROR) << "Failed to fixup ELF file " << oat_file->GetPath(); - return false; - } - - if (oat_file->FlushCloseOrErase()) { - PLOG(ERROR) << "Failed to flush and close fixed ELF file " << oat_file->GetPath(); - return false; - } - } - } - return true; } diff --git a/dex2oat/linker/image_test.cc b/dex2oat/linker/image_test.cc index 96c48b8798..b628c9e763 100644 --- a/dex2oat/linker/image_test.cc +++ b/dex2oat/linker/image_test.cc @@ -79,8 +79,6 @@ TEST_F(ImageTest, ImageHeaderIsValid) { /*boot_oat_begin*/0U, /*boot_oat_size_*/0U, sizeof(void*), - /*compile_pic*/false, - /*is_pic*/false, ImageHeader::kDefaultStorageMode, /*data_size*/0u); ASSERT_TRUE(image_header.IsValid()); diff --git a/dex2oat/linker/image_test.h b/dex2oat/linker/image_test.h index 2b6786d754..443ee52d15 100644 --- a/dex2oat/linker/image_test.h +++ b/dex2oat/linker/image_test.h @@ -214,7 +214,6 @@ inline void ImageTest::DoCompile(ImageHeader::StorageMode storage_mode, // TODO: compile_pic should be a test argument. std::unique_ptr<ImageWriter> writer(new ImageWriter(*compiler_options_, kRequestedImageBase, - /*compile_pic*/false, /*compile_app_image*/false, storage_mode, oat_filename_vector, diff --git a/dex2oat/linker/image_writer.cc b/dex2oat/linker/image_writer.cc index 1e24f463d8..2eb562ced6 100644 --- a/dex2oat/linker/image_writer.cc +++ b/dex2oat/linker/image_writer.cc @@ -2408,8 +2408,6 @@ void ImageWriter::CreateHeader(size_t oat_index) { boot_oat_begin, boot_oat_end - boot_oat_begin, static_cast<uint32_t>(target_ptr_size_), - compile_pic_, - /*is_pic*/compile_app_image_, image_storage_mode_, /*data_size*/0u); @@ -3339,7 +3337,6 @@ void ImageWriter::UpdateOatFileHeader(size_t oat_index, const OatHeader& oat_hea ImageWriter::ImageWriter( const CompilerOptions& compiler_options, uintptr_t image_begin, - bool compile_pic, bool compile_app_image, ImageHeader::StorageMode image_storage_mode, const std::vector<const char*>& oat_filenames, @@ -3348,7 +3345,6 @@ ImageWriter::ImageWriter( : compiler_options_(compiler_options), global_image_begin_(reinterpret_cast<uint8_t*>(image_begin)), image_objects_offset_begin_(0), - compile_pic_(compile_pic), compile_app_image_(compile_app_image), target_ptr_size_(InstructionSetPointerSize(compiler_options.GetInstructionSet())), image_infos_(oat_filenames.size()), diff --git a/dex2oat/linker/image_writer.h b/dex2oat/linker/image_writer.h index 142f77bbb4..93e4be5558 100644 --- a/dex2oat/linker/image_writer.h +++ b/dex2oat/linker/image_writer.h @@ -77,7 +77,6 @@ class ImageWriter final { public: ImageWriter(const CompilerOptions& compiler_options, uintptr_t image_begin, - bool compile_pic, bool compile_app_image, ImageHeader::StorageMode image_storage_mode, const std::vector<const char*>& oat_filenames, @@ -758,7 +757,6 @@ class ImageWriter final { std::unordered_map<mirror::Object*, uint32_t> oat_index_map_; // Boolean flags. - const bool compile_pic_; const bool compile_app_image_; // Size of pointers on the target architecture. diff --git a/dexoptanalyzer/dexoptanalyzer_test.cc b/dexoptanalyzer/dexoptanalyzer_test.cc index 93ebf2b810..07d5b6dee7 100644 --- a/dexoptanalyzer/dexoptanalyzer_test.cc +++ b/dexoptanalyzer/dexoptanalyzer_test.cc @@ -208,6 +208,7 @@ TEST_F(DexoptAnalyzerTest, DexOdexNoOat) { Verify(dex_location, CompilerFilter::kExtract); Verify(dex_location, CompilerFilter::kSpeed); + Verify(dex_location, CompilerFilter::kEverything); } // Case: We have a stripped DEX file and a PIC ODEX file, but no OAT file. diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc index d30ec3157d..b37a4c7970 100644 --- a/oatdump/oatdump.cc +++ b/oatdump/oatdump.cc @@ -1795,8 +1795,6 @@ class ImageDumper { os << "PATCH DELTA:" << image_header_.GetPatchDelta() << "\n\n"; - os << "COMPILE PIC: " << (image_header_.CompilePic() ? "yes" : "no") << "\n\n"; - { os << "ROOTS: " << reinterpret_cast<void*>(image_header_.GetImageRoots().Ptr()) << "\n"; static_assert(arraysize(image_roots_descriptions_) == diff --git a/runtime/gc/collector/immune_spaces_test.cc b/runtime/gc/collector/immune_spaces_test.cc index 7bd87bda7a..3f85c711e1 100644 --- a/runtime/gc/collector/immune_spaces_test.cc +++ b/runtime/gc/collector/immune_spaces_test.cc @@ -125,8 +125,6 @@ class ImmuneSpacesTest : public CommonRuntimeTest { /*boot_oat_begin*/0u, /*boot_oat_size*/0u, /*pointer_size*/sizeof(void*), - /*compile_pic*/false, - /*is_pic*/false, ImageHeader::kStorageModeUncompressed, /*storage_size*/0u); return new DummyImageSpace(std::move(map), diff --git a/runtime/image.cc b/runtime/image.cc index bdf045bd19..a4351d021b 100644 --- a/runtime/image.cc +++ b/runtime/image.cc @@ -26,7 +26,7 @@ namespace art { const uint8_t ImageHeader::kImageMagic[] = { 'a', 'r', 't', '\n' }; -const uint8_t ImageHeader::kImageVersion[] = { '0', '6', '3', '\0' }; // Image relocations. +const uint8_t ImageHeader::kImageVersion[] = { '0', '6', '4', '\0' }; // Remove PIC flags. ImageHeader::ImageHeader(uint32_t image_begin, uint32_t image_size, @@ -42,8 +42,6 @@ ImageHeader::ImageHeader(uint32_t image_begin, uint32_t boot_oat_begin, uint32_t boot_oat_size, uint32_t pointer_size, - bool compile_pic, - bool is_pic, StorageMode storage_mode, size_t data_size) : image_begin_(image_begin), @@ -60,8 +58,6 @@ ImageHeader::ImageHeader(uint32_t image_begin, patch_delta_(0), image_roots_(image_roots), pointer_size_(pointer_size), - compile_pic_(compile_pic), - is_pic_(is_pic), storage_mode_(storage_mode), data_size_(data_size) { CHECK_EQ(image_begin, RoundUp(image_begin, kPageSize)); diff --git a/runtime/image.h b/runtime/image.h index 73c1b8f5cd..bd8bc28e0c 100644 --- a/runtime/image.h +++ b/runtime/image.h @@ -108,8 +108,6 @@ class PACKED(4) ImageHeader { patch_delta_(0), image_roots_(0U), pointer_size_(0U), - compile_pic_(0), - is_pic_(0), storage_mode_(kDefaultStorageMode), data_size_(0) {} @@ -127,8 +125,6 @@ class PACKED(4) ImageHeader { uint32_t boot_oat_begin, uint32_t boot_oat_size, uint32_t pointer_size, - bool compile_pic, - bool is_pic, StorageMode storage_mode, size_t data_size); @@ -318,14 +314,6 @@ class PACKED(4) ImageHeader { void RelocateImageMethods(int64_t delta); void RelocateImageObjects(int64_t delta); - bool CompilePic() const { - return compile_pic_ != 0; - } - - bool IsPic() const { - return is_pic_ != 0; - } - uint32_t GetBootImageBegin() const { return boot_image_begin_; } @@ -442,14 +430,6 @@ class PACKED(4) ImageHeader { // Pointer size, this affects the size of the ArtMethods. uint32_t pointer_size_; - // Boolean (0 or 1) to denote if the image was compiled with --compile-pic option - const uint32_t compile_pic_; - - // Boolean (0 or 1) to denote if the image can be mapped at a random address, this only refers to - // the .art file. Currently, app oat files do not depend on their app image. There are no pointers - // from the app oat code to the app image. - const uint32_t is_pic_; - // Image section sizes/offsets correspond to the uncompressed form. ImageSection sections_[kSectionCount]; diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar index acd37e4b29..900b1d7759 100755 --- a/test/etc/run-test-jar +++ b/test/etc/run-test-jar @@ -319,10 +319,6 @@ while true; do TEST_DIRECTORY="nativetest64" ARCHITECTURES_PATTERN="${ARCHITECTURES_64}" shift - elif [ "x$1" = "x--pic-test" ]; then - FLAGS="${FLAGS} -Xcompiler-option --compile-pic" - COMPILE_FLAGS="${COMPILE_FLAGS} --compile-pic" - shift elif [ "x$1" = "x--experimental" ]; then if [ "$#" -lt 2 ]; then echo "missing --experimental option" 1>&2 diff --git a/test/run-test b/test/run-test index 2517450656..c6b88dc54f 100755 --- a/test/run-test +++ b/test/run-test @@ -204,9 +204,6 @@ while true; do elif [ "x$1" = "x--multi-image" ]; then multi_image_suffix="-multi" shift - elif [ "x$1" = "x--pic-test" ]; then - run_args="${run_args} --pic-test" - shift elif [ "x$1" = "x--relocate" ]; then relocate="yes" shift @@ -736,7 +733,6 @@ if [ "$usage" = "yes" ]; then echo " Set instruction-set-features for compilation." echo " --multi-image Use a set of images compiled with dex2oat multi-image for" echo " the boot class path." - echo " --pic-test Compile the test code position independent." echo " --quiet Don't print anything except failure messages" echo " --bisection-search Perform bisection bug search." echo " --vdex Test using vdex as in input to dex2oat. Only works with --prebuild." diff --git a/test/testrunner/target_config.py b/test/testrunner/target_config.py index c53270500c..978e9cb313 100644 --- a/test/testrunner/target_config.py +++ b/test/testrunner/target_config.py @@ -50,8 +50,8 @@ target_config = { 'run-test' : ['--jit-on-first-use'] }, 'art-pictest' : { - 'run-test' : ['--pictest', - '--optimizing'] + # Deprecated config: All AOT-compiled code is PIC now. + 'run-test' : ['--optimizing'] }, 'art-gcstress-gcverify': { # Do not exercise '--interpreter', '--optimizing', nor '--jit' in this @@ -185,10 +185,9 @@ target_config = { }, 'art-preopt' : { # This test configuration is intended to be representative of the case - # of preopted apps, which are precompiled compiled pic against an + # of preopted apps, which are precompiled against an # unrelocated image, then used with a relocated image. - 'run-test' : ['--pictest', - '--prebuild', + 'run-test' : ['--prebuild', '--relocate', '--jit'] }, diff --git a/test/testrunner/testrunner.py b/test/testrunner/testrunner.py index 4d3b3b1087..45c3f88ecf 100755 --- a/test/testrunner/testrunner.py +++ b/test/testrunner/testrunner.py @@ -31,7 +31,7 @@ dependencies: There are various options to invoke the script which are: -t: Either the test name as in art/test or the test name including the variant information. Eg, "-t 001-HelloWorld", - "-t test-art-host-run-test-debug-prebuild-optimizing-relocate-ntrace-cms-checkjni-picimage-npictest-ndebuggable-001-HelloWorld32" + "-t test-art-host-run-test-debug-prebuild-optimizing-relocate-ntrace-cms-checkjni-picimage-ndebuggable-001-HelloWorld32" -j: Number of thread workers to be used. Eg - "-j64" --dry-run: Instead of running the test name, just print its name. --verbose @@ -139,7 +139,6 @@ def gather_test_info(): global TOTAL_VARIANTS_SET global DISABLED_TEST_CONTAINER # TODO: Avoid duplication of the variant names in different lists. - VARIANT_TYPE_DICT['pictest'] = {'pictest', 'npictest'} VARIANT_TYPE_DICT['run'] = {'ndebug', 'debug'} VARIANT_TYPE_DICT['target'] = {'target', 'host', 'jvm'} VARIANT_TYPE_DICT['trace'] = {'trace', 'ntrace', 'stream'} @@ -181,7 +180,6 @@ def setup_test_env(): # These are the default variant-options we will use if nothing in the group is specified. default_variants = { 'target': {'host', 'target'}, - 'pictest': {'npictest'}, 'prebuild': {'prebuild'}, 'cdex_level': {'cdex-fast'}, 'jvmti': { 'no-jvmti'}, @@ -195,7 +193,6 @@ def setup_test_env(): 'gc': {'cms'}, 'jni': {'checkjni'}, 'image': {'picimage'}, - 'pictest': {'pictest'}, 'debuggable': {'ndebuggable'}, 'run': {'debug'}, # address_sizes_target depends on the target so it is dealt with below. @@ -346,7 +343,7 @@ def run_tests(tests): user_input_variants['prebuild'], user_input_variants['compiler'], user_input_variants['relocate'], user_input_variants['trace'], user_input_variants['gc'], user_input_variants['jni'], - user_input_variants['image'], user_input_variants['pictest'], + user_input_variants['image'], user_input_variants['debuggable'], user_input_variants['jvmti'], user_input_variants['cdex_level']) return config @@ -359,13 +356,13 @@ def run_tests(tests): 'prebuild': [''], 'compiler': [''], 'relocate': [''], 'trace': [''], 'gc': [''], 'jni': [''], - 'image': [''], 'pictest': [''], + 'image': [''], 'debuggable': [''], 'jvmti': [''], 'cdex_level': ['']}) def start_combination(config_tuple, address_size): test, target, run, prebuild, compiler, relocate, trace, gc, \ - jni, image, pictest, debuggable, jvmti, cdex_level = config_tuple + jni, image, debuggable, jvmti, cdex_level = config_tuple if stop_testrunner: # When ART_TEST_KEEP_GOING is set to false, then as soon as a test @@ -387,7 +384,6 @@ def run_tests(tests): test_name += gc + '-' test_name += jni + '-' test_name += image + '-' - test_name += pictest + '-' test_name += debuggable + '-' test_name += jvmti + '-' test_name += cdex_level + '-' @@ -395,7 +391,7 @@ def run_tests(tests): test_name += address_size variant_set = {target, run, prebuild, compiler, relocate, trace, gc, jni, - image, pictest, debuggable, jvmti, cdex_level, address_size} + image, debuggable, jvmti, cdex_level, address_size} options_test = options_all @@ -465,9 +461,6 @@ def run_tests(tests): elif image == 'multipicimage': options_test += ' --multi-image' - if pictest == 'pictest': - options_test += ' --pic-test' - if debuggable == 'debuggable': options_test += ' --debuggable' @@ -819,7 +812,7 @@ def parse_test_name(test_name): It supports two types of test_name: 1) Like 001-HelloWorld. In this case, it will just verify if the test actually exists and if it does, it returns the testname. - 2) Like test-art-host-run-test-debug-prebuild-interpreter-no-relocate-ntrace-cms-checkjni-picimage-npictest-ndebuggable-001-HelloWorld32 + 2) Like test-art-host-run-test-debug-prebuild-interpreter-no-relocate-ntrace-cms-checkjni-picimage-ndebuggable-001-HelloWorld32 In this case, it will parse all the variants and check if they are placed correctly. If yes, it will set the various VARIANT_TYPES to use the variants required to run the test. Again, it returns the test_name @@ -843,7 +836,6 @@ def parse_test_name(test_name): regex += '(' + '|'.join(VARIANT_TYPE_DICT['gc']) + ')-' regex += '(' + '|'.join(VARIANT_TYPE_DICT['jni']) + ')-' regex += '(' + '|'.join(VARIANT_TYPE_DICT['image']) + ')-' - regex += '(' + '|'.join(VARIANT_TYPE_DICT['pictest']) + ')-' regex += '(' + '|'.join(VARIANT_TYPE_DICT['debuggable']) + ')-' regex += '(' + '|'.join(VARIANT_TYPE_DICT['jvmti']) + ')-' regex += '(' + '|'.join(VARIANT_TYPE_DICT['cdex_level']) + ')-' @@ -860,12 +852,11 @@ def parse_test_name(test_name): _user_input_variants['gc'].add(match.group(7)) _user_input_variants['jni'].add(match.group(8)) _user_input_variants['image'].add(match.group(9)) - _user_input_variants['pictest'].add(match.group(10)) - _user_input_variants['debuggable'].add(match.group(11)) - _user_input_variants['jvmti'].add(match.group(12)) - _user_input_variants['cdex_level'].add(match.group(13)) - _user_input_variants['address_sizes'].add(match.group(15)) - return {match.group(14)} + _user_input_variants['debuggable'].add(match.group(10)) + _user_input_variants['jvmti'].add(match.group(11)) + _user_input_variants['cdex_level'].add(match.group(12)) + _user_input_variants['address_sizes'].add(match.group(14)) + return {match.group(13)} raise ValueError(test_name + " is not a valid test") |