summaryrefslogtreecommitdiffstats
path: root/runtime/entrypoints
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove MethodHelper from the interpreter.Ian Rogers2014-12-025-19/+15
| | | | | | | | | Use ShadowFrame to get the executing method to avoid a handle for the current method. Various associated bits of header file clean-up and removal of an unnecessary use of MethodHelper in CompilerDriver. Change-Id: I3b6f4413701e8fc6b0c58b0041a0dd15472bedaa
* Merge "ART: Fix unused variables and functions"Andreas Gampe2014-11-242-96/+96
|\
| * ART: Fix unused variables and functionsAndreas Gampe2014-11-242-96/+96
| | | | | | | | Change-Id: Icbab884d2dfd71656347368b424cb35cbf524051
* | Delete ArtMethod gc_map_ fieldMathieu Chartier2014-11-241-1/+1
|/ | | | | | | | | | | Moved the gc_map field from OatMethod to OatQuickMethodHeader. Deleted the ArtMethod gc_map_ field. Bug: 17643507 Change-Id: Ifa0470c3e4c2f8a319744464d94c6838b76b3d48 (cherry picked from commit 807140048f82a2b87ee5bcf337f23b6a3d1d5269)
* Merge "Add JNI trampoline for mips32."Ian Rogers2014-11-221-5/+4
|\
| * Add JNI trampoline for mips32.Douglas Leung2014-10-311-5/+4
| | | | | | | | | | | | This patch allows the browser to come up. Change-Id: Icad9da868be76d6a08e615807fad8678ac0a110f
* | Fix oatdump to use OatHeader pointer sizeMathieu Chartier2014-11-211-1/+1
| | | | | | | | | | | | | | Bug: 18473190 Change-Id: If505b4f62105899f4f1257d3bccda3e6eb0dcd7c (cherry picked from commit c934e483ceabbd589422beea1fa35f5182ecfa99)
* | Change 64 bit ArtMethod fields to be pointer sizedMathieu Chartier2014-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed the 64 bit entrypoint and gc map fields in ArtMethod to be pointer sized. This saves a large amount of memory on 32 bit systems. Reduces ArtMethod size by 16 bytes on 32 bit. Total number of ArtMethod on low memory mako: 169957 Image size: 49203 methods -> 787248 image size reduction. Zygote space size: 1070 methods -> 17120 size reduction. App methods: ~120k -> 2 MB savings. Savings per app on low memory mako: 125K+ per app (less active apps -> more image methods per app). Savings depend on how often the shared methods are on dirty pages vs shared. TODO in another CL, delete gc map field from ArtMethod since we should be able to get it from the Oat method header. Bug: 17643507 Change-Id: Ie9508f05907a9f693882d4d32a564460bf273ee8 (cherry picked from commit e832e64a7e82d7f72aedbd7d798fb929d458ee8f)
* | Merge "Fix DCHECK in artInstrumentationMethodEntryFromCode"Sebastien Hertz2014-11-171-1/+1
|\ \
| * | Fix DCHECK in artInstrumentationMethodEntryFromCodeSebastien Hertz2014-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We do use the quick to interpreter bridge for deoptimized method. So move the DCHECK only in the else case. Bug: 18170596 Change-Id: Ife83fd71da7490196ada694a4227b43a9ecbf577
* | | Instruction set features for ARM64, MIPS and X86.Ian Rogers2014-11-133-3/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Also, refactor how feature strings are handled so they are additive or subtractive. Make MIPS have features for FPU 32-bit and MIPS v2. Use in the quick compiler rather than #ifdefs that wouldn't have worked in cross-compilation. Add SIMD features for x86/x86-64 proposed in: https://android-review.googlesource.com/#/c/112370/ Bug: 18056890 Change-Id: Ic88ff84a714926bd277beb74a430c5c7d5ed7666
* | ART: Fix some redundant declarationsAndreas Gampe2014-11-041-0/+109
| | | | | | | | | | | | | | Refactor entrypoint initialization such that there is a large set of common extern "C" declarations for quick entrypoints. Change-Id: Iae8548e5f7ebbf51dc6c55c4283fa89437e18c98
* | Merge "ART: More warnings"Andreas Gampe2014-11-051-2/+2
|\ \
| * | ART: More warningsAndreas Gampe2014-11-041-2/+2
| | | | | | | | | | | | | | | | | | | | | Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general, and -Wunused-but-set-parameter for GCC builds. Change-Id: I81bbdd762213444673c65d85edae594a523836e5
* | | Fix build.Ian Rogers2014-11-041-4/+4
| | | | | | | | | | | | Change-Id: I7c6657bdc31e57c144999d4a3f8c2836c3d90403
* | | Fix mac build.Ian Rogers2014-11-041-6/+8
|/ / | | | | | | Change-Id: I228cdb0b25cd0f2c5e745a87a97aa8fd3c8a160a
* | ART: Replace COMPILE_ASSERT with static_assert (runtime)Andreas Gampe2014-11-031-7/+8
| | | | | | | | | | | | Replace all occurrences of COMPILE_ASSERT in the runtime tree. Change-Id: I01e420899c760094fb342cc6cb9e692dd670a0b2
* | Remove -Wno-unused-parameter and -Wno-sign-promo from base cflags.Ian Rogers2014-11-037-32/+17
| | | | | | | | | | | | | | | | | | | | | | Fix associated errors about unused paramenters and implict sign conversions. For sign conversion this was largely in the area of enums, so add ostream operators for the effected enums and fix tools/generate-operator-out.py. Tidy arena allocation code and arena allocated data types, rather than fixing new and delete operators. Remove dead code. Change-Id: I5b433e722d2f75baacfacae4d32aef4a828bfe1b
* | Check null this pointer for direct methods in FindMethodFast.Jeff Hao2014-11-031-3/+2
|/ | | | | | | | | | Also adds regression test 127-secondarydex. Bug: 18150997 (cherry picked from commit d2bee3dffa2f552512f47bca605ed857e3ae30ea) Change-Id: I911dd7c92c51939504cfee5a3d18a835987b8388
* Move MethodHelper::GetReturnType to mirror::ArtMethod.Ian Rogers2014-10-281-12/+8
| | | | | | Also, fix missing handle in HasSameSignatureWithDifferentClassLoaders. Change-Id: I9e1ffd09be950ecc8346fc3c485760d82d9ecab3
* Optimize method linkingMathieu Chartier2014-10-271-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added more inlining, removed imt array allocation and replaced it with a handle scope. Removed some un-necessary handle scopes. Added logic to base interface method tables from the superclass so that we dont need to reconstruct for every interface (large win). Facebook launch Dalvik KK MR2: TotalTime: 3165 TotalTime: 3652 TotalTime: 3143 TotalTime: 3298 TotalTime: 3212 TotalTime: 3211 Facebook launch TOT before: WaitTime: 3702 WaitTime: 3616 WaitTime: 3616 WaitTime: 3687 WaitTime: 3742 WaitTime: 3767 After optimizations: WaitTime: 2903 WaitTime: 2953 WaitTime: 2918 WaitTime: 2940 WaitTime: 2879 WaitTime: 2792 LinkInterfaceMethods no longer one of the hottest methods, new list: 4.73% art::ClassLinker::LinkVirtualMethods(art::Thread*, art::Handle<art::mirror::Class>) 3.07% art::DexFile::FindClassDef(char const*) const 2.94% art::mirror::Class::FindDeclaredStaticField(art::mirror::DexCache const*, unsigned int) 2.90% art::DexFile::FindStringId(char const*) const Bug: 18054905 Bug: 16828525 (cherry picked from commit 1fb463e42cf1d67595cff66d19c0f99e3046f4c4) Change-Id: I27cc70178fd3655fbe5a3178887fcba189d21321
* Merge "Tidy logging code not using UNIMPLEMENTED."Ian Rogers2014-10-254-13/+9
|\
| * Tidy logging code not using UNIMPLEMENTED.Ian Rogers2014-10-244-13/+9
| | | | | | | | Change-Id: I7a79c1671a6ff8b2040887133b3e0925ef9a3cfe
* | ARM: Use hardfp calling convention between java to java call.Zheng Xu2014-10-241-59/+89
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | This patch default to use hardfp calling convention. Softfp can be enabled by setting kArm32QuickCodeUseSoftFloat to true. We get about -1 ~ +5% performance improvement with different benchmark tests. Hopefully, we should be able to get more performance by address the left TODOs, as some part of the code takes the original assumption which is not optimal. DONE: 1. Interpreter to quick code 2. Quick code to interpreter 3. Transition assembly and callee-saves 4. Trampoline(generic jni, resolution, invoke with access check and etc.) 5. Pass fp arg reg following aapcs(gpr and stack do not follow aapcs) 6. Quick helper assembly routines to handle ABI differences 7. Quick code method entry 8. Quick code method invocation 9. JNI compiler TODO: 10. Rework ArgMap, FlushIn, GenDalvikArgs and affected common code. 11. Rework CallRuntimeHelperXXX(). Change-Id: I9965d8a007f4829f2560b63bcbbde271bdcf6ec2
* Tidy up logging.Ian Rogers2014-10-222-1/+2
| | | | | | | | | | | | | | | | | Move gVerboseMethods to CompilerOptions. Now "--verbose-methods=" option to dex2oat rather than runtime argument "-verbose-methods:". Move ToStr and Dumpable out of logging.h, move LogMessageData into logging.cc except for a forward declaration. Remove ConstDumpable as Dump methods are all const (and make this so if not currently true). Make LogSeverity an enum and improve compile time assertions and type checking. Remove log_severity.h that's only used in logging.h. With system headers gone from logging.h, go add to .cc files missing system header includes. Also, make operator new in ValueObject private for compile time instantiation checking. Change-Id: I3228f614500ccc9b14b49c72b9821c8b0db3d641
* Const-ify functions/variables in trampoline entrypoints.Ian Rogers2014-10-211-22/+23
| | | | Change-Id: I777600c7362ab3c1dd65a695e36a4633b43033fe