summaryrefslogtreecommitdiffstats
path: root/runtime/common_runtime_test.h
Commit message (Collapse)AuthorAgeFilesLines
* ART: Fix mips64 jni bugs.Douglas Leung2015-05-061-1/+1
| | | | | | | | | For mips64, 32-bits loads can be zero extended or sign extended to 64-bits. The extension type must match the data type to be loaded. Also re-enable mips64 generic jni testing. Change-Id: I9cabaf80b4fde63d9868fccd74593b36d1c324e8
* Move GetAndroidToolsDir to common location.David Srbecky2015-04-211-0/+7
| | | | | | | Move the code which looks for the prebuilts directory to CommonRuntimeTest and add test for it. Change-Id: Id804de31c466656957fdd4b6a470f80a00477aed
* ART: Refactor callbacks_ in common_runtime_testAndreas Gampe2015-03-291-1/+2
| | | | | | | The callback is now important for some runtime checks, and just resetting callbacks_ is not correct anymore. Change-Id: I2cb806f1916fd5ea190911a833ce460be557a428
* ART: PathClassLoader for compilerAndreas Gampe2015-03-271-0/+7
| | | | | | | | | | | | | | | | | | | | Use an actual PathClassLoader when compiling apps, instead of a side structure and cutout. This CL sets up a minimal object 'cluster' that recreates the Java side of a regular ClassLoader such that the Class-Linker will recognize it and use the internal native fast-path. This CL removes the now unnecessary compile-time-classpath and replaces it with a single 'compiling-the-boot-image' flag in the compiler callbacks. Note: This functionality is *only* intended for the compiler, as the objects have not been completely initialized. Bug: 19781184 Change-Id: I7f36af12dd7852d21281110a25c119e8c0669c1d
* Create OatFileAssistant class for assisting with oat files.Richard Uhler2015-03-091-0/+8
| | | | | | | | | | | | | | | The oat file assistant is used for determining whether dex2oat or patchoat is needed, for running dex2oat or patchoat as needed to make an oat file up to date, and to load dex files associated with a given dex location. The introduction of the OatFileAssistant class is meant to clean up and consolidate code related to the management of oat files that was duplicated and spread across dalvik_system_DexFile.cc and class_linker.cc. Bug: 11301553 Change-Id: I0c16027b9bae4570c2c50faa9c14f581c0cbafb8
* art: Refactor RuntimeOptions/ParsedOptionsIgor Murashkin2015-02-041-4/+4
| | | | | | | | | | | | | 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
* Use unique_ptr to track ownership of dex files.Richard Uhler2015-01-131-7/+11
| | | | | Bug: 18809837 Change-Id: Ie571eae8fc19ee9207390cff5c7e2a38071b126a
* Remove back-door bootclasspath option from RuntimeRichard Uhler2015-01-081-1/+1
| | | | | | | | | | | | | | | | | The 'bootclasspath' option allowed users of the Runtime to load their own boot class path DexFiles and pass them directly to the Runtime as an option. This obscures the fact that the Runtime must take ownership of the boot class path DexFiles. This change removes the use of the bootclasspath option by dex2oat and the common runtime tests. For dex2oat, we use the existing -Xbootclasspath option instead, and introduce a new -Xbootclasspath-locations option to override the dex locations for the loaded boot class path dex files. For the common runtime tests, we simply use -Xbootclasspath. Bug: 18809837 Change-Id: Idfcd4885390bf0f3dc350993756dd337220def73
* ART: Swap-space in the compilerAndreas Gampe2014-12-221-0/+1
| | | | | | | | | | | Introduce a swap-space and corresponding allocator to transparently switch native allocations to memory backed by a file. Bug: 18596910 (cherry picked from commit 62746d8d9c4400e4764f162b22bfb1a32be287a9) Change-Id: I131448f3907115054a592af73db86d2b9257ea33
* Add a new imgdiag tool to diff boot.art/core.art against a processIgor Murashkin2014-12-161-0/+8
| | | | | | | | | | | | | | Analyze the dirty memory pages of a running process per-object, this allows is to to fine-tune the dirty object binning algorithm in image writer. Also: * Factor out oatdump command line parsing code into cmdline.h * Factor out common build rules for building variations of binaries * Add a gtest for imgdiag Bug: 17611661 Change-Id: I3ac852a0d223af66f6d59ae5dbc3df101475e3d0
* Remove portable.Elliott Hughes2014-12-121-10/+0
| | | | Change-Id: I3bf3250fa866fd2265f1b115d52fa5dedc48a7fc
* Remove -Wno-unused-parameter and -Wno-sign-promo from base cflags.Ian Rogers2014-11-031-1/+1
| | | | | | | | | | | Fix associated errors about unused paramenters and implict sign conversions. For sign conversion this was largely in the area of enums, so add ostream operators for the effected enums and fix tools/generate-operator-out.py. Tidy arena allocation code and arena allocated data types, rather than fixing new and delete operators. Remove dead code. Change-Id: I5b433e722d2f75baacfacae4d32aef4a828bfe1b
* Prevent stubs from being installed in java.lang.reflect.Proxy.<init>.Jeff Hao2014-08-151-6/+0
| | | | | | | This CL is a better fix for proxy tracing and undoes the changes in https://android-review.googlesource.com/#/c/103025/ Change-Id: Ie82bb49f07774bd08a6720ddbe5b1f8ee9363acf
* Fix bugs in the x86 and arm versions of generic JNI.Nicolas Geoffray2014-08-141-0/+6
| | | | | | | | | Also fix the run script of 116-nodex2oat to use the non-prebuild script for target. Bug: 17000769 Change-Id: I439fcd710fb8bb408f3288ff8fb34fef23890adb
* Wire up check JNI force copy mode.Ian Rogers2014-08-081-1/+1
| | | | | | | | | | | | Increase check JNI checks. Break apart jni_internal.h in to jni_env_ext.h and java_vm_ext.h. Fix the abuse of ScopedObjectAccess/annotalysis by ScopedCheck in the case of VM routines. Make class loader override and shared library class loader JNI global references rather than mirror pointers. Clean-ups to native bridge. Change-Id: If7c6110b5aade7a402bfb67534af86a7b2cdeb55
* ART: Remove test files after testAndreas Gampe2014-08-061-1/+7
| | | | | | | | The unix_file tests should remove files and directories when they are done testing. Bug: 16505797 Change-Id: Iff6856f64ee42ee9818b4ac23a6de3fe7eec6eae
* Fix proxy tracing and enable tests that now work with tracing.Jeff Hao2014-08-061-0/+8
| | | | | | | Also updates proxy_test to generate an image for GetQuickOatCodeFor. Bug: 16386215 Change-Id: Ie7daad3d73ea7b60187bc1e7037ade0df8277107
* Runtime can now be set to require relocationAlex Light2014-07-221-0/+2
| | | | | | | | | | | | | | Add a pair of runtime flags -Xrelocate and -Xnorelocate that can force the runtime to require that all files that are run are relocated, to prevent attacks based on the known art base address. Add support for running patchoat on oat files compiled without an image. Change run-test to have new --prebuild and --relocate flags. Bug: 15358152 Change-Id: I91166c62dd1ab80e5cbcb7883a2cd0d56afca32d
* Break apart header files.Ian Rogers2014-07-151-292/+41
| | | | | | | | 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
* Add missing class initialization during compilation and testsSebastien Hertz2014-07-101-0/+1
| | | | | | | | | | | | | | | | | Adds missing class initialization during compilation and tests, especially java.lang.Class. Otherwise, we'd be able to execute code while the referring class is not initialized or initializing. Also adds mirror::Class::AssertInitializedOrInitializingInThread method to check class initialization when entering the interpreter: the called method's declaring class must either be initialized or be initializing by the current thread (other threads must be waiting for the class initialization to complete holding its lock). Note we only do this check in debug build. Bump oat version to force compilation. Bug: 15899971 Change-Id: I9a4edd3739a3ca4cf1c4929dcbb44cdf7a1ca1fe
* Use the icu4c headers from the new location.Elliott Hughes2014-07-091-1/+1
| | | | Change-Id: I6ca56e8f9909bf3644a5f79f2d705547ddba6d03
* Merge "ART: Use ANDROID_HOST_OUT for ANDROID_ROOT in Runtime tests"Andreas Gampe2014-06-251-17/+27
|\
| * ART: Use ANDROID_HOST_OUT for ANDROID_ROOT in Runtime testsAndreas Gampe2014-06-251-17/+27
| | | | | | | | | | | | | | | | On the host, if ANDROID_ROOT is not set, first try ANDROID_HOST_OUT. This will ensure that builds with OUT_DIR_COMMON_BASE will run the gtests correctly, as icu will use ANDROID_ROOT to look for a file. Change-Id: I8988901be32249c1c79f96b36947a647df5de041
* | ART: Native support for multidexAndreas Gampe2014-06-251-20/+38
|/ | | | | | | | | | | | | | | | | | | | Native support for zip files with multiple classesX.dex. Works by explicitly looking for those files in ascending order. As these files have no file system representation for themselves, introduce synthetic dex locations: the name of the originating file plus a colon plus the name of the dex file, e.g., test.jar:classes2.dex. Opening a zip dex file will return all dex files in this way. This keeps the changes to dex2oat minimal. To hide multidex/synthetic names from the Java layer, let the handle of dalvik.system.DexFile refer to a vector of DexFile objects. When opening a location, test possible synthetic names and add them to the vector. Thus, the original multidex jar in the classpath will be associated with all embedded dex files. Change-Id: I0de107e1369cbc94416c544aca3b17525c9eac8b
* Multilib ART host.Ian Rogers2014-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Build ART for the host as a multilib project with dalvikvm32 and dalvikvm64 running as 32 or 64-bit repsectfully. Note, currently multilib host builds are not the default, you make the so by setting BUILD_HOST_64bit=1. Extend tests to execute in both 32 and 64-bit modes. By default both 32 and 64-bit tests are run, add 32 or 64 to the end of a test name to run it in purely that flavor. Given the extra spam, modify oat tests to only generate console output when the test fails. Change the test harness so that common commands are run when a test should be skipped, when it passes or when it fails. Use these commands to generate a summary of passing, skipped and failing tests. Tests will be skipped if they are known to be broken or if a test has already failed. Setting the variable TEST_ART_KEEP_GOING=true will force working tests not to be skipped. In this change all tests running on the optimizing compiler are marked broken due to breakages running them in a multilib environment. Break apart Android.common.mk into its constituent parts, along with other pieces of reorganization. Stylistic nit, we refer to make rule targets as targets thereby overloading the term target. While consistent with make's terminology, its confusing with the Android notion of target. I've switched to just calling targets rules to avoid confusion in host tests. Change-Id: I5190fc3de46800a949fbb06b3f4c258ca89ccde9
* Now we have a proper C++ library, use std::unique_ptr.Ian Rogers2014-05-191-3/+3
| | | | | | | Also remove the Android.libcxx.mk and other bits of stlport compatibility mechanics. Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61
* Add ISA directory to image and odex pathnames.Brian Carlstrom2014-05-161-6/+15
| | | | | | Bug: 14882223 Bug: 14694978 Change-Id: Ic1b5ae836b8e91ea461dcd4f3da8e38dc3bec00f
* Compatibility layer to transition from UniquePtr to std::unique_ptr.Ian Rogers2014-05-151-1/+1
| | | | | | | | | 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
* ART: Fix assembler_test to use ScratchFileAndreas Gampe2014-05-021-0/+3
| | | | | | | | | This removes a warning about tmpnam usage. Also add an assertion to ScratchFile about ANDROID_DATA being set, which it relies on for the temp directory. Change-Id: I1202f92e48e61492f0ed3ac36ff44fde34dbb0e1
* Build changes to build multilib testsAndreas Gampe2014-04-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | Test files will be emitted into directories for both first and second target architectures. Going with the naming scheme for binaries, single-architecture and 32b cases have the standard name, and 64b goes into a directory with "64" suffix. In multi-architecture setups, the default concrete test targets are extended with a "32" and "64" suffix, e.g., test-art-target-oat-JniTest64. The suffix-less form is linked to the primary architecture target (usually 64). That means running combined targets, e.g., test-art-target-oat, will only test the primary architecture right now. Fixed target run tests calling the right dalvikvm. Fixed library search path for tests derived from CommonRuntimeTest. Missing in this work-in-progress is correct handling of dex2oat for the secondary architecture. To make it work on 64b, comment out line 101 in build/Android.executable.mk Change-Id: I3d260994e6efe8b73b56c71994053cc9392943a9
* Make test-art pass with heap reference poisoning enabled.Hiroshi Yamauchi2014-03-191-0/+7
| | | | | | | | | Heap reference poisoning is currently interpreter only. This change disables one compiler driver test that actually invokes compiled code if heap reference poisoning is enabled. Bug: 12687968 Change-Id: Ia9516f4067d84e9a4de50d9ff44cfbe38f282d16
* Reuse NoopCompilerCallbacks in oatdumpBrian Carlstrom2014-03-041-11/+1
| | | | Change-Id: Icb4d3941196c1a236f0184fe4d0b7f5838bc13bd
* Remove oat file location in the image.Nicolas Geoffray2014-03-041-0/+9
| | | | | | | | | 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
* Split up CommonTest into CommonRuntimeTest and CommonCompilerTestBrian Carlstrom2014-02-261-0/+358
Change-Id: I8dcf6b29a5aecd445f1a3ddb06386cf81dbc9c70