summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Re-enable ParallelGC test for gcstress modeMathieu Chartier2015-01-071-2/+1
| | | | | | | Ran the test hundreds of times with gcstress without any failures. Bug: 16406852 Change-Id: Idd2d248bd43bfb20ad7313e12ce3dce85bea3de5
* Fix signal test to work with gcstressMathieu Chartier2015-01-072-3/+1
| | | | | | | | | | | | | We now avoid running GC if we are handling a stack overflow, this helps prevent running past the end of the stack overflow reserved bytes. Added logic in ThrowStackOverflowError to use a stack overflow exception without a stack trace if we fail to allocate the stack trace. Bug: 16406852 Change-Id: Ib34e235cd0af6d7c4c93c9705fa822f2b9b23b38
* ART: Fix divide-by-zero for ARMAndreas Gampe2015-01-063-0/+31
| | | | | | | | There was an infinite loop in the code generation for a divide by literal zero. Bug: 18887754 Change-Id: Ibd481918d3c6d7bc62fdd1a6807042009f561d95
* Opt Compiler: ARM64: Add support for rem-float, rem-double and volatile.Serban Constantinescu2015-01-055-22/+183
| | | | | | | | Add support for rem-float, rem-double and volatile memory accesses using acquire-release and memory barriers. Change-Id: I96a24dff66002c3b772c3d8e6ed792e3cb59048a Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* ART: Fix verification of constructors.Stephen Kyle2014-12-224-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: A constructor must call its superclass constructor. However, if one replaces the invoke-direct superclass.<init>() instruction with a variety of instructions, the verifier would NOT complain that the superclass constructor hadn't been called. Detailed explanation: This was because if we are verifying the return-void insn of a constructor, then we check that the register line doesn't contain a register with an UninitializedThis type. With a method like follows: Class.<init>()V: return-void Then we hit the return-void, see the UninitializedThis, and fail the method. However, with a method like follows: Class.<init>()V: nop return-void Any insn that continues or branches onto a return-void instruction will mark all of the registers as Conflict. This meant that the check in return-void for an UninitializedThis residing the register line would _always_ pass if there were any insns before it - the entire line had been set to Conflict. The fix is to bring the check for an UninitializedThis forward to the point just before we set all registers to Conflict, if we're about to hit a return-void insn in a constructor. It still needs to be done again in the verification of return-void itself, to avoid the solo return-void case. This patch also deals with the case where the only remaining UninitializedThis reference is overwritten, to avoid a method like the following from getting through verification: Class.<init>()V: const/4 v0, 0 return-void Bug: 18800943 Change-Id: I2e317261844d3b6c78e35228669f3da173316570 Fuzzed-With: https://android-review.googlesource.com/#/c/119463/
* Merge "ART: Swap-space in the compiler"Andreas Gampe2014-12-221-0/+4
|\
| * ART: Swap-space in the compilerAndreas Gampe2014-12-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | 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
* | Clean up dead loops before suspend check elimination.Vladimir Marko2014-12-193-0/+31
|/ | | | | | | | Get rid of BasicBlock::KillUnreachable() and just Kill() unreachable blocks from the DFS order calculation. Bug: 18718277 Change-Id: Icaf7b9c2320530e950f87e1e2e2bd1fa5f53cb98
* When inlining, also look whether we can allocate registers.Nicolas Geoffray2014-12-181-0/+17
| | | | | | arm and x86 currently don't allocate registers for floating point and long operations, so we can't inline methods with these operations. Change-Id: I11e4b97ddbe90f4978f2abe1081fb0f849acb811
* Inlining support in optimizing.Nicolas Geoffray2014-12-153-0/+87
| | | | | | | | | | Currently only inlines simple things that don't require an environment, such as: - Returning a constant. - Returning a parameter. - Returning an arithmetic operation. Change-Id: Ie844950cb44f69e104774a3cf7a8dea66bc85661
* Add regression test for deadlock caused by Thread.getAllStackTracesMathieu Chartier2014-12-123-0/+55
| | | | | | | | | | Also added stress test for Thread.getAllStackTraces. The test calls Thread.getAllStackTraces from multiple threads to stress race conditions which can cause deadlocks. Bug: 18661622 Change-Id: Ideee7073fdcce784414808d08eca9ea310240073
* ARM: Combine multiply accumulate operations.Ningsheng Jian2014-12-113-0/+173
| | | | | | | Try to combine integer multiply and add(sub) into a MAC operation. For AArch64, also try to combine long type multiply and add(sub). Change-Id: Ic85812e941eb5a66abc355cab81a4dd16de1b66e
* Merge "ART: Extend run-test 015"Andreas Gampe2014-12-112-0/+447
|\
| * ART: Extend run-test 015Andreas Gampe2014-12-102-0/+447
| | | | | | | | | | | | Add some more tests to 015-switch. Change-Id: I10bd61d68ce961ae2e2dcf936ed9321014b56d05
* | Opt compiler: Add arm64 support for register allocation.Alexandre Rames2014-12-101-27/+3
| | | | | | Change-Id: Idc6e84eee66170de4a9c0a5844c3da038c083aa7
* | Fix verifier bug caused by confusing ArtMethod::IsDirect vs ↵Brian Carlstrom2014-12-093-0/+43
| | | | | | | | | | | | | | ArtMethod::IsStatic semantics. Bug: 18485243 Change-Id: I011872446490628b51fb38a353abd1d499cc1290
* | Test now fails on amr64/optimizing after float rem changes.Nicolas Geoffray2014-12-091-0/+1
| | | | | | | | Change-Id: I0b5d7303e3d337b2195c3810069213b1530ab474
* | Merge "Quick: Redefine the notion of back-egdes."Vladimir Marko2014-12-092-4/+42
|\ \
| * | Quick: Redefine the notion of back-egdes.Vladimir Marko2014-12-092-4/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Redefine a back-edge to really mean an edge to a loop head instead of comparing instruction offsets. Generate suspend checks also on fall-through to a loop head; insert an extra GOTO for these edges. Add suspend checks to fused cmp instructions. Rewrite suspend check elimination to track whether there is an invoke on each path from the loop head to a given back edge, instead of using domination info to look for a basic block with invoke that must be on each path. Ignore invokes to intrinsics and move the optimization to a its own pass. The new loops in 109-suspend-check should prevent intrinsics and fused cmp-related regressions. Bug: 18522004 Change-Id: I96ac818f76ccf9419a6e70e9ec00555f9d487a9e
* | | Explicitly mask constants in shift operations.Nicolas Geoffray2014-12-093-0/+43
| | | | | | | | | | | | | | | | | | The assemblers expect an int8, so we mask ahead of calling them. Change-Id: Id668cda6853fa365ac02531bf7aae288cad20fcd
* | | Merge "Re-factor Quick ABI support"Vladimir Marko2014-12-083-0/+31
|\ \ \
| * | | Re-factor Quick ABI supportSerguei Katkov2014-12-083-0/+31
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now every architecture must provide a mapper between VRs parameters and physical registers. Additionally as a helper function architecture can provide a bulk copy helper for GenDalvikArgs utility. All other things becomes a common code stuff: GetArgMappingToPhysicalReg, GenDalvikArgsNoRange, GenDalvikArgsRange, FlushIns. Mapper now uses shorty representation of input parameters. This is required due to location are not enough to detect the type of parameter (fp or core). For the details see https://android-review.googlesource.com/#/c/113936/. Change-Id: Ie762b921e0acaa936518ee6b63c9a9d25f83e434 Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
* | / [optimizing compiler] Add REM_FLOAT and REM_DOUBLECalin Juravle2014-12-085-52/+205
| |/ |/| | | | | | | | | | | | | | | | | | | - for arm, x86, x86_64 backends - reinstated fmod quick entry points for x86. This is a partial revert of bd3682eada753de52975ae2b4a712bd87dc139a6 which added inline assembly for floting point rem on x86. Note that Quick still uses the inline version. - fix rem tests for longs Change-Id: I73be19a9f2f2bcf3f718d9ca636e67bdd72b5440
* | Add support for double-to-int & double-to-long in optimizing.Roland Levillain2014-12-051-3/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add support for the double-to-int and double-to-long Dex instructions in the optimizing compiler. - Add S1 to the list of ARM FPU parameter registers so that a double value can be passed as parameter during a call to the runtime through D0. - Have art::x86_64::X86_64Assembler::cvttsd2si work with 64-bit operands. - Generate x86, x86-64 and ARM (but not ARM64) code for double to int and double to long HTypeConversion nodes. - Add related tests to test/422-type-conversion. Change-Id: Ic93b9ec6630c26e940f7966a3346ad3fd5a2ab3a
* | Build core.oat without flags.Nicolas Geoffray2014-12-041-0/+8
| | | | | | | | | | | | | | | | Existing tools (like vogar) assume only one boot image, so to test the boot image compiled with the optimizing compiler, we have to compile core.oat with it. Change-Id: I4b55236163333709b05c80eea18778ecd2b58a91
* | Add support for float-to-double & double-to-float in optimizing.Roland Levillain2014-12-041-26/+102
| | | | | | | | Change-Id: I41b0fee5a28c83757697c8d000b7e224cf5a4534
* | Merge "Add support for float-to-long in the optimizing compiler."Roland Levillain2014-12-041-0/+32
|\ \
| * | Add support for float-to-long in the optimizing compiler.Roland Levillain2014-12-041-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add support for the float-to-long Dex instruction in the optimizing compiler. - Add a Dex PC field to art::HTypeConversion to allow the x86 and ARM code generators to produce runtime calls. - Instruct art::CodeGenerator::RecordPcInfo not to record PC information for HTypeConversion instructions. - Add S0 to the list of ARM FPU parameter registers. - Have art::x86_64::X86_64Assembler::cvttss2si work with 64-bit operands. - Generate x86, x86-64 and ARM (but not ARM64) code for float to long HTypeConversion nodes. - Add related tests to test/422-type-conversion. Change-Id: I954214f0d537187883f83f7a83a1bb2dd8a21fd4
* | | Merge "Don't re-use arttest when calling loadLibrary."Nicolas Geoffray2014-12-031-10/+10
|\ \ \ | |/ / |/| |
| * | Don't re-use arttest when calling loadLibrary.Nicolas Geoffray2014-12-031-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Android's build environment variables are set with envsetup.sh, the test "works" ok, by getting a LinkageError because two class loaders try to load the same library. I guess that is the reason for the if (ExceptionCheck()) after the loading. However, if the environment variables are set manually, there are cases where the paths provided between a Java loadLibrary, and a native loadLibrary are different, so we end up loading the library twice. This makes the assertion line 32 fail on the second JNI_OnLoad call. In my particular environment, ANDROID_BUILD_TOP was something lie /foo/bar/..//. This change stops re-using the same library, and makes the expected outcome constant: the native call of loadLibrary with a non exist library must throw a LinkageError. Change-Id: I8721a03715e099c55fb8b2b87813f1e772c8e83d
* | | Merge "Add support for float-to-int in the optimizing compiler."Roland Levillain2014-12-031-0/+32
|\ \ \ | |/ / |/| |
| * | Add support for float-to-int in the optimizing compiler.Roland Levillain2014-12-031-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add support for the float-to-int Dex instruction in the optimizing compiler. - Factor type conversion related lines in compiler/optimizing/builder.cc. - Generate x86, x86-64 and ARM (but not ARM64) code for float to int HTypeConversion nodes. - Add related tests to test/422-type-conversion. Change-Id: I2382dfc04bf394ed75f675148cfcf98216d65bc6
* | | Merge "Fix a compiler bug related to a catch-less try-finally statement."Roland Levillain2014-12-033-0/+70
|\| |
| * | Fix a compiler bug related to a catch-less try-finally statement.Roland Levillain2014-12-033-0/+70
| | | | | | | | | | | | | | | | | | | | | Ensure a dead basic block produced in this case is properly removed. Change-Id: I7c88e26aaa6c6378892f7c7c299494fa42312db2
* | | Explicitly give compiler options to test scriptsNicolas Geoffray2014-12-032-0/+5
| | | | | | | | | | | | | | | | | | This makes tests pass when ART_USE_OPTIMIZING_COMPILER=true. Change-Id: I579c0371033435ead6b06830f15c00dbf7e98005
* | | Merge "Fix new-instance node."Calin Juravle2014-12-037-0/+168
|\ \ \
| * | | Fix new-instance node.Calin Juravle2014-12-027-0/+168
| |/ / | | | | | | | | | | | | | | | | | | | | | new-instance may throw when called on: - interfaces - abstract/innaccessible/unknown classes Change-Id: Id55dbb95b906a58c946b14adad934ee0e3498c0a
* / / Add a way to pass GDB commandsMathieu Chartier2014-12-022-2/+12
|/ / | | | | | | | | | | | | | | | | | | | | Passing --gdb-arg to run-test sends the arg to GDB, example: test/run-test --host --gdb --gdb-arg "--command=command.txt" 001-HelloWorld Would run the test with the GDB script at command.txt on the host, this is useful for running tests in GDB in a loop. Bug: 17387969 Change-Id: I5ad455159a6d92783eacb17eecbb0f1e670cb4a3
* | Merge "Fix OOM throwing if it happens in finalizer reference (take 2)"Nicolas Geoffray2014-12-023-0/+72
|\ \
| * | Fix OOM throwing if it happens in finalizer reference (take 2)Pavel Vyssotski2014-12-023-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Class::Alloc should return null if OOM happened during adding finalizer reference, even if finalizable object is allocated succesfully. Added new more reliable test. Change-Id: Id5fed3bdb16297d6d3a2b14ce62cc305aa703d60 Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com> Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com> Signed-off-by: Pavel Vyssotski <pavel.n.vyssotski@intel.com>
* | | Merge "[optimizing compiler] Fix invoke-direct"Calin Juravle2014-12-025-0/+95
|\ \ \ | |/ / |/| |
| * | [optimizing compiler] Fix invoke-directCalin Juravle2014-12-025-0/+95
| | | | | | | | | | | | | | | | | | | | | Always compute invoke info via compiler driver. This ensures that the method is not called directly if its access cannot be verified. Change-Id: I04b35563a1148bc5cb16b37324419e2a977ec8db
* | | Add a branch to ensure the test is compiled.Nicolas Geoffray2014-12-021-1/+6
| |/ |/| | | | | | | | | The compiler will now not compile large methods with no branch. Change-Id: Iaea284c648f7f3f754cb8ec721ad2ecffbd2f6af
* | Merge "Opt Compiler: Arm64: Add support for more IRs plus various fixes."Nicolas Geoffray2014-12-011-11/+0
|\ \
| * | Opt Compiler: Arm64: Add support for more IRs plus various fixes.Serban Constantinescu2014-11-281-11/+0
| |/ | | | | | | | | | | | | Add support for more IRs and update others. Change-Id: Iae1bef01dc3c0d238a46fbd2800e71c38288b1d2 Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* / Don't use CanHoldArm in the code generator.Nicolas Geoffray2014-11-283-0/+32
|/ | | | | | | | CanHoldArm was ARM32 specific. Instead use a virtual Assembler::ShifterOperandCanHold that both thumb2 and arm32 implement. Change-Id: I33794a93caf02ee5d78d32a8471d9fd6fe4f0a00
* Merge "Fix a bug in GVN."Nicolas Geoffray2014-11-283-0/+42
|\
| * Fix a bug in GVN.Nicolas Geoffray2014-11-283-0/+42
| | | | | | | | | | | | | | | | | | | | | | When a predecessor block was killing instructions in a set, we were not taking into account side effects of blocks between the dominator to this predecessor. Implementation now intersects the copied set of the dominator with the predecessors to take these side effects into account. Change-Id: If297439cc4e50cee91e9fffd028216a3e49e19ef
* | Add support for long-to-float in the optimizing compiler.Roland Levillain2014-11-271-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | - Add support for the long-to-float Dex instruction in the optimizing compiler. - Have art::x86_64::X86_64Assembler::cvtsi2ss work with 64-bit operands. - Generate x86, x86-64 and ARM (but not ARM64) code for long to float HTypeConversion nodes. - Add related tests to test/422-type-conversion. Change-Id: Ic983cbeb1ae2051add40bc519a8f00a6196166c9
* | Merge "Fix neg-float & neg-double for null values in opt. compiler."Roland Levillain2014-11-271-2/+16
|\ \