summaryrefslogtreecommitdiffstats
path: root/runtime/common_test.h
Commit message (Collapse)AuthorAgeFilesLines
* Split up CommonTest into CommonRuntimeTest and CommonCompilerTestBrian Carlstrom2014-02-261-782/+0
| | | | Change-Id: I8dcf6b29a5aecd445f1a3ddb06386cf81dbc9c70
* Merge "Create CompilerOptions"Brian Carlstrom2014-02-251-38/+15
|\
| * Create CompilerOptionsBrian Carlstrom2014-02-241-38/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Package up most compiler related options in CompilerOptions. Details include: - Includes compiler filter, method thresholds, SEA IR mode. - Excludes those needed during Runtime::Init such as CompilerCallbacks and VerificationResults. - Pass CompilerOptions to CompilerDriver. - Remove CompilerOptions from Runtime. - Add ability to pass options for app and image dex2oat to runtime via -Xcompiler-option and -Ximage-compiler-option respectively. Other - Replace 2x CompilerCallbacks implementations with one. - Factor out execv code for use by both image and oat generation. - More OatFile error_msg reporting. - DCHECK for SuspendAll found trying to run valgrind. Change-Id: Iecb57da907be0c856d00c3cd634b5042a229e620
* | Avoid std::string allocations for finding an array class.Ian Rogers2014-02-241-6/+10
|/ | | | | | | | | | | | Introduce ClassLinker::FindArrayClass which performs an array class lookup given the element/component class. This has a 16 element cache of recently looked up arrays. Pass the current thread to ClassLinker Find .. Class routines to avoid calls to Thread::Current(). Avoid some uses of FindClass in the debugger where WellKnownClasses is a faster and more compacting GC friendly alternative. Change-Id: I60e231820b349543a7edb3ceb9cf1ce92db3c843
* Fixes to allow test-art-host to run via build serverBrian Carlstrom2014-02-191-2/+16
| | | | Change-Id: Ifc4259ab03cb3867b625c2e1edf4352398c8a8e8
* Rewrite the compiler interface for CompilerDriver.Nicolas Geoffray2014-02-181-2/+5
| | | | Change-Id: I15fa9afe7ffb7283ebda8d788a1e02793e3f75a6
* Work in the direction of hard float quick ABIs.Ian Rogers2014-02-111-6/+20
| | | | | | | | | | Pass a shorty to ArtMethod::Invoke so that register setup can use it. Document x86-64 ABI. Add extra debug output for one JNI native method registration fails, namely a dump of the Class and its dex file's location. Add hack to get testing of OatMethod's without GC maps working in 64bit. Change-Id: Ic06b68e18eac33637df2caf5e7e775ff95ae70f3
* Merge "Re-apply: Implement cumulative timings for CompilerDriver."Nicolas Geoffray2014-02-111-2/+5
|\
| * Re-apply: Implement cumulative timings for CompilerDriver.Nicolas Geoffray2014-02-111-2/+5
| | | | | | | | | | | | | | The bug was due to how the test infrastructure works: a compiler driver surives the stack where it is allocated. Change-Id: I345fe0e4afb2bd15937233db8afb350f09429558
* | Revert "Revert "Check FastInstance() early for special getters and setters.""Vladimir Marko2014-02-101-1/+1
| | | | | | | | | | | | This reverts commit 632e458dc267fadfb8120be3ab02701e09e64875. Change-Id: I5098c41ee84fbbb39397133a7ecfd367fecebe42
* | Revert "Check FastInstance() early for special getters and setters."Ian Rogers2014-02-081-1/+1
| | | | | | | | | | | | This reverts commit 5dc5727261e87ba8a418e2d0e970c75f67e4ab79. Change-Id: I3299c8ca5c3ce3f2de994bab61ea16a734f1de33
* | Check FastInstance() early for special getters and setters.Vladimir Marko2014-02-071-1/+1
|/ | | | | | | | | | | | Perform the FastInstance() check for getters and setters when they are detected by the inliner. This will help avoid the FastInstance() check for inlining. We also record the field offset and whether the field is volatile and whether the method is static for use when inlining or generating the special accessors. Change-Id: I3f832fc9ae263883b8a984be89a3b7793398b55a
* Object model changes to support 64bit.Ian Rogers2014-02-061-33/+46
| | | | | | | | | | | | | | | | | | | | | | | Modify mirror objects so that references between them use an ObjectReference value type rather than an Object* so that functionality to compress larger references can be captured in the ObjectRefererence implementation. ObjectReferences are 32bit and all other aspects of object layout remain as they are currently. Expand fields in objects holding pointers so they can hold 64bit pointers. Its expected the size of these will come down by improving where we hold compiler meta-data. Stub out x86_64 architecture specific runtime implementation. Modify OutputStream so that reads and writes are of unsigned quantities. Make the use of portable or quick code more explicit. Templatize AtomicInteger to support more than just int32_t as a type. Add missing, and fix issues relating to, missing annotalysis information on the mutator lock. Refactor and share implementations for array copy between System and uses elsewhere in the runtime. Fix numerous 64bit build issues. Change-Id: I1a5694c251a42c9eff71084dfdd4b51fff716822
* Bionic has <sys/ucontext.h> now.Elliott Hughes2014-01-301-5/+1
| | | | Change-Id: I7b97df04204b22e8976b64bf93af72a311ddb0e9
* Refactor verification results.Vladimir Marko2014-01-281-13/+13
| | | | | | | | Rename VerificationMethodsData to VerificationResults. Create new class VerifiedMethod to hold all the data for a given method. Change-Id: Ife1ac67cede20f3a2f9c7f5345f08a851cf1ed20
* Revert "Implement cumulative timings for CompilerDriver."Brian Carlstrom2014-01-201-2/+1
| | | | This reverts commit df013175d1aa04641e5c6175f8c786e547d31654.
* Implement cumulative timings for CompilerDriver.Nicolas Geoffray2014-01-161-1/+2
| | | | Change-Id: I3b04de7f2717273f356b8120f68d69e2379bab2f
* Disallow JNI NewObjectArray of primitive types.Ian Rogers2014-01-031-2/+14
| | | | | | | | | | | | Also, make jni_internal_test execute via the interpreter rather than compile methods. Add tests for passing negative array sizes to JNI routines new functions. Re-enable the tests NewStringNullCharsNonzeroLength and NewDirectBuffer_GetDirectBufferAddress_GetDirectBufferCapacity. Test and explicitly fail if the initial value argument to NewObjectArray isn't assignable to that type of array. Use unchecked ObjectArray::Set with NewObjectArray with an initial value. Change-Id: If3491cb5f974b42cf70c1b850819265f9963ee48
* Fix test-art setup.Vladimir Marko2013-12-181-10/+48
| | | | Change-Id: I5762bd10d0bb8346541346b3d5711200a0208c4f
* Fix build - test issues.Sebastien Hertz2013-12-181-2/+10
| | | | | | Fix compilation errors in tests. Change-Id: Id2405edc2eec5bef9ebf5f241db03a0bb4a6b5a3
* Use the asm-generic ucontext.h for arm.Christopher Ferris2013-12-161-1/+1
| | | | | | | | There is no ucontext.h in uapi kernel headers, so use the generic one. This works with or without uapi kernel headers. Bug: 11559337 Change-Id: Ia6d1dafc15ead99c802be3873dcf20f428650585
* Remove a LOG(INFO) that's probably forgot to be removed.Hiroshi Yamauchi2013-11-181-1/+0
| | | | | | | I see lots of log lines "Parsing features " in tests. I assume this isn't intended to be left there. Change-Id: Icfcb5421ed72e86160c24230b1418de19e230376
* Fix memory leaks relating to timing logger.Ian Rogers2013-11-141-1/+2
| | | | | | | | | Bug: 11670287. We use pointers to uninitialized values for control-flow in the timing logger code, add TODO comments to clean this up later. Remove base namespace and other bits of tidying. Change-Id: I1e6600a1e92f974c8f58f3a405a4e4abb4d9f80f
* Compacting collector.Mathieu Chartier2013-11-111-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compacting collector is currently similar to semispace. It works by copying objects back and forth between two bump pointer spaces. There are types of objects which are "non-movable" due to current runtime limitations. These are Classes, Methods, and Fields. Bump pointer spaces are a new type of continuous alloc space which have no lock in the allocation code path. When you allocate from these it uses atomic operations to increase an index. Traversing the objects in the bump pointer space relies on Object::SizeOf matching the allocated size exactly. Runtime changes: JNI::GetArrayElements returns copies objects if you attempt to get the backing data of a movable array. For GetArrayElementsCritical, we return direct backing storage for any types of arrays, but temporarily disable the GC until the critical region is completed. Added a new runtime call called VisitObjects, this is used in place of the old pattern which was flushing the allocation stack and walking the bitmaps. Changed image writer to be compaction safe and use object monitor word for forwarding addresses. Added a bunch of added SIRTs to ClassLinker, MethodLinker, etc.. TODO: Enable switching allocators, compacting on background, etc.. Bug: 8981901 Change-Id: I3c886fd322a6eef2b99388d19a765042ec26ab99
* Make missing DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES an errorBrian Carlstrom2013-11-061-6/+2
| | | | Change-Id: I3ca23e4db80c8ab8a86da6408cf38daccd4cfaf1
* Support hardware divide instructionDave Allison2013-11-051-1/+123
| | | | | | | | | | | | | | | | | | | | | Bug: 11299025 Uses sdiv for division and a combo of sdiv, mul and sub for modulus. Only does this on processors that are capable of the sdiv instruction, as determined by the build system. Also provides a command line arg --instruction-set-features= to allow cross compilation. Makefile adds the --instruction-set-features= arg to build-time dex2oat runs and defaults it to something obtained from the target architecture. Provides a GetInstructionSetFeatures() function on CompilerDriver that can be queried for various features. The only feature supported right now is hasDivideInstruction(). Also adds a few more instructions to the ARM disassembler b/11535253 is an addition to this CL to be done later. Change-Id: Ia8aaf801fd94bc71e476902749cf20f74eba9f68
* Implement Interface Method Tables (IMT).Jeff Hao2013-10-291-3/+0
| | | | Change-Id: Idf7fe85e1293453a8ad862ff2380dcd5db4e3a39
* Throw IOException at source of failing to open a dex file.Ian Rogers2013-10-211-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before is: java.lang.ClassNotFoundException: Didn't find class "GCBench" on path: DexPathList[[zip file "/disk2/dalvik-dev/out/host/linux-x86/framework/GCBench.jar"],nativeLibraryDirectories=[/disk2/dalvik-dev/out/host/linux-x86/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) Suppressed: java.lang.ClassNotFoundException: GCBench at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 1 more Caused by: java.lang.NoClassDefFoundError: Class "LGCBench;" not found ... 5 more And after is: java.lang.ClassNotFoundException: Didn't find class "GCBench" on path: DexPathList[[zip file "/disk2/dalvik-dev/out/host/linux-x86/framework/GCBench.jar"],nativeLibraryDirectories=[/disk2/dalvik-dev/out/host/linux-x86/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) Suppressed: java.io.IOException: Zip archive '/disk2/dalvik-dev/out/host/linux-x86/framework/GCBench.jar' doesn't contain classes.dex at dalvik.system.DexFile.openDexFile(Native Method) at dalvik.system.DexFile.<init>(DexFile.java:80) at dalvik.system.DexFile.<init>(DexFile.java:59) at dalvik.system.DexPathList.loadDexFile(DexPathList.java:268) at dalvik.system.DexPathList.makeDexElements(DexPathList.java:235) at dalvik.system.DexPathList.<init>(DexPathList.java:113) at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48) at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:38) at java.lang.ClassLoader.createSystemClassLoader(ClassLoader.java:128) at java.lang.ClassLoader.access$000(ClassLoader.java:65) at java.lang.ClassLoader$SystemClassLoader.<clinit>(ClassLoader.java:81) at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:137) Suppressed: java.lang.ClassNotFoundException: GCBench at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 1 more Caused by: java.lang.NoClassDefFoundError: Class "LGCBench;" not found ... 5 more Also, move dex file verifier messages out of logs. In the process the ClassLinker::dex_lock_ needed tidying to cover a smaller scope. Bug 11301553. Change-Id: I80058652e11e7ea63457cc01a0cb48afe1c15543
* Remove conscrypt dependency from CommonTestBrian Carlstrom2013-08-301-10/+0
| | | | | Bug: 10092469 Change-Id: I0c5dc72625ca4b5083ef3137d40334127bde8252
* Make DexFiles opened from files readonly by default, but writable during dex2oatBrian Carlstrom2013-08-291-0/+2
| | | | | Bug: 9618388 Change-Id: I83f2e16ee8446a79a94a84971146d807bb0c9ee0
* Fix races in small mode compiler filters setupIan Rogers2013-08-131-1/+3
| | | | | | Fixes host tests in small art mode. Change-Id: I2579f872583f425607f91c1e58df68b05b5098bb
* Refactor java.lang.reflect implementationBrian Carlstrom2013-08-131-5/+5
| | | | | | | | | | | Cherry-picked from commit ed41d5c44299ec5d44b8514f6e17f802f48094d1. Move to ArtMethod/Field instead of AbstractMethod/Field and have java.lang.reflect APIs delegate to ArtMethod/ArtField. Bug: 10014286. Change-Id: Iafc1d8c5b62562c9af8fb9fd8c5e1d61270536e7
* Uleb128 compression of vmap and mapping table.Ian Rogers2013-08-091-2/+2
| | | | | | Bug 9437697. Change-Id: I30bcb97d12cd8b46d3b2cdcbdd358f08fbb9947a
* Entry point clean up.Ian Rogers2013-08-071-9/+2
| | | | | | | | | | | | | | | | | | Create set of entry points needed for image methods to avoid fix-up at load time: - interpreter - bridge to interpreter, bridge to compiled code - jni - dlsym lookup - quick - resolution and bridge to interpreter - portable - resolution and bridge to interpreter Fix JNI work around to use JNI work around argument rewriting code that'd been accidentally disabled. Remove abstact method error stub, use interpreter bridge instead. Consolidate trampoline (previously stub) generation in generic helper. Simplify trampolines to jump directly into assembly code, keeps stack crawlable. Dex: replace use of int with ThreadOffset for values that are thread offsets. Tidy entry point routines between interpreter, jni, quick and portable. Change-Id: I52a7c2bbb1b7e0ff8a3c3100b774212309d0828e
* Portable refactorings.Ian Rogers2013-07-301-1/+1
| | | | | | | Separate quick from portable entrypoints. Move architectural dependencies into arch. Change-Id: I9adbc0a9782e2959fdc3308215f01e3107632b7c
* resolved conflicts for merge of 7934ac28 to dalvik-devBrian Carlstrom2013-07-261-4/+4
|\ | | | | | | Change-Id: I8798a6f154463d3f92f6aca62f14130aec82d273
| * Fix cpplint whitespace/comments issuesBrian Carlstrom2013-07-261-4/+4
| | | | | | | | Change-Id: Iae286862c85fb8fd8901eae1204cd6d271d69496
* | Fix jni-internal test breakageAnwar Ghuloum2013-07-251-0/+1
| | | | | | | | Change-Id: I30780e27e68e13d19f9d8b4b37af902f169c7bdb
* | Add systrace support to NewTimingLogger, migrate compiler timing logging to ↵Anwar Ghuloum2013-07-251-1/+1
|/ | | | | | | | | NewTimingLogger Rpleaced old TimingLogger by NewTimingLogger, renamed NewTimingLogger to TimingLogger, added systrace support to TimingLogger. Tests passing, phone booting, systrace working. Change-Id: I2aeffb8bcb7f0fd979d8a2a3a8bcfbaa02413679
* Move TimingLogger creation to dex2oatBrian Carlstrom2013-07-211-2/+3
| | | | Change-Id: I4fdb6afd4ce2ac0d91c6c968893606d593b6ea18
* Remove CompilerDriver::IsDebuggingSupportedBrian Carlstrom2013-07-211-1/+1
| | | | Change-Id: Ib67e3ef67462fe5dae81148f7fe8cc76b3887f11
* Fixing cpplint readability/casting issuesBrian Carlstrom2013-07-181-1/+2
| | | | Change-Id: I6821da0e23737995a9b884a04e9b63fac640cd05
* Fix cpplint whitespace/indent issuesBrian Carlstrom2013-07-181-1/+1
| | | | Change-Id: I7c1647f0c39e1e065ca5820f9b79998691ba40b1
* Fix cpplint whitespace/parens issuesBrian Carlstrom2013-07-181-3/+2
| | | | Change-Id: Ifc678d59a8bed24ffddde5a0e543620b17b0aba9
* Fix multiple inclusion guards to match new pathnamesBrian Carlstrom2013-07-171-0/+5
| | | | Change-Id: Id7735be1d75bc315733b1773fba45c1deb8ace43
* Create separate Android.mk for main build targetsBrian Carlstrom2013-07-121-0/+588
The runtime, compiler, dex2oat, and oatdump now are in seperate trees to prevent dependency creep. They can now be individually built without rebuilding the rest of the art projects. dalvikvm and jdwpspy were already this way. Builds in the art directory should behave as before, building everything including tests. Change-Id: Ic6b1151e5ed0f823c3dd301afd2b13eb2d8feb81