summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver_test.cc
AgeCommit message (Collapse)Author
2016-02-12Fix compiler driver gtest.Calin Juravle
(cherry picked from commit 35c4e0b2ad573e820d6e9d461a571af300611d36) Change-Id: Ia59f4463a6158f7a949debd7a93f35fa633cd36a
2016-01-19Improve profile processingCalin Juravle
- allow file descriptors in addition to file names for profiles - fix some minor issues (wrong comparison signs, unhandled errors) - added gtests for profile_compilation_info, profile_assistant and compiler_driver Bug: 26080105 Change-Id: I136039fa1f25858399000049e48b01eafae54eb1
2015-12-21Merge "Rename NullHandle to ScopedNullHandle" am: 76b90e37dfMathieu Chartier
am: 8a5e8d0118 * commit '8a5e8d0118de17210316100e740d0417239256e9': Rename NullHandle to ScopedNullHandle
2015-12-21Rename NullHandle to ScopedNullHandleMathieu Chartier
This makes it clearer that is invalid to do things like: Handle<T> h = ScopedNullHandle<T>(); Bug: 26233305 Change-Id: I6d8f54eae01ec2e901cb7043afa853ea77db79fe
2015-12-17resolve merge conflicts of 9f784b26a1 to master.Alex Light
Change-Id: I9ebcb6e3d51be922e08e5f867fb8dcaf5cb9788d
2015-12-16Revert "Revert "Combine direct_methods_ and virtual_methods_ fields of ↵Alex Light
mirror::Class"" This reverts commit ae358c1d5cef227b44d6f4971b79e1ab91aa26eb. Bug: 24618811 Change-Id: I8becf9bae3258450b90cfef5e79589db7c535a4d
2015-12-15Revert "Combine direct_methods_ and virtual_methods_ fields of mirror::Class"Alex Light
This reverts commit 9539150b85142c18e9e8c2264b5b6100942667c3. Change-Id: I596876cd643ec0ad524a56621efb6b89e8886230
2015-12-15Revert "Combine direct_methods_ and virtual_methods_ fields of mirror::Class"Alex Light
This reverts commit 6286a97bea0f584342803a215550038852b24776. Change-Id: I5b00f6d1350e9c587acd4b185367dc815ea707de
2015-12-14Combine direct_methods_ and virtual_methods_ fields of mirror::ClassAlex Light
Manual cherry-pick of 6286a97 to master This makes several parts of the overall runtime simpler and reduces the size of a class object by 32-bits. Bug: 24618811 Change-Id: I36129b52189e26898ea56fa2b7b45652e06af236
2015-12-14Combine direct_methods_ and virtual_methods_ fields of mirror::ClassAlex Light
This makes several parts of the overall runtime simpler and reduces the size of a class object by 32-bits. Bug: 24618811 Change-Id: I36129b52189e26898ea56fa2b7b45652e06af236
2015-11-23Temporarily disable compiler_driver_test.Yi Kong
bug: 25836016 Change-Id: I2d2e7c5b2bcbc2b906b38dd2cf39583ca6fbabde
2015-11-15x86/x86-64 read barrier support for concurrent GC in Optimizing.Roland Levillain
This first implementation uses slow paths to instrument heap reference loads and GC root loads for the concurrent copying collector, respectively calling the artReadBarrierSlow and artReadBarrierForRootSlow (new) runtime entry points. Notes: - This implementation does not instrument HInvokeVirtual nor HInvokeInterface instructions (for class reference loads), as the corresponding read barriers are not stricly required with the current concurrent copying collector. - Intrinsics which may eventually call (on slow path) are disabled when read barriers are enabled, as the current slow path infrastructure does not support this case. - When read barriers are enabled, the code generated for a HArraySet instruction always go into the array set slow path for object arrays (delegating the operation to the runtime), as we are lacking a mechanism to keep a temporary register live accross a runtime call (needed for the instrumentation of type checking code, which requires two successive read barriers). Bug: 12687968 Change-Id: I14cd6107233c326389120336f93955b28ffbb329
2015-08-31Revert "Revert "Change dex caches to be weak roots""Mathieu Chartier
This reverts commit 81a9087f0df0518c39405b7d18ba5858a6d8b77b. Boot.oat creation time goes from 4.7s to 4.9s on host due to extra locking. Will try to improve this in another CL. Bug: 23602225 Bug: 22720414 Change-Id: I7e25b75cfb63faa196c7b0f60e46cce50bf12021
2015-08-28Fix some HandleScope bugs and add corresponding checksMathieu Chartier
Some places were creating or destroying handle scopes without holding the mutator lock. This can cause GC crashes if thread roots are being marked or hprof dumps to also fail. Also added checks to catch some of these errors. Bug: 23468617 Change-Id: I1a2d615923484cfc25014967656775c445aa3f1f
2015-07-22Move to newer clang annotationsMathieu Chartier
Also enable -Wthread-safety-negative. Changes: Switch to capabilities and negative capabilities. Future work: Use capabilities to implement uninterruptible annotations to work with AssertNoThreadSuspension. Bug: 20072211 Change-Id: I42fcbe0300d98a831c89d1eff3ecd5a7e99ebf33
2015-07-01Implement heap poisoning in ART's Optimizing compiler.Roland Levillain
- Instrument ARM, ARM64, x86 and x86-64 code generators. - Note: To turn heap poisoning on in Optimizing, set the environment variable `ART_HEAP_POISONING' to "true" before compiling ART. Bug: 12687968 Change-Id: Ib3120b38cf805a8a50207a314b9ccc90c8d93740
2015-05-29Move mirror::ArtMethod to nativeMathieu Chartier
Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
2015-04-22Replace NULL with nullptrMathieu Chartier
Also fixed some lines that were too long, and a few other minor details. Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
2015-04-21ART: Add compiled-methodsAndreas Gampe
Add a dex2oat option for compiled-methods, a more granular filter than compiled-classes. Add compiler-driver support for it. Refactor dex2oat to reuse file reading. Add a test to oat_test. Change-Id: I78d0d040bce7738b4bb7aabe7768b5788d2587ac
2015-04-13ART: Clean up includes.Vladimir Marko
Reduce dependencies to improve incremental build times. Break up circular dependency involving class_linker-inl.h. Change-Id: I4be742c5c2b5cd9855beea86630fd68aab76b0db
2015-04-10Move ArtField to nativeMathieu Chartier
Add linear alloc. Moved ArtField to be native object. Changed image writer to put ArtFields after the mirror section. Savings: 2MB on low ram devices 4MB on normal devices Total PSS measurements before (normal N5, 95s after shell start): Image size: 7729152 bytes 23112 kB: .NonMoving 23212 kB: .NonMoving 22868 kB: .NonMoving 23072 kB: .NonMoving 22836 kB: .NonMoving 19618 kB: .Zygote 19850 kB: .Zygote 19623 kB: .Zygote 19924 kB: .Zygote 19612 kB: .Zygote Avg: 42745.4 kB After: Image size: 7462912 bytes 17440 kB: .NonMoving 16776 kB: .NonMoving 16804 kB: .NonMoving 17812 kB: .NonMoving 16820 kB: .NonMoving 18788 kB: .Zygote 18856 kB: .Zygote 19064 kB: .Zygote 18841 kB: .Zygote 18629 kB: .Zygote 3499 kB: .LinearAlloc 3408 kB: .LinearAlloc 3424 kB: .LinearAlloc 3600 kB: .LinearAlloc 3436 kB: .LinearAlloc Avg: 39439.4 kB No reflection performance changes. Bug: 19264997 Bug: 17643507 Change-Id: I10c73a37913332080aeb978c7c94713bdfe4fe1c
2015-03-27ART: PathClassLoader for compilerAndreas Gampe
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
2015-01-13Use unique_ptr to track ownership of dex files.Richard Uhler
Bug: 18809837 Change-Id: Ie571eae8fc19ee9207390cff5c7e2a38071b126a
2014-12-12Remove portable.Elliott Hughes
Change-Id: I3bf3250fa866fd2265f1b115d52fa5dedc48a7fc
2014-11-04ART: More warningsAndreas Gampe
Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general, and -Wunused-but-set-parameter for GCC builds. Change-Id: I81bbdd762213444673c65d85edae594a523836e5
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-06-24More advanced timing loggers.Mathieu Chartier
The new timing loggers have lower overhead since they only push into a vector. The new format has two types, a start timing and a stop timing. You can thing of these as brackets associated with a timestamp. It uses these to construct various statistics when needed, such as: Total time, exclusive time, and nesting depth. Changed PrettyDuration to have a default of 3 digits after the decimal point. Exaple of a GC dump with exclusive / total times and indenting: I/art (23546): GC iteration timing logger [Exclusive time] [Total time] I/art (23546): 0ms InitializePhase I/art (23546): 0.305ms/167.746ms MarkingPhase I/art (23546): 0ms BindBitmaps I/art (23546): 0ms FindDefaultSpaceBitmap I/art (23546): 0ms/1.709ms ProcessCards I/art (23546): 0.183ms ImageModUnionClearCards I/art (23546): 0.916ms ZygoteModUnionClearCards I/art (23546): 0.610ms AllocSpaceClearCards I/art (23546): 1.373ms AllocSpaceClearCards I/art (23546): 0.305ms/6.318ms MarkRoots I/art (23546): 2.106ms MarkRootsCheckpoint I/art (23546): 0.153ms MarkNonThreadRoots I/art (23546): 4.287ms MarkConcurrentRoots I/art (23546): 43.461ms UpdateAndMarkImageModUnionTable I/art (23546): 0ms/112.712ms RecursiveMark I/art (23546): 112.712ms ProcessMarkStack I/art (23546): 0.610ms/2.777ms PreCleanCards I/art (23546): 0.305ms/0.855ms ProcessCards I/art (23546): 0.153ms ImageModUnionClearCards I/art (23546): 0.610ms ZygoteModUnionClearCards I/art (23546): 0.610ms AllocSpaceClearCards I/art (23546): 0.549ms AllocSpaceClearCards I/art (23546): 0.549ms MarkRootsCheckpoint I/art (23546): 0.610ms MarkNonThreadRoots I/art (23546): 0ms MarkConcurrentRoots I/art (23546): 0.610ms ScanGrayImageSpaceObjects I/art (23546): 0.305ms ScanGrayZygoteSpaceObjects I/art (23546): 0.305ms ScanGrayAllocSpaceObjects I/art (23546): 1.129ms ScanGrayAllocSpaceObjects I/art (23546): 0ms ProcessMarkStack I/art (23546): 0ms/0.977ms (Paused)PausePhase I/art (23546): 0.244ms ReMarkRoots I/art (23546): 0.672ms (Paused)ScanGrayObjects I/art (23546): 0ms (Paused)ProcessMarkStack I/art (23546): 0ms/0.610ms SwapStacks I/art (23546): 0.610ms RevokeAllThreadLocalAllocationStacks I/art (23546): 0ms PreSweepingGcVerification I/art (23546): 0ms/10.621ms ReclaimPhase I/art (23546): 0.610ms/0.702ms ProcessReferences I/art (23546): 0.214ms/0.641ms EnqueueFinalizerReferences I/art (23546): 0.427ms ProcessMarkStack I/art (23546): 0.488ms SweepSystemWeaks I/art (23546): 0.824ms/9.400ms Sweep I/art (23546): 0ms SweepMallocSpace I/art (23546): 0.214ms SweepZygoteSpace I/art (23546): 0.122ms SweepMallocSpace I/art (23546): 6.226ms SweepMallocSpace I/art (23546): 0ms SweepMallocSpace I/art (23546): 2.144ms SweepLargeObjects I/art (23546): 0.305ms SwapBitmaps I/art (23546): 0ms UnBindBitmaps I/art (23546): 0.275ms FinishPhase I/art (23546): GC iteration timing logger: end, 178.971ms Change-Id: Ia55b65609468f212b3cd65cda66b843da42be645
2014-06-02Fix GC race condition in visit rootsSerguei Katkov
While GC visits roots other code can change the set pending exception due to lack of synchronization. Change-Id: If387944ac933a66fe176df066c3a0ea52131cad4 Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
2014-05-23Revert "Revert "Fix an outstanding compaction bug in interpreter.""Mathieu Chartier
Fixed the generic trampoline to not use ToJObject when unnecessary. Bug: 15167269 This reverts commit 3bdb873122964da7937eb070cbcf2ef638a8e459. Change-Id: I0525d0e0f3afb753c770e1572070a0fa22b02271
2014-05-22Revert "Fix an outstanding compaction bug in interpreter."Mathieu Chartier
This reverts commit e09ae0920be57760fb390b6944bce420fa0b5582. Change-Id: I48036306130d5ccfec683d0dc3e9a642a02ee9c1
2014-05-22Fix an outstanding compaction bug in interpreter.Mathieu Chartier
Fixed a bug in DoFieldPut where the FieldHelper GetType could cause thread suspension which would result in a stale obj. Added more handles in the class linker to facilitate moving fiels and methods in the future. Removed un-necessarly passing handle references since these are value types and don't need to be passed by reference. Added a special NullHandle type which allows null handles without a handle scope. Change-Id: I1b51723920a2e4f4f8b2907066f578a3e879fd5b
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-05-13Add Handle/HandleScope and delete SirtRef.Mathieu Chartier
Delete SirtRef and replaced it with Handle. Handles are value types which wrap around StackReference*. Renamed StackIndirectReferenceTable to HandleScope. Added a scoped handle wrapper which wraps around an Object** and restores it in its destructor. Renamed Handle::get -> Get. Bug: 8473721 Change-Id: Idbfebd4f35af629f0f43931b7c5184b334822c7a
2014-03-19Make test-art pass with heap reference poisoning enabled.Hiroshi Yamauchi
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
2014-03-07Add more VerifyObject calls.Mathieu Chartier
Added verify object calls to SirtRef, IndirectReferenceTable, ReferenceTable. Removed un-needed verify object in ScopedObjectAccess / DecodeJObject since object sources are handled. Bug: 12934910 Change-Id: I55a46a8ea61fed2a77526eda27fd2cce97a9b125
2014-03-01Make out arguments non-reference types.Ian Rogers
Also, tidy some portable related code. Change-Id: I67c8aa52eef8b556ca117ecda1b1e75465ba06a5
2014-02-26Split up CommonTest into CommonRuntimeTest and CommonCompilerTestBrian Carlstrom
Change-Id: I8dcf6b29a5aecd445f1a3ddb06386cf81dbc9c70
2014-02-24Avoid std::string allocations for finding an array class.Ian Rogers
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
2014-02-06Object model changes to support 64bit.Ian Rogers
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
2013-11-14Fix memory leaks relating to timing logger.Ian Rogers
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
2013-11-11Compacting collector.Mathieu Chartier
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
2013-08-13Refactor java.lang.reflect implementationBrian Carlstrom
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
2013-07-25Fix compiler_driver_test/image_test.Ian Rogers
Fixes post TimingLogger change. Change-Id: If57f12d7cb6a449e3f3a8ba6f48e9180cd153ede
2013-07-25Add systrace support to NewTimingLogger, migrate compiler timing logging to ↵Anwar Ghuloum
NewTimingLogger Rpleaced old TimingLogger by NewTimingLogger, renamed NewTimingLogger to TimingLogger, added systrace support to TimingLogger. Tests passing, phone booting, systrace working. Change-Id: I2aeffb8bcb7f0fd979d8a2a3a8bcfbaa02413679
2013-07-21Move TimingLogger creation to dex2oatBrian Carlstrom
Change-Id: I4fdb6afd4ce2ac0d91c6c968893606d593b6ea18
2013-07-12Create separate Android.mk for main build targetsBrian Carlstrom
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