summaryrefslogtreecommitdiffstats
path: root/runtime/entrypoints
Commit message (Collapse)AuthorAgeFilesLines
* Fix nested deoptimization.Mingyao Yang2015-06-182-1/+2
| | | | | | | | | | | | Handle nested deoptimization cases. Create a stacked shadow frame records to keep track of deoptimization shadow frames. Shadow frames under construction can be tracked in the same stack. Bug: 20845490 (cherry picked from commit 1f2d3ba6af52cf6f566deb38b7e07735c9a08fb6) Change-Id: I768285792c29e7c3cfcd21e7a2600802506024d8
* Move mirror::ArtMethod to nativeMathieu Chartier2015-06-0219-288/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Insert a read barrier in the JNI bridge.Hiroshi Yamauchi2015-05-073-1/+16
| | | | | | Bug: 20720510 Bug: 12687968 Change-Id: Ia9edb614853bad45ec25d6e2142361a8bda1eccf
* Replace String CharArray with internal uint16_t array.Jeff Hao2015-04-272-2/+59
| | | | | | | | | | | | 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
* Remove ArtMethod* parameter from dex cache entry points.Vladimir Marko2015-04-244-17/+39
| | | | | | | | | | | | | | | | Load the ArtMethod* using an optimized stack walk instead. This reduces the size of the generated code. Three of the entry points are called only from a slow-path and the fourth (InitializeTypeAndVerifyAccess) is rare and already slow enough that the one or two extra loads (depending on whether we already have the ArtMethod* in a register) are insignificant. And as we're starting to use PC-relative addressing of the dex cache arrays (already done by Quick for the boot image), having the ArtMethod* in a register becomes less likely anyway. Change-Id: Ib19b9d204e355e13bf386662a8b158178bf8ad28
* Replace NULL with nullptrMathieu Chartier2015-04-227-29/+29
| | | | | | | Also fixed some lines that were too long, and a few other minor details. Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
* Add AbstractMethod, Constructor, MethodMathieu Chartier2015-04-212-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moves functionality to ART from libcore. Precursor to moving ArtMethods to native. Mostly performance improvements. N5 perf before (irrelevant results removed): Class_getConstructor 962.87 =========== Class_getDeclaredMethod 2394.37 ============================ Class_getMethod 2509.20 ============================== Class_newInstance 1999.81 ======================= Method_invokeI 1439.02 ================= Method_invokePreBoxedI 1415.82 ================ Method_invokeStaticI 1456.24 ================= Method_invokeStaticPreBoxedI 1427.32 ================= Method_invokeStaticV 814.47 ========= Method_invokeV 816.56 ========= After: benchmark ns linear runtime Class_getConstructor 1302.04 ================ Class_getDeclaredMethod 1459.01 ================== Class_getMethod 1560.40 =================== Class_newInstance 2029.94 ========================= Method_invokeI 1312.89 ================ Method_invokePreBoxedI 1255.01 =============== Method_invokeStaticI 1289.13 =============== Method_invokeStaticPreBoxedI 1196.52 ============== Method_invokeStaticV 790.82 ========= Method_invokeV 791.73 ========= Performance improvements are more than just fixing regressions introduced in: http://android-review.googlesource.com/#/c/146069/ Bug: 19264997 Change-Id: Ife79c469fdb09f30e3aefcfc3e0ce5ed32303fce
* ARM64: Remove suspend register.Zheng Xu2015-04-141-1/+1
| | | | | | | | It also clean up build/remove frame used by JNI compiler and generates stp/ldp instead of str/ldr. Also x19 has been unblocked in both quick and optimizing compiler. Change-Id: Idbeac0942265f493266b2ef9b7a65bb4054f0e2d
* ART: Ignore result for exception-case JNIEndWithReferenceAndreas Gampe2015-04-101-20/+15
| | | | | | | | | | | | | The value may not contain a valid jobject, so ignore and use null directly. Refactor a bit to have one common function for both synchronized and non-synchronized case. Add a test to the JNI compiler tests. Bug: 18135031 Change-Id: If2f004a112f36f4ff68172a946dec67ce561ae4d
* Move ArtField to nativeMathieu Chartier2015-04-104-62/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 "ART: Fix noreturn for Mac"Andreas Gampe2015-04-072-17/+7
| | | | | | | | | | missing-noreturn was turned off for Mac for all the other similar warnings. Restore the cleaner header file. This reverts commit 79dda4251d7e3a7888e326bc7a3f069d6190d194. Change-Id: Ia25a47533ff7848ad96e0d76e7f0ea768a48f946
* ART: Fix noreturn for MacAndreas Gampe2015-04-062-7/+17
| | | | Change-Id: I59b60340a90672a4de4d3bdf092fa504394d5892
* ART: Enable more Clang warningsAndreas Gampe2015-04-062-12/+13
| | | | Change-Id: Ie6aba02f4223b1de02530e1515c63505f37e184c
* Revert "Revert "Deoptimization-based bce.""Mingyao Yang2015-04-012-0/+3
| | | | | | This reverts commit 0ba627337274ccfb8c9cb9bf23fffb1e1b9d1430. Change-Id: I1ca10d15bbb49897a0cf541ab160431ec180a006
* Unify ART's various implementations of bit_cast.Roland Levillain2015-03-241-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* JDWP: Optimized single step during debuggingDaniel Mihalyi2015-03-241-2/+34
| | | | | | | | | | | | | | | | | | | | | | | For single stepping full deoptimization and undeoptimizations were performed with significant overhead, because every code will be executed in interpreted mode during a single step, even if it is not strictly required. For example, if we have a computation heavy method call and we would like to step over it, that method (and all the methods called from it) will run in interpreter mode. This can take so long in some cases (e.g. multiple minutes) that it makes debugging process unusable. The solution for this limitation is not using full deoptimizations for single steps and force interpreter only for those methods that we are about to step into, and require stack deoptimization before step outs. Bug: 17750566 Bug: 18094282 Bug: https://code.google.com/p/android/issues/detail?id=77984 Change-Id: I683c52465883146c4c84ec47bf96f8efd920527f Signed-off-by: Daniel Mihalyi <daniel.mihalyi@mattakis.com>
* Revert "Deoptimization-based bce."Andreas Gampe2015-03-242-3/+0
| | | | | | | | | | 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-0/+3
| | | | | | | | | | | | | | | | | | | 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
* Remove ThrowLocation.Nicolas Geoffray2015-03-105-65/+24
| | | | | | | Note that this is a cleanup change, and has no functionality change. The ThrowLocation had no use anymore. Change-Id: I3d2126af1dc673cec3a0453ff3d56a172663a5f6
* Merge "Compute the right catch location for the debugger."Nicolas Geoffray2015-03-094-10/+8
|\
| * Compute the right catch location for the debugger.Nicolas Geoffray2015-03-094-10/+8
| | | | | | | | | | | | Also remove tls ThrowLocation, it is not needed anymore. Change-Id: I78fddf09ce968ca475e39c17fa76d699c589c8d9
* | Initial support for quick compiler on MIPS64r6.Maja Gagic2015-03-061-2/+0
|/ | | | Change-Id: I6f43027b84e4a98ea320cddb972d9cf39bf7c4f8
* Change how we report exceptions to the debugger.Nicolas Geoffray2015-03-031-2/+0
| | | | | | | This is only a refactoring/cleanup. Bug fixes with respect to catch location, and more cleanups will follow. Change-Id: I30d3c6260b0c8f8115a811621397225b88f2063a
* ART: Make error messages for StackOverflow WARNINGsAndreas Gampe2015-02-191-1/+1
| | | | | | | | Log error messages as LOG(WARNING). We'll throw either a (partial) StackOverflow or OutOfMemoryError anyways. Bug: 18713034 Change-Id: If51c0d6745b02f5ecb98b1387f8bde1e2e57e0c0
* Default to 64-bit for tests of methods with varying ISAs for valgrind.Jeff Hao2015-02-171-0/+6
| | | | | | | | | The size of the created methods will technically not be correct, but they will be larger than necessary when the target is changed to 32-bit, so valgrind will not complain. Bug: 19368740 Change-Id: Ic78867b4700248ec6d70f5d7f6d87ce9447ac448
* Fix a compilation error for Mips64.Douglas Leung2015-02-091-0/+1
| | | | Change-Id: I4f35750c4b840fce18c467995787e92bc38a7812
* ART: Change x86 long param ABI (Quick/JNI/Opt)Mark Mendell2015-01-301-0/+10
| | | | | | | | | | | | | | | | | | | | | | | Ensure that we don't pass a long parameter across the last register and the stack: skip the register and allocate it only on the stack. This was requested to simplify the optimizing compiler code generation for x86. Optimizing (Baseline) compiler support for x86 longs: - Remove QuickParameter from Location, as there are no longer any uses of it. Bump oat.h version because we changed an ABI again. I changed IsParamALong() to return false for argument 0 (this argument). I am not sure why it differed from all other tests. I have not tested on ARM. I followed Nicolas's suggestions for setting the value of kSplitPairAcrossRegisterAndStack for different architectures. Change-Id: I2f16b33c1dac58dd4f4f503e9c2309d845f5fb7a Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
* Force set resolved method for static invokesMathieu Chartier2015-01-281-0/+10
| | | | | | | | | | | | For static invokes, we may dispatch to the static method in the superclass but resolve using the subclass. To prevent getting slow paths on each invoke, we force set the resolved method for the super class dex method index if we are in the same dex file. Added test. Bug: 19175856 Change-Id: I26f8644a7f725f5c2dc2a94a8e9578f573792507
* Revert "Revert "ART: Implement X86 hard float (Quick/JNI/Baseline)""Mark P Mendell2015-01-271-5/+9
| | | | | | | | | | This reverts commit 949c91fb91f40a4a80b2b492913cf8541008975e. This time, don't clobber EBX before saving it. Redo some of the macros to make register usage explicit. Change-Id: I8db8662877cd006816e16a28f42444ab7c36bfef
* Revert "ART: Implement X86 hard float (Quick/JNI/Baseline)"Vladimir Marko2015-01-271-9/+5
| | | | | | | | | | | | | And the 3 Mac build fixes. Fix conflicts in context_x86.* . This reverts commits 3d2c8e74c27efee58e24ec31441124f3f21384b9 , 34eda1dd66b92a361797c63d57fa19e83c08a1b4 , f601d1954348b71186fa160a0ae6a1f4f1c5aee6 , bc503348a1da573488503cc2819c9e30807bea31 . Bug: 19150481 Change-Id: I6650ee30a7d261159380fe2119e14379e4dc9970
* Merge "ART: Implement X86 hard float (Quick/JNI/Baseline)"Vladimir Marko2015-01-261-5/+9
|\
| * ART: Implement X86 hard float (Quick/JNI/Baseline)Mark Mendell2015-01-231-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use XMM0-XMM3 as parameter registers for float/double on X86. X86_64 already uses XMM0-XMM7 for parameters. Change the 'hidden' argument register from XMM0 to XMM7 to avoid a conflict. Add support for FPR save/restore in runtime/arch/x86. Minimal support for Optimizing baseline compiler. Bump the version in runtime/oat.h because this is an ABI change. Change-Id: Ia6fe150e8488b9e582b0178c0dda65fc81d5a8ba Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
* | More of the concurrent copying collector.Hiroshi Yamauchi2015-01-231-0/+14
|/ | | | | Bug: 12687968 Change-Id: I62f70274d47df6d6cab714df95c518b750ce3105
* Merge "Fix refs_and_args callee save order for Mips32."Andreas Gampe2015-01-161-1/+1
|\
| * Fix refs_and_args callee save order for Mips32.Douglas Leung2015-01-121-1/+1
| | | | | | | | | | | | This patch fixes an ART crash while using the soft keyboard. Change-Id: Ib2d651c460ce2707356986cd733bed23b0cabb21
| * Merge "Revert "ART: Implement hard float for X86""Vladimir Marko2015-01-121-9/+5
| |\
| | * Revert "ART: Implement hard float for X86"Vladimir Marko2015-01-121-9/+5
| | | | | | | | | | | | | | | | | | This reverts commit 59b9cf7ec0ccc13df91be0bd5c723b8c52410739. Change-Id: I08333b528032480def474286dc368d916a07e17f
| * | Merge "ART: Implement hard float for X86"Vladimir Marko2015-01-121-5/+9
| |\|
| | * ART: Implement hard float for X86Mark Mendell2015-01-121-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use XMM0-XMM3 as parameter registers for float/double on X86. X86_64 already uses XMM0-XMM7 for parameters. Change the 'hidden' argument register from XMM0 to XMM7 to avoid a conflict. This change was requested to simplify the Optimizing compiler implementation. Change-Id: I89ba8ade99b9a8a5b1ad1ee5f5cbfd33d656bfaa Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
* | | ART: Mips64 runtime supportAndreas Gampe2015-01-151-20/+114
| | | | | | | | | | | | | | | | | | Interpret-only Mips64 runtime support. Change-Id: Iee22d0c8c77105d9b2f03a67dc4e09957fe0ab0a
* | | ART: Allow to compile interpret-only mips64 filesAndreas Gampe2015-01-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include enough infrastructure to allow cross-compiling for mips64, interpret-only. This includes the instruction-set-features, frame size info and utils assembler. Also add a disassembler for oatdump, and support in patchoat. Note: the runtime cannot run mips64, yet. Change-Id: Id106581fa76b478984741c62a8a03be0f370d992
* | | Skip r1 on arm if first parameter is a long.Nicolas Geoffray2015-01-131-0/+10
|/ / | | | | | | Change-Id: I16d927ee0a0b55031ade4c92c0095fd74e18ed5b
* | Fix handling of long argument spanning register/memory.Nicolas Geoffray2015-01-121-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comment in arm_lir.h says: * If a 64-bit argument would span the register/memory argument * boundary, it will instead be fully passed in the frame. This change implements such logic for all platforms. We still need to pass the low part in register as well because I haven't ported the jni compilers (x86 and mips) to it. Once the jni compilers are updated, we can remove the register assignment. Note that this greatly simplifies optimizing's register allocator by not having to understand a long spanning register and memory. Change-Id: I59706ca5d47269fc46e5489ac99bd6576e87e7f3
* | Fix signal test to work with gcstressMathieu Chartier2015-01-071-5/+3
|/ | | | | | | | | | | | | 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: Reorder entrypoint argument orderAndreas Gampe2014-12-299-86/+110
| | | | | | | | | | Shuffle the ArtMethod* referrer backwards for easier removal. Clean up ARM & MIPS assembly code. Change some macros to make future changes easier. Change-Id: Ie2862b68bd6e519438e83eecd9e1611df51d7945
* Remove portable.Elliott Hughes2014-12-1214-1528/+4
| | | | Change-Id: I3bf3250fa866fd2265f1b115d52fa5dedc48a7fc
* Support proxy method in StackVisitor::GetThisObjectSebastien Hertz2014-12-091-0/+23
| | | | | | | | | | | Adds function artQuickGetProxyThisObject which returns the 'this' object of the proxy method using the QuickArgumentVisitor. Since proxy methods have the same layout than the kRefsAndArgs runtime method and 'this' is the 1st method argument, it is located in the first GPR. Bug: 17965861 Change-Id: Ic6ef6c83b9a549c25f9929d5e00ffe1d3a9a36f0
* Remove MethodHelper.Ian Rogers2014-12-021-9/+61
| | | | | | | Move use as a shorty processor to only use in portable. Move GetNumberOfReferenceArgsWithoutReceiver to mirror::ArtMethod. Change-Id: I7ded3d05315c84bce4ab19cb330ef74289da4bb3
* Fix artQuickResolutionTrampoline.Ian Rogers2014-12-021-1/+4
| | | | | | Mistakenly updating dex method index of the non-receiver method. Change-Id: I42296e344a53e001bf37414852cd9f23f629ca40
* Move FindDexMethodIndexInOtherDexFile into ArtMethod.Ian Rogers2014-12-021-35/+39
| | | | | | | | | | | Move FindDexMethodIndexInOtherDexFile out of MethodHelper into ArtMethod in preparation for the removal of MethodHelper. Tidy ClassLinker::ResolveMethod so that all exception paths flow through the exception pending assertion. Tidy artQuickResolutionTrampoline to be more explicit about variable names and only update the dex cache if necessary. Change-Id: I3e48eb4f6c1291533067c1b53efe90c53bfcaea8