summaryrefslogtreecommitdiff
path: root/runtime/parsed_options_test.cc
AgeCommit message (Collapse)Author
2025-01-21Enable Generational CMC Lokesh Gidra
Flag: art_performance.use_generational_cmc Bug: 343220989 Test: art/test/testrunner/testrunner.py --host with combinations of: ART_USE_READ_BARRIER=true/false, ART_USE_GENERATIONAL_GC=true/false, and ART_USE_GENERATIONAL_CC=true/false Change-Id: Ic01d37c3c0ead996a0cdbd99fb139b1f583ab858
2024-01-24Add visibility attributes in runtime/p* Dmitrii Ishcheikin
Bug: 260881207 Test: presubmit Test: abtd app_compat_drm Test: abtd app_compat_top_100 Test: abtd app_compat_banking Change-Id: Iefca20560bc1753d53e2e1e21daa38c4b6a19fff
2023-05-02riscv64: disable gtests for unsupported components. Ulya Trafimovich
Bug: b/271573990 Test: gtests on host: lunch aosp_riscv64-userdebug && m test-art-host-gtest Test: gtests on target (on a Linux RISC-V VM): lunch aosp_riscv64-userdebug export ART_TEST_SSH_USER=ubuntu export ART_TEST_SSH_HOST=localhost export ART_TEST_SSH_PORT=10001 export ART_TEST_ON_VM=true . art/tools/buildbot-utils.sh art/tools/buildbot-build.sh --target # Create, boot and configure the VM. art/tools/buildbot-vm.sh create art/tools/buildbot-vm.sh boot art/tools/buildbot-vm.sh setup-ssh # password: 'ubuntu' art/tools/buildbot-cleanup-device.sh art/tools/buildbot-setup-device.sh art/tools/buildbot-sync.sh art/tools/run-gtests.sh Change-Id: I278e3453406a91a5e9d03645cafb9a9d1f82d896
2022-03-14Use real functions in ParsedOptions test. Peter Collingbourne
Make this test more realistic by using functions with the correct type. Change-Id: Ie3b48adb4ae67d70fceeac33416a7451aeec53b1
2021-05-24Make the runtime option -Ximage a ParseStringList Victor Hsieh
Previously, the string spliting is done in multiple code locations, including ImageSpace::BootImageLayout::LoadOrValidate and GetPrimaryImageLocation (which may be called multiple times). This change converts the -Ximage option from a string into a ParseStringList<':'>. It may be worth pointing out that this doesn't change the current code expectation that each image can have a profile (e.g. "/path/to/foo.art!/some/profile.prof"). There is a later plan to introduce new options of boot image fds with ParseIntList<':'>. This change would make them more consistent. Bug: 187327262 Test: boot looks normal Test: dexopt looks normal Test: TH Change-Id: I82657cb725cda2d3b782cbe7a6e6d9a871e80ee7
2020-07-29Revert^3 "VIXL simulator for ART (Stage1)" Ulya Trafimovich
This reverts commit e886d68b9c40c941d8966b9c90d0e265c75fb19e. Reason for revert: simulator implemention is not ready yet. Test: lunch aosp_cf_x86_phone-userdebug && m Test: art/test.py --run-test --optimizing --host Change-Id: I03c8c09ea348205b0238d7a26caef3477cd6ae3b
2020-07-17Revert^2 "VIXL simulator for ART (Stage1)" Ulyana Trafimovich
This reverts commit 3060bb919cd2f37c6a97e87c1581ac5294af72b3. Reason for revert: relanding original change. The fix is setting `device_supported: false` for libart(d)-simulator module in the .bp file (`m checkbuild` attempted to build it for arm32 and failed). Original commit message: VIXL simulator for ART (Stage1) Quick User Guide: test/README.simulator.md This CL enables running ART run-tests in a simulator on host machine. Some benefits of using this simulator approach: - No need to use a target device at all. Save developers from solving the device troubles: build, flash, usb, adb, etc. - Speed up development/debug/test cycle. - Allows easy debugging/testing new instruction features without real hardware. - Allows using a smaller AOSP Android manifest master-art. The Stage1 CL provides support for running 30% of current run-tests. The rest unsupported test cases are kept in knownfailures.json. Future work will be supporting proper stack frame layout between simulator and quick entrypoints, so that stack walk, QuickArgumentVisitor, deoptimization, etc can be supported. This CL adds libart(d)-simulator-container library to the ART APEX. It has caused the following increase of the APEX size (small, about 0.13% for release APEX, measured for target aosp_arm64-userdebug): Before: 88992 com.android.art.debug.apex 51612 com.android.art.release.apex 112352 com.android.art.testing.apex After: 89124 com.android.art.debug.apex 51680 com.android.art.release.apex 112468 com.android.art.testing.apex Change-Id: I461c80aa9c4ce0673eef1c0254d2c539f2b6a8d5 Test: art/test.py --run-test --optimizing --simulate-arm64 Test: art/test.py --run-test --optimizing --host Test: m test-art-host-gtest
2020-07-16Revert "VIXL simulator for ART (Stage1)" Ulyana Trafimovich
This reverts commit 48ca6a681efe1fa1cf82d8af918bf9bbfd35ae96. Reason for revert: broken build 6685551 on aosp-master on full-eng Bug: 161440641 Change-Id: I849fe53f56c4786f0f2a1605cbfd215559f11072
2020-07-16VIXL simulator for ART (Stage1) Xueliang Zhong
Quick User Guide: test/README.simulator.md This CL enables running ART run-tests in a simulator on host machine. Some benefits of using this simulator approach: - No need to use a target device at all. Save developers from solving the device troubles: build, flash, usb, adb, etc. - Speed up development/debug/test cycle. - Allows easy debugging/testing new instruction features without real hardware. - Allows using a smaller AOSP Android manifest master-art. The Stage1 CL provides support for running 30% of current run-tests. The rest unsupported test cases are kept in knownfailures.json. Future work will be supporting proper stack frame layout between simulator and quick entrypoints, so that stack walk, QuickArgumentVisitor, deoptimization, etc can be supported. This CL adds libart(d)-simulator-container library to the ART APEX. It has cause the following increase of the APEX size (small, about 0.13% for release APEX, measured for target aosp_arm64-userdebug): Before: 88992 com.android.art.debug.apex 51612 com.android.art.release.apex 112352 com.android.art.testing.apex After: 89124 com.android.art.debug.apex 51680 com.android.art.release.apex 112468 com.android.art.testing.apex Test: art/test.py --run-test --optimizing --simulate-arm64 Test: art/test.py --run-test --optimizing --host Test: m test-art-host-gtest Change-Id: I078812dde9aaf7128d9f262b2102251927596b7f
2020-02-14Remove MIPS support from runtime/. Vladimir Marko
Test: aosp_taimen-userdebug boots. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 147346243 Change-Id: If1fc8be94caa69f734438d7a1f4c715addfd8876
2019-05-03Add -verbose:interpreter Mathieu Chartier
Adds a mode to track what methods are being interpreted. Good for debugging interpreter usage during app startup. Bug: 130185360 Test: test-art-host Change-Id: I8119f79e534cdad7d6a72d4f01115a288e9c8d9a
2019-04-20Make kHugeNativeAllocs configurable Hans Boehm
Add -XX:StopForNativeAllocs command line argument to replace kHugeNativeAllocs constant. The default remains at 1 GB. But This default will allow small memory devices to run out of memory if we allocate Java owned native memory faster than what the GC can keep up with. Setting it to a smaller value should prevent that. Bug: 122552730 Test: Boot AOSP, Treehugger Change-Id: I5c84b2f1f67038e1b7a0ca3f5fc08090359c5f3e
2019-03-25Hide conscrypt package classes for app AOT compilation. Vladimir Marko
Since app AOT compilation is usually done without conscrypt on the boot class path, classes defined by app class loader in conscrypt packages could be resolved differently, i.e. from conscrypt, at runtime. Reject such definitions during AOT compilation to ensure correct runtime behavior. Add a test that when compiling the conscrypt module as an app, we cannot resolve any class defined in its dex files. Test: module_exclusion_test Bug: 122937705 Change-Id: I1fcb4c21937f59772206ee50b688a75053231bc0
2019-01-18ART: make generational CC a runtime option Albert Mingkun Yang
Add -Xgc:[no]generational_cc option to control whether generational Concurrent Copy collector is enabled when art is launched. Repurpose the environment variable and preprocessor macro name `ART_USE_GENERATIONAL_CC` to selecting the default behavior (if unset, the default is to use Generational CC collection by default). Test: Run art with -Xgc:[no]generational_cc along with -XX:DumpGCPerformanceOnShutdown on some benchmarks to see if minor GC runs. parsed_options_test is updated to test this new option. Test: make test-art-host-gtest-parsed_options_test Test: make test-art-target-gtest-parsed_options_test Bug: 112187497 Bug: 67628039 Change-Id: I6b4660b06f7e793911a2601bed24c33777190741
2018-12-07Revert^2 "Pass boot class path to ImageSpace::LoadBootImage." Vladimir Marko
This reverts commit db4b1deebf425be5f1d0f597d1ef540f19908324. Fixed JDWP tests, see "Test:" stanzas below. Change-Id: I6fb56ac990b78164cbd3f93c9f6df66e0dd9a813 Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: Pixel 2 XL boots. Test: m test-art-target-gtest Test: testrunner.py --target --optimizing Test: run-libcore-tests.sh --mode=device --variant=X64 Test: run-jdwp-tests.sh --mode=host --variant=X64 Test: run-jdwp-tests.sh --mode=device --variant=X64 Bug: 119868597
2018-12-07Revert "Pass boot class path to ImageSpace::LoadBootImage." Vladimir Marko
This reverts commit d19085141ad9c71eae1b0ff585999ac8e27dadd4. Also squash a revert of Fix oatdump tests on target. (commit 77eea0898aca2881a87afd177a0422870c39a318) Reason for revert: Broke JDWP tests. Bug: 119868597 Change-Id: I005097d2d96014c961e5a4c0b089e7675004febc
2018-12-06Pass boot class path to ImageSpace::LoadBootImage. Vladimir Marko
When loading the boot image by ImageSpace, do not rely on the boot class path (BCP) recorded in the primary boot image oat file. Instead, check the BCP from image against the BCP provided by the Runtime, i.e. from -Xbootclasspath:_ or the environment variable BOOTCLASSPATH. For now, allow Runtime to extract the BCP from the primary boot image oat file when we have -Ximage:_ but no BCP. Also pass the boot class path components down to the OatFile so that we can open and use the original dex files when we do not have copies in the vdex files. This allows compiling app prebuilts when the boot dex files are uncompressed and aligned in the original jars. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: Pixel 2 XL boots. Test: m test-art-target-gtest Test: testrunner.py --target --optimizing Test: run-libcore-tests.sh --mode=device --variant=X64 Test: Manually create boot image jars with uncompressed and aligned dex files, compile a boot image with dex files not copied into vdex files and use this boot image for compiling a prebuilt services.{art,vdex,odex}. Bug: 119868597 Change-Id: If9411ddbecf6bb90bfa9233040931c5e833f6aee
2018-12-03Add support for ANDROID_RUNTIME_ROOT variable Neil Fuller
This commit introduces the ANDROID_RUNTIME_ROOT environment variable in preparation for its use within the runtime module. As a module, ART must no longer use the Android-wide ANDROID_ROOT environment variable as the base of default paths for module content. ANDROID_RUNTIME_ROOT will take over the responsibility. It remains a variable to unify host and device treatment. Some test methods (SetUpAndroidData, TearDownAndroidData SetUpAndroidRoot) have been renamed to clarify their purpose. Bug: 119935277 Test: build / treehugger Change-Id: I7c7de52911cbfa56cef90270425ed369176c4767
2018-04-06Delete MarkCompact GC Mathieu Chartier
Test: test-art-host Bug: 77721758 Change-Id: I99889353eb97f46c59de7ed44f2944f83867031d
2016-12-15ART: Move to libbase StringPrintf Andreas Gampe
Remove ART's StringPrintf implementation. Fix up clients. Add missing includes where necessary. Test: m test-art-host Change-Id: I564038d5868595ac3bb88d641af1000cea940e5a
2015-12-18Merge "ART: Refactor CommonRuntimeTest::SetUp" am: fae1db92d8 Andreas Gampe
am: db2980ae9e * commit 'db2980ae9eca19a577df27b1f05912ed482fb88c': ART: Refactor CommonRuntimeTest::SetUp
2015-12-17ART: Refactor CommonRuntimeTest::SetUp Andreas Gampe
Factor out finishing up the runtime. This code will execute the interpreter to initialize important classes etc., which is not necessary for testing RuntimeMethod sizes and trampoline entrypoints, in fact it may violate pointer-size invariants. Also add InstructionSet parsing tests to the ParsedOptions test. Change-Id: I75cd00c6d358e1bc962c8f1845244f6400c1cd6c
2015-12-16Merge "Revert "Revert "Introduce support for hardware simulators, starting ↵ Roland Levillain
with ARM64""" am: 4741516396 am: 1660132f68 * commit '1660132f6885de43ee469c38aefc8214b48d89bd': Revert "Revert "Introduce support for hardware simulators, starting with ARM64""
2015-12-16Merge "Revert "Revert "Introduce support for hardware simulators, starting ↵ Roland Levillain
with ARM64"""
2015-12-08Merge "Allow initializing runtime with parsed options." am: e0d25b156e am: ↵ Vladimir Marko
2433d4e17c am: 0b81f1715d * commit '0b81f1715d6af9f98f982d6511e48973aa5a836a': Allow initializing runtime with parsed options.
2015-12-07Allow initializing runtime with parsed options. Vladimir Marko
Needed by upcoming refactoring of dex2oat to allow early writing of dex files to the oat file. Change-Id: Ia13c26132846801522f181f51f64035d625e8416
2015-11-12Merge lmp changes into mnc. Narayan Kamath
Most merge conflicts are due to changes in the string representation. They have been resolved in favour of "mnc-dev" since we've changed the string representation there. Other changes relate to the fact that there are now two jars in libcore (core-oj and core-libart). Change-Id: I1fcc6e5f8dab8d1954dcddca0493563e7677d433
2015-11-12Fix for gtest missing core classes, attempt 2 Przemyslaw Szczepaniak
common_runtime_test loads both core-libart and core-oj Change-Id: I8a4d5750b99aed2e500cad89b841a57fe9c1ca69
2015-11-06Revert "Revert "Introduce support for hardware simulators, starting with ARM64"" Phil Wang
This reverts commit 4cd27d64b0bbdde61fa3f6674ceb24221853ac2c. This depends on VIXL 1.11. Change-Id: I402c1fd6bbb218ba80ef8e59af203c9276151059
2015-08-04Revert "cleanup: Replace pointers with out-parameters and fix-up formatting" Igor Murashkin
This reverts commit a315f5c546b796f55f4872bb6efc15eb858d9639. -- Revert "runtime: cleanup class_linker out-parameters and formatting" This reverts commit bc1d78daa463572c5a770cdca858a3b51d8e1b7b. -- Revert "base: replace raw pointers for out-parameters with safer out<T>" This reverts commit fb326cffc679cab8eb873b9e44795706f023cb3c.
2015-07-31cleanup: Replace pointers with out-parameters and fix-up formatting Igor Murashkin
Cleans all of oat_file.h/.cc, parsed_options.h./cc, runtime.h/.cc Other files are touched only incidentally to use outof(x) instead of &x. Change-Id: I0bb15111149d53bb21aac2199ef33bd35333b0ca
2015-04-22Replace NULL with nullptr Mathieu Chartier
Also fixed some lines that were too long, and a few other minor details. Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
2015-02-17art: Fix bug in VariantMap::Set Igor Murashkin
Bug: 19295410 Change-Id: I7827583846d710698c0e7bc0ec1a2c3bf901bd50
2015-02-04art: Try to fix parsed_options_test on the build server Igor Murashkin
(It works fine locally because environment variables are defined differently) Also some minor cleanup elsewhere pointed out in the previous code review. Change-Id: I80650d2be6ce467b838db85eb130a0020d7c1480
2015-02-04art: Refactor RuntimeOptions/ParsedOptions Igor Murashkin
Refactor the RuntimeOptions to be a type-safe map (VariantMap, see runtime_options.h) and the ParsedOptions to delegate the parsing to CmdlineParser (see cmdline/cmdline_parser.h). This is the start of a command line parsing refactor, and may include more in the future (dex2oat, patchoat, etc). For more details of the command line parsing generator usage see cmdline/README.md Change-Id: Ic67c6bca5e1f33bf2ec60e2e3ff8c366bab91563
2014-10-10Fix 2 new sets of clang compiler warnings. Ian Rogers
Fix issues that are flagged by -Wfloat-equal and -Wmissing-noreturn. In the case of -Wfloat-equal the current cases in regular code are deliberate, so the change is to silence the warning. For gtest code the appropriate fix is to switch from EXPECT_EQ to EXPECT_(FLOAT|DOUBLE)_EQ. The -Wmissing-noreturn warning isn't enabled due to a missing noreturn in gtest. This issue has been reported to gtest. Change-Id: Id84c70c21c542716c9ee0c41492e8ff8788c4ef8
2014-07-15Break apart header files. Ian Rogers
Create libart-gtest for common runtime and compiler gtest routines. Rename CompilerCallbacksImpl that is quick compiler specific. Rename trace clock source constants to not use the overloaded profiler term. Change-Id: I4aac4bdc7e7850c68335f81e59a390133b54e933
2014-05-19Now we have a proper C++ library, use std::unique_ptr. Ian Rogers
Also remove the Android.libcxx.mk and other bits of stlport compatibility mechanics. Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61
2014-05-15Compatibility layer to transition from UniquePtr to std::unique_ptr. Ian Rogers
Use ART_WITH_STLPORT (enabled for the target) to cause the use of UniquePtr, for the host switch to std::unique_ptr. For now the type remains called UniquePtr. Make dalvik compile with clang on the host, move its build to C++11. Change-Id: I5ba8d2757904bc089ed62047ea03de3c0853fb12
2014-03-04Remove oat file location in the image. Nicolas Geoffray
The oat file is now always in the same directory, and has the same name as the image file. Only difference is the extension. This also removes the need for host-prefix. Change-Id: I16d1f7aeb1d58372d41921694664e9c321afc1ad
2014-03-03Add ART -help and -showversion Brian Carlstrom
Bug: https://code.google.com/p/android/issues/detail?id=62149 Change-Id: I5c21c0433f5f341f94e7d977e8d2d69cc46d6fe3