summaryrefslogtreecommitdiffstats
path: root/runtime/quick
Commit message (Collapse)AuthorAgeFilesLines
* Move mirror::ArtMethod to nativeMathieu Chartier2015-06-021-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (cherry picked from commit e401d146407d61eeb99f8d6176b2ac13c4df1e33) Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d Fix some ArtMethod related bugs Added root visiting for runtime methods, not currently required since the GcRoots in these methods are null. Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes --trace run-tests 005, 044. Fixed optimizing compiler bug where we used a normal stack location instead of double on ARM64, this fixes the debuggable tests. TODO: Fix JDWP tests. Bug: 19264997 Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3 ART: Fix casts for 64-bit pointers on 32-bit compiler. Bug: 19264997 Change-Id: Ief45cdd4bae5a43fc8bfdfa7cf744e2c57529457 Fix JDWP tests after ArtMethod change Fixes Throwable::GetStackDepth for exception event detection after internal stack trace representation change. Adds missing ArtMethod::GetInterfaceMethodIfProxy call in case of proxy method. Bug: 19264997 Change-Id: I363e293796848c3ec491c963813f62d868da44d2 Fix accidental IMT and root marking regression Was always using the conflict trampoline. Also included fix for regression in GC time caused by extra roots. Most of the regression was IMT. Fixed bug in DumpGcPerformanceInfo where we would get SIGABRT due to detached thread. EvaluateAndApplyChanges: From ~2500 -> ~1980 GC time: 8.2s -> 7.2s due to 1s less of MarkConcurrentRoots Bug: 19264997 Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0 Fix bogus image test assert Previously we were comparing the size of the non moving space to size of the image file. Now we properly compare the size of the image space against the size of the image file. Bug: 19264997 Change-Id: I7359f1f73ae3df60c5147245935a24431c04808a [MIPS64] Fix art_quick_invoke_stub argument offsets. ArtMethod reference's size got bigger, so we need to move other args and leave enough space for ArtMethod* and 'this' pointer. This fixes mips64 boot. Bug: 19264997 Change-Id: I47198d5f39a4caab30b3b77479d5eedaad5006ab
* Quick: Inline synthetic accessors generated by jack.Vladimir Marko2015-05-061-1/+4
| | | | | | | | | | | | While javac names synthetic accessors "access$nnn", jack names them "-getN", "-putN" and "-wrapN". For simplicity, treat all methods starting with "-" as synthetic accessors. Bug: 20873367 (cherry picked from commit d5f1005da7599f149b1332402c9791ef2acb8c42) Change-Id: Ifcc77fc3c5dd44797a48632c8e16416fbc273a93
* Replace String CharArray with internal uint16_t array.Jeff Hao2015-04-271-0/+5
| | | | | | | | | | | | Summary of high level changes: - Adds compiler inliner support to identify string init methods - Adds compiler support (quick & optimizing) with new invoke code path that calls method off the thread pointer - Adds thread entrypoints for all string init methods - Adds map to verifier to log when receiver of string init has been copied to other registers. used by compiler and interpreter Change-Id: I797b992a8feb566f9ad73060011ab6f51eb7ce01
* ART: Clean up includes.Vladimir Marko2015-04-131-0/+1
| | | | | | | Reduce dependencies to improve incremental build times. Break up circular dependency involving class_linker-inl.h. Change-Id: I4be742c5c2b5cd9855beea86630fd68aab76b0db
* Move ArtField to nativeMathieu Chartier2015-04-101-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "Revert "Add JIT""Mathieu Chartier2015-02-241-1/+11
| | | | | | | | Added missing EntryPointToCodePointer. This reverts commit a5ca888d715cd0c6c421313211caa1928be3e399. Change-Id: Ia74df0ef3a7babbdcb0466fd24da28e304e3f5af
* Revert "Add JIT"Nicolas Geoffray2015-02-241-11/+1
| | | | | | | | | | | | | | | Sorry, run-test crashes on target: 0-05 12:15:51.633 I/DEBUG (27995): Abort message: 'art/runtime/mirror/art_method.cc:349] Check failed: PcIsWithinQuickCode(reinterpret_cast<uintptr_t>(code), pc) java.lang.Throwable java.lang.Throwable.fillInStackTrace() pc=71e3366b code=0x71e3362d size=ad000000' 10-05 12:15:51.633 I/DEBUG (27995): r0 00000000 r1 0000542b r2 00000006 r3 00000000 10-05 12:15:51.633 I/DEBUG (27995): r4 00000006 r5 b6f9addc r6 00000002 r7 0000010c 10-05 12:15:51.633 I/DEBUG (27995): r8 b63fe1e8 r9 be8e1418 sl b6427400 fp b63fcce0 10-05 12:15:51.633 I/DEBUG (27995): ip 0000542b sp be8e1358 lr b6e9a27b pc b6e9c280 cpsr 40070010 10-05 12:15:51.633 I/DEBUG (27995): Bug: 17950037 This reverts commit 2535abe7d1fcdd0e6aca782b1f1932a703ed50a4. Change-Id: I6f88849bc6f2befed0c0aaa0b7b2a08c967a83c3
* Add JITMathieu Chartier2015-02-231-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently disabled by default unless -Xjit is passed in. The proposed JIT is a method JIT which works by utilizing interpreter instrumentation to request compilation of hot methods async during runtime. JIT options: -Xjit / -Xnojit -Xjitcodecachesize:N -Xjitthreshold:integervalue The JIT has a shared copy of a compiler driver which is accessed by worker threads to compile individual methods. Added JIT code cache and data cache, currently sized at 2 MB capacity by default. Most apps will only fill a small fraction of this cache however. Added support to the compiler for compiling interpreter quickened byte codes. Added test target ART_TEST_JIT=TRUE and --jit for run-test. TODO: Clean up code cache. Delete compiled methods after they are added to code cache. Add more optimizations related to runtime checks e.g. direct pointers for invokes. Add method recompilation. Move instrumentation to DexFile to improve performance and reduce memory usage. Bug: 17950037 Change-Id: Ifa5b2684a2d5059ec5a5210733900aafa3c51bca
* ART: Optimizing compiler intrinsicsAndreas Gampe2015-01-151-0/+3
| | | | | | | | | Add intrinsics infrastructure to the optimizing compiler. Add almost all intrinsics supported by Quick to the x86-64 backend. Further intrinsics require more assembler support. Change-Id: I48de9b44c82886bb298d16e74e12a9506b8e8807
* Remove portable.Elliott Hughes2014-12-121-0/+1
| | | | Change-Id: I3bf3250fa866fd2265f1b115d52fa5dedc48a7fc
* Rewrite GVN's field id and field type handling.Vladimir Marko2014-11-211-3/+1
| | | | | | | | | | | | | | | | Create a helper unit for dex insn classification and cache dex field type (as encoded in the insn) in the MirFieldInfo. Use this for cleanup and a few additional DCHECKs. Change the GVN's field id to match the field lowering info index (MIR::meta::{i,s}field_lowering_info), except where multiple indexes refer to the same field and we use the lowest of the applicable indexes. Use the MirMethodInfo from MIRGraph to retrieve field type for GVN using this index. This slightly reduces GVN compilation time and prepares for further compilation time improvements. Change-Id: I1b1247cdb8e8b6897254e2180f3230f10159bed5
* ART: Replace COMPILE_ASSERT with static_assert (runtime)Andreas Gampe2014-11-032-46/+35
| | | | | | Replace all occurrences of COMPILE_ASSERT in the runtime tree. Change-Id: I01e420899c760094fb342cc6cb9e692dd670a0b2
* Change Reference.get() intrinsic to Reference.getReferent().Mathieu Chartier2014-09-091-1/+1
| | | | | | | | | | | | | The reference intrinsic was incorrectly inlining PhantomReference.get(). We now get around this by adding a layer of indirection. Reference.get() now calls getReferent() which is intrinsified and inlined. Requires: https://android-review.googlesource.com/#/c/107100/ Bug: 17429865 Change-Id: Ie91e70abf43cedf3c707c7bb8a5059e19d2a2577
* Added support for patching classes from different dex files.Fred Shih2014-08-061-1/+1
| | | | | | | | | Added support for class patching from different dex files and moved ScopedObjectAccess from the quick compiler to driver. Slight refactoring for clarity. Bug: 16656190 Change-Id: I107fcbce75db42ca61321ea1c5d5f236680a1b3d
* AArch64: Add inlining support for ceil(), floor(), rint(), round()Serban Constantinescu2014-08-041-0/+5
| | | | | | | | | | | | | | | This patch adds inlining support for the following Math, StrictMath methods in the ARM64 backend: * double ceil(double) * double floor(double) * double rint(double) * long round(double) * int round(float) Also some cleanup. Change-Id: I9f5a2f4065b1313649f4b0c4380b8176703c3fe1 Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* Revert "Revert "Revert "Revert "Add intrinsic for Reference.get()""""Fred Shih2014-07-151-0/+1
| | | | | | | Fixed TargetReg issue causing build failure for x86. This reverts commit 9e82bd3f0ce9e5f5777bea2f752ff3e251d32f9f. Change-Id: I7e6a526954467aaf68deeed999880dfe9aa5f06e
* Revert "Revert "Revert "Add intrinsic for Reference.get()"""Sebastien Hertz2014-07-111-1/+0
| | | | | | This reverts commit d4415e8bd04c4a9367744ff0149597b4f37a0e0a. Change-Id: I34553ccbdcfea35c7742d21be2a74dc7085ab2a0
* Revert "Revert "Add intrinsic for Reference.get()""Christopher Ferris2014-07-111-0/+1
| | | | | | This reverts commit a9b870b73a155ce70c867d5b3f9758fab0b45f07. Change-Id: Ic2a9b47f2b911bef4b764d10bc33cf000e4b4211
* Revert "Add intrinsic for Reference.get()"Christopher Ferris2014-07-111-1/+0
| | | | | | This reverts commit 460503b13bc894828a2d2d47d09e5534b3e91aa1. Change-Id: Ie63f43049307e02e3b90f4e034abc9ea54ca4e24
* Add intrinsic for Reference.get()Fred Shih2014-07-101-0/+1
| | | | | | | | | | Added an intrinsic function for Reference.get(). Return immediately without going through JNI if the slow path is not currently in use. Otherwise, branch off to the the existing JNI function. Approximately 47x speedup for cases where slow path is not enabled. Change-Id: I13ad65a356fe4e104d8d83980694dc2740d7d039
* ART: Intrinsic implementation for java.lang.System.arraycopy.DaniilSokolov2014-07-081-0/+1
| | | | | | | | | | | | Implements intrinsic for java.lang.System.arraycopy(char[], int, char[], int, int) - this method is internal to android class libraries and used in such classes as StringBuffer and StringBuilder. It is not possible to call it from application code. The intrinsic for this method is implemented as inline method (assembly code is generated manually). The intrinsic is x86 32 bit only. Change-Id: Id1b1e0a20d5f6d5f5ebfe1fdc2447b6d8a515432 Signed-off-by: Daniil Sokolov <daniil.y.sokolov@intel.com>
* AArch64: Add few more inline functionsSerban Constantinescu2014-07-031-0/+4
| | | | | | | | | | | | This patch adds inlining support for the following functions: * Math.max/min(long, long) * Math.max/min(float, float) * Math.max/min(double, double) * Integer.reverse(int) * Long.reverse(long) Change-Id: Ia2b1619fd052358b3a0d23e5fcbfdb823d2029b9 Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* Move quick frame info to OatQuickMethodHeader.Vladimir Marko2014-05-131-0/+61
| | | | | | | | | | | | | | | Rename OatMethodHeader to OatQuickMethodHeader, move frame info from OatMethodOffsets to OatQuickMethodHeader. Retrieve the info from other places for non-quick methods (portable compiled bytecode or jni stub, generic jni, runtime, abstract and proxy). This change has a libcore/ companion CL "Remove ArtMethod's quick fields for frame size and spills." https://android-review.googlesource.com/94164 Bug: 11767815 Change-Id: I0e31a7875d76732e1ec479c86b9b5ca01203507f
* Move DecodedInstruction into MIR.Ian Rogers2014-05-021-9/+7
| | | | Change-Id: I188dc7fef4f4033361c78daf2015b869242191c6
* Inlining synthetic accessors.Vladimir Marko2014-04-072-8/+24
| | | | | Bug: 11549140 Change-Id: I0d6a38c51887f55563414c240ac42ee64bdb5426
* Inlining setters that return one of their arguments.Vladimir Marko2014-04-072-18/+42
| | | | | | | | Useful for builder classes and synthetic setters. The latter are not inlined yet since they are static methods, i.e. they don't use "this" as the object for IPUT. Change-Id: I3d34156c3629b837a0a95ccc34a8aae3f4a636d5
* Revert "Inlining setters that return one of their arguments."Mathieu Chartier2014-04-042-42/+18
| | | | | | | | Bug: 13817614 This reverts commit 8e40c3e662d852da87b6bcfe79355f96ab9e91c7. Change-Id: Ia7ed2d933514781150b2e0b9855244e383c60187
* Revert "Inlining synthetic accessors."Mathieu Chartier2014-04-042-24/+8
| | | | This reverts commit 505ebb0e7b42e7facc8354515b06333ee8b84b10.
* Inlining synthetic accessors.Vladimir Marko2014-04-042-8/+24
| | | | | Bug: 11549140 Change-Id: Ie0034a6840b1beaa3df92f26bf9d315119c81e34
* Inlining setters that return one of their arguments.Vladimir Marko2014-04-042-18/+42
| | | | | | | | Useful for builder classes and synthetic setters. The latter are not inlined yet since they are static methods, i.e. they don't use "this" as the object for IPUT. Change-Id: I946cf570195be83ecec5fb32851bcaefad45f8a5
* Support inlining detection from debugger.Sebastien Hertz2014-03-211-36/+51
| | | | | | | | | | | | | | | In the context of the compiler, every method and field should be resolved. The InlineMethodAnalyser uses that property so we don't inline unresolved methods or methods accessing unresolved fields. In the context of the debugger, this is not true. We may install a breakpoint in a method that's never been resolved yet for instance. This CL weaks that property so we can detect getter/setter methods can be inlined even if they're not resolved yet. To differentiate both contexts, we pass a null inline method pointer to InlineMethodAnalyser::AnalyseIGetMethod. Bug: 12187616 Change-Id: I247f315b9abd6b065d5a7ec4116de15a6cce7649
* Move inline method detection to runtime.Vladimir Marko2014-03-122-0/+480
The debugger needs this for selective deoptimization. Change-Id: I8100000449b56e619288fb05d41ea6f02b53b334