summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Store OatDexFile instead of OatFile in DexFile."Richard Uhler2015-04-033-9/+3
|\
| * Store OatDexFile instead of OatFile in DexFile.Richard Uhler2015-04-023-9/+3
| | | | | | | | | | | | | | | | This requires moving OatDexFile out of the OatFile class so that a forward class declaration can be used for OatDexFile. Bug: 19071355 Change-Id: Ibda85b78d0577e9e81073090616fc0f2fa526be3
* | Fix a bug when creating a HDeoptimization instruction.Nicolas Geoffray2015-04-033-0/+50
| | | | | | | | | | | | | | | | | | | | | | We need to copy the environment, instead of just pointing to an existing one. Otherwise, if the instruction that initially holds the environemnt gets removed from the graph, any update to an instruction in that environment will not be reflected in it. bug:20058506 Change-Id: I2a62476d0851ecbc3707c0da395d8502ee437422
* | Move the "huge method" test into its own test case.Roland Levillain2015-04-024-2011/+2034
| | | | | | | | Change-Id: Icd7c95d2a7a0cacf15f079eed38c5d1a8f138b3f
* | Switch to shared libcutils on host to fix odr-violationBrian Carlstrom2015-04-021-1/+1
| | | | | | | | | | Change-Id: Ia8eb950806a09e12fec2956d51eff99852920bee SUMMARY: AddressSanitizer: odr-violation: global atrace_is_ready at system/core/libcutils/trace-host.c:23:25
* | Merge "Revert "Revert "Deoptimization-based bce."""Mingyao Yang2015-04-012-5/+144
|\ \
| * | Revert "Revert "Deoptimization-based bce.""Mingyao Yang2015-04-012-5/+144
| | | | | | | | | | | | | | | | | | This reverts commit 0ba627337274ccfb8c9cb9bf23fffb1e1b9d1430. Change-Id: I1ca10d15bbb49897a0cf541ab160431ec180a006
* | | Merge "CanThrow() of HNewArray should return true."Mingyao Yang2015-04-011-0/+16
|\ \ \
| * | | CanThrow() of HNewArray should return true.Mingyao Yang2015-04-011-0/+16
| |/ / | | | | | | | | | Change-Id: I9950f1c391dfeb26cf59cee769705d01d8e283d5
* | | Fix test 421-large-frame.Roland Levillain2015-04-011-1002/+2017
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't force the optimizing compiler to compile a huge method by reducing the number of local variables and instructions in Main.$opt$LargeFrame. - Prevent the optimizing compiler from "optimizing too much" (through constant folding and inlining), so as to preserve a large stack frame in Main.$opt$LargeFrame. - Keep the original huge method (without the $opt$ marker) as Main.HugeFrame. Bug: 20020727 Change-Id: I49bf8f03146020bd94bd392684e605d7bb6daf1e
* | ART: Regression test for condition materialization bugDavid Brazdil2015-04-013-0/+50
| | | | | | | | | | | | | | This adds a regression test previously omitted in a hotfix. Bug: 19999189 Change-Id: I02acb935960f22028bf877cd270b04e17515068f
* | Fix locations at environment uses.Nicolas Geoffray2015-03-316-1/+147
|/ | | | | | | | | We were too agressive in not recording environment uses when the instruction was not of type object. We have to record the use to the use list of an interval, but it should not affect the live ranges of that interval. Change-Id: Id16fb7cc06f14083766d408a345837793583b6ea
* ART: General-case negation in boolean simplifierDavid Brazdil2015-03-314-0/+71
| | | | | | | | | | | | Code transformations on the HGraph may optimize out the condition instruction of an If and replace it with a boolean value. In such case, the boolean simplifier would not know how to negate the condition and would fail. This patch implements negation in this general case with 'equals 0' as a substitute for the non-existing boolean Not instruction. Bug: 19992954 Change-Id: I152036fcc6bbecccc767d3024a5c060177597d88
* Merge "Fix user-build on fugu."Nicolas Geoffray2015-03-304-0/+99
|\
| * Fix user-build on fugu.Nicolas Geoffray2015-03-304-0/+99
| | | | | | | | | | | | | | | | | | Calling Delete on an array shifts the elements, so when iterating over inactives and removing entries we need to decrement for the found interval, but also its potential other half. The code used to not decrement for the other half Change-Id: Idcb1533643c11a37ed4f459fe88aaef208a4bfd6
* | Fix some reflection errorsMathieu Chartier2015-03-291-23/+42
| | | | | | | | | | | | | | | | Fixed incorrectly using 2nd frame instead of 1st in VerifyAccess. Added regression test to ART. Fixed broken setShort, getDeclaredFieldInternal. Change-Id: I4b21d52d998cb768fe9503b8bccec506b7b972e5
* | Add AccessibleObject and Field to mirrorMathieu Chartier2015-03-291-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main motivation is to remove all the functionality / field access on java side to ArtField. Also comes with some reflection speedups / slowdowns. Summary results: getDeclaredField/getField are slower mostly due to JNI overhead. However, there is a large speedup in getInt, setInt, GetInstanceField, and GetStaticField. Before timings (N5 --compiler-filter=everything): benchmark ns linear runtime Class_getDeclaredField 782.86 === Class_getField 832.77 === Field_getInt 160.17 = Field_setInt 195.88 = GetInstanceField 3214.38 ============== GetStaticField 6809.49 ============================== After: Class_getDeclaredField 1068.15 ============ Class_getField 1180.00 ============== Field_getInt 121.85 = Field_setInt 139.98 = GetInstanceField 1986.15 ======================= GetStaticField 2523.63 ============================== Bug: 19264997 Change-Id: Ic0d0fc1b56b95cd6d60f8e76f19caeaa23045c77
* | GVN HClinitCheck nodes.Nicolas Geoffray2015-03-273-0/+79
| | | | | | | | Change-Id: I5c79caadd57d10214a44149fda53e9e185ac7eca
* | Fix run-all-tests script when --always-clean is usedGoran Jakovljevic2015-03-271-0/+1
|/ | | | Change-Id: Icd44776e77c00f789bb579b6e55241abdfc0e68d
* Use the original invoke type when inlining.Nicolas Geoffray2015-03-263-0/+55
| | | | | | | | | | When resolving a method through the compiler driver, the code makes sure the call in the DEX bytecode matches the kind of method found, to check for IncompatibleClassChangeError. Because when we sharpen an invoke virtual, we transform the invoke kind to direct, we must not use the new kind, but the one in DEX. Change-Id: Iaf77b27b529c659ea48ffb19f46427552c9e3654
* Merge "Revert "Revert "Inline across dex files."""Nicolas Geoffray2015-03-255-2/+278
|\
| * Revert "Revert "Inline across dex files.""Nicolas Geoffray2015-03-255-2/+278
| | | | | | | | | | | | This reverts commit 6a816cf624ba56bf2872916d7b65b18fd9a411ef. Change-Id: I36cb524108786dd7996f2aea0443675be1f1b859
* | ART: Formatting and comments in BooleanSimplifierDavid Brazdil2015-03-251-1/+1
|/ | | | Change-Id: I9a5aa3f2aa8b0a29d7b0f1e5e247397cf8e9e379
* Merge "ART: Boolean simplifier"David Brazdil2015-03-243-0/+175
|\
| * ART: Boolean simplifierDavid Brazdil2015-03-243-0/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | The optimization recognizes the negation pattern generated by 'javac' and replaces it with a single condition. To this end, boolean values are now consistently assumed to be represented by an integer. This is a first optimization which deletes blocks from the HGraph and does so by replacing the corresponding entries with null. Hence, existing code can continue indexing the list of blocks with the block ID, but must check for null when iterating over the list. Change-Id: I7779da69cfa925c6521938ad0bcc11bc52335583
* | Merge "Unify ART's various implementations of bit_cast."Roland Levillain2015-03-243-14/+14
|\ \
| * | Unify ART's various implementations of bit_cast.Roland Levillain2015-03-243-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ART had several implementations of art::bit_cast: 1. one in runtime/base/casts.h, declared as: template <class Dest, class Source> inline Dest bit_cast(const Source& source); 2. another one in runtime/utils.h, declared as: template<typename U, typename V> static inline V bit_cast(U in); 3. and a third local version, in runtime/memory_region.h, similar to the previous one: template<typename Source, typename Destination> static Destination MemoryRegion::local_bit_cast(Source in); This CL removes versions 2. and 3. and changes their callers to use 1. instead. That version was chosen over the others as: - it was the oldest one in the code base; and - its syntax was closer to the standard C++ cast operators, as it supports the following use: bit_cast<Destination>(source) since `Source' can be deduced from `source'. Change-Id: I7334fd5d55bf0b8a0c52cb33cfbae6894ff83633
* | | Merge "Revert "Inline across dex files.""Nicolas Geoffray2015-03-245-202/+1
|\ \ \ | |/ / |/| |
| * | Revert "Inline across dex files."Nicolas Geoffray2015-03-245-202/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | bug: 19904089 bug: 19903495 This reverts commit 7e4c3508e4f5512650b63c41f7872a749e99aee9. Change-Id: I15df746b5f1882cce78eedde6c05c0d3b69bfa4a
* | | Merge "Quick: Create GC map based on compiler data."Vladimir Marko2015-03-243-6/+38
|\ \ \ | |_|/ |/| |
| * | Quick: Create GC map based on compiler data.Vladimir Marko2015-03-203-6/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Quick compiler and verifier sometimes disagree on dalvik register types (fp/core/ref) for 0/null constants and merged registers involving 0/null constants. Since the verifier is more lenient it can mark a register as a reference for GC where Quick considers it a floating point register or a dead register (which would have a ref/fp conflict if not dead). If the compiler used an fp register to hold the zero value, the core register or stack location used by GC based on the verifier data can hold an invalid value. Previously, as a workaround we stored the fp zero value also in the stack location or core register where GC would look for it. This wasn't precise and may have missed some cases. To fix this properly, we now generate GC maps based on the compiler's notion of references if register promotion is enabled. Bug: https://code.google.com/p/android/issues/detail?id=147187 Change-Id: Id3a2f863b16bdb8969df7004c868773084aec421
* | | Revert "Deoptimization-based bce."Andreas Gampe2015-03-242-144/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This breaks compiling the core image: Error after BCE: art::SSAChecker: Instruction 219 in block 1 does not dominate use 221 in block 1. This reverts commit e295e6ec5beaea31be5d7d3c996cd8cfa2053129. Change-Id: Ieeb48797d451836ed506ccb940872f1443942e4e
* | | Deoptimization-based bce.Mingyao Yang2015-03-232-5/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A mechanism is introduced that a runtime method can be called from code compiled with optimizing compiler to deoptimize into interpreter. This can be used to establish invariants in the managed code If the invariant does not hold at runtime, we will deoptimize and continue execution in the interpreter. This allows to optimize the managed code as if the invariant was proven during compile time. However, the exception will be thrown according to the semantics demanded by the spec. The invariant and optimization included in this patch are based on the length of an array. Given a set of array accesses with constant indices {c1, ..., cn}, we can optimize away all bounds checks iff all 0 <= min(ci) and max(ci) < array-length. The first can be proven statically. The second can be established with a deoptimization-based invariant. This replaces n bounds checks with one invariant check (plus slow-path code). Change-Id: I8c6e34b56c85d25b91074832d13dba1db0a81569
* | | Merge "Inline across dex files."Nicolas Geoffray2015-03-235-1/+202
|\ \ \ | | |/ | |/|
| * | Inline across dex files.Nicolas Geoffray2015-03-235-1/+202
| | | | | | | | | | | | Change-Id: I5c2c44f5130b50f0bad21a6877a3935dc60b4a85
* | | Merge "Update script now that optimizing is default."Nicolas Geoffray2015-03-231-2/+2
|\ \ \
| * | | Update script now that optimizing is default.Nicolas Geoffray2015-03-231-2/+2
| |/ / | | | | | | | | | | | | | | | bug:19872972 Change-Id: I648078483af5a0db3a13b0f94c36d083cbc4d2df
* | | Merge "Change "no-","no" test prefix to n"Mathieu Chartier2015-03-221-15/+15
|\ \ \ | |/ / |/| |
| * | Change "no-","no" test prefix to nMathieu Chartier2015-03-201-15/+15
| | | | | | | | | | | | | | | | | | Reduces file names to under 255 characters, for now. Change-Id: I095da02c1a3fc14fa9022d1a39307845bd870abc
* | | Fix verifier handling of empty switch as last instruction.Jeff Hao2015-03-203-0/+20
|/ / | | | | | | | | | | | | | | Also fixes optimizing compiler's assumption that switch is non-empty and adds test case. Bug: 19827056 Change-Id: I5ac891d5062f528ef3be787b1094cba7b4c0fbd0
* | Add verify-at-runtime compiler filterMathieu Chartier2015-03-201-1/+1
|/ | | | | | | | | | | | | Verifies at runtime only, instead of at compilation time. AOSP HH boot time after clean-oat: ~30s instead of ~35s if enabled. Also helps install time if enabled there. TODO: See if there is any possible deadlocks that can result from this. Bug: 19762303 Change-Id: Ibfba77148da9039e8d7d7497c05486bc044eefe7
* Unbreak checker.Nicolas Geoffray2015-03-171-1/+1
| | | | Change-Id: Idabb8c04c29d265330ef9ae28c1df01129abe9dd
* Merge "[optimizing] Use baseline when debuggable is set."Nicolas Geoffray2015-03-162-4/+3
|\
| * [optimizing] Use baseline when debuggable is set.Nicolas Geoffray2015-03-162-4/+3
| | | | | | | | | | | | | | | | | | SSA form conflicts with JDWP's SetValue functionality. Because we do not deopt all the call stack, we may call SetValue on a compiled frame, which doesn't work with optimizing. Simplest solution for now is to just use baseline. Change-Id: I91738b363eec8fef145486bd96681aea73a1baa8
* | ART: Change logging strategy in run-testsAndreas Gampe2015-03-151-6/+18
|/ | | | | | | For host tests, do not silence warnings for the prebuild stage. Bug: 19687013 Change-Id: Idd8f61a05d548da1679fddbd9ef5d216397b4fe7
* Merge "Disable inlining in Optimizing when --debuggable is set."Nicolas Geoffray2015-03-131-0/+14
|\
| * Disable inlining in Optimizing when --debuggable is set.Nicolas Geoffray2015-03-131-0/+14
| | | | | | | | Change-Id: I6365269e606e0c176e518c06719ebdaf6a4c4b88
* | Merge "art/test/100-reflect2: change incorrect expectations."Sergio Giro2015-03-131-1/+1
|\ \
| * | art/test/100-reflect2: change incorrect expectations.Sergio Giro2015-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Methods can't be volatile nor transient. bug: 18488857 Change-Id: Ie82ed513b58083a795549a708197f1db52ffb796
* | | Merge "Tweak liveness when instructions are used in environments."Nicolas Geoffray2015-03-136-1/+157
|\ \ \