summaryrefslogtreecommitdiffstats
path: root/runtime/entrypoints/quick
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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-033-19/+14
|/ | | | | | | | | | | 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
* Merge "Tidy logging code not using UNIMPLEMENTED."Ian Rogers2014-10-252-5/+5
|\
| * Tidy logging code not using UNIMPLEMENTED.Ian Rogers2014-10-242-5/+5
| | | | | | | | 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
* Refactor quick entrypointsIan Rogers2014-10-2012-269/+243
| | | | | | | | | | | Remove FinishCalleeSaveFrameSetup. Assembly routines write down anchor into TLS as well as placing runtime method in callee save frame. Simplify artSet64InstanceFromCode by not computing the referrer from the stack in the C++ code. Move assembly offset tests next to constant declaration and tidy arch_test. Change-Id: Iededeebc05e54a1e2bb7bb3572b8ba012cffa1c8
* Make ART compile with GCC -O0 again.Ian Rogers2014-10-163-6/+8
| | | | | | | | | | | | | Tidy up InstructionSetFeatures so that it has a type hierarchy dependent on architecture. Add to instruction_set_test to warn when InstructionSetFeatures don't agree with ones from system properties, AT_HWCAP and /proc/cpuinfo. Clean-up class linker entry point logic to not return entry points but to test whether the passed code is the particular entrypoint. This works around image trampolines that replicate entrypoints. Bug: 17993736 Change-Id: I5f4b49e88c3b02a79f9bee04f83395146ed7be23
* Merge "Work around ICE bugs with MIPS GCC and O1."Ian Rogers2014-10-101-19/+17
|\
| * Work around ICE bugs with MIPS GCC and O1.Ian Rogers2014-10-101-19/+17
| | | | | | | | | | | | | | | | | | Also, work around GCC warning bugs where array accesses with explicit bounds checks are flagged as being out-of-bounds. Significantly, clean-up the HandleScope so the array accesses don't appear out-of-bounds at compile time. Change-Id: I5d66567559cc1f97cd0aa02c0df8575ebadbfe3d
* | Fix 2 new sets of clang compiler warnings.Ian Rogers2014-10-101-0/+9
|/ | | | | | | | | | | Fix issues that are flagged by -Wfloat-equal and -Wmissing-noreturn. In the case of -Wfloat-equal the current cases in regular code are deliberate, so the change is to silence the warning. For gtest code the appropriate fix is to switch from EXPECT_EQ to EXPECT_(FLOAT|DOUBLE)_EQ. The -Wmissing-noreturn warning isn't enabled due to a missing noreturn in gtest. This issue has been reported to gtest. Change-Id: Id84c70c21c542716c9ee0c41492e8ff8788c4ef8
* stdint types all the way!Ian Rogers2014-10-093-13/+13
| | | | Change-Id: I4e4ef3a2002fc59ebd9097087f150eaf3f2a7e08
* Don't copy fill array data to quick literal pool.Ian Rogers2014-10-081-35/+11
| | | | | | | | | | | Currently quick copies the fill array data from the dex file to the literal pool. It then has to go through hoops to pass this PC relative address down to out-of-line code. Instead, pass the offset of the table to the out-of-line code and use the CodeItem data associated with the ArtMethod. This reduces the size of oat code while greatly simplifying it. Unify the FillArrayData implementation in quick, portable and the interpreters. Change-Id: I9c6971cf46285fbf197856627368c0185fdc98ca
* Handlerize methods across some GC points.Hiroshi Yamauchi2014-10-061-6/+5
| | | | | Bug: 12687968 Change-Id: I0d5b0a78488ba76db4d25991d8db95b24bb624e9
* ART: Fix some -Wpedantic errorsAndreas Gampe2014-09-292-9/+6
| | | | | | | | | | | | | | | | Remove extra semicolons. Dollar signs in C++ identifiers are an extension. Named variadic macros are an extension. Binary literals are a C++14 feature. Enum re-declarations are not allowed. Overflow. Change-Id: I7d16b2217b2ef2959ca69de84eaecc754517714a
* Optimize get/set reflection performanceMathieu Chartier2014-09-262-0/+3
| | | | | | | | | | | | | | Speedups mostly from reducing how often access checks are needed, and adding more inlining, and adding templates. Field_getInt from ~850ns -> 350ns. Field_setInt from ~900ns -> 370ns. Bug: 14063288 (cherry picked from commit ffc788cb7b5b9f53734d7bb8af2d5e45d885546b) Change-Id: I2441581ff3478c6ae43b6aa49939ff3f07555ec8
* ART: Rename Handle hierarchyAndreas Gampe2014-09-151-2/+2
| | | | | | | Bring the names in line with normal OO principles: ConstHandle becomes Handle, and Handle becomes MutableHandle. Change-Id: I0f018eb7ba28bc422e3a23dd73a6cbe6fc2d2044
* Compile time performance improvements focusing on interpret-only.Ian Rogers2014-09-123-17/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce virtual method dispatch in the method verifier and make more code inline-able. Add a StringPiece with const char* equality operator to avoid redundant StringPieces and strlens. Remove back link from register line to verifier and pass as argument to reduce size of RegisterLine. Remove instruction length from instruction flags and compute from the instruction, again to reduce size. Add suspend checks to resolve and verify to allow for more easy monitor inflation and reduce contention on Locks::thread_list_suspend_thread_lock_. Change ThrowEarlierClassFailure to throw pre-allocated exception. Avoid calls to Thread::Current() by passing self. Template specialize IsValidClassName. Make ANR reporting with SIGQUIT run using checkpoints rather than suspending all threads. This makes the stack/lock analysis less lock error prone. Extra Barrier assertions and condition variable time out is now returned as a boolean both from Barrier and ConditionVariable::Wait. 2 threaded host x86-64 interpret-only numbers from 341 samples: Before change: Avg 176.137ms 99% CI 3.468ms to 1060.770ms After change: Avg 139.163% 99% CI 3.027ms to 838.257ms Reduction in average compile time after change is 20.9%. Slow-down without change is 26.5%. Bug: 17471626 - Fix bug where RegTypeCache::JavaLangObject/String/Class/Throwable could return unresolved type when class loading is disabled. Bug: 17398101 Change-Id: Id59ce3cc520701c6ecf612f7152498107bc40684
* Reduced memory usage of primitive fields smaller than 4-bytesFred Shih2014-08-252-0/+322
| | | | | | | | | | Reduced memory used by byte and boolean fields from 4 bytes down to a single byte and shorts and chars down to two bytes. Fields are now arranged as Reference followed by decreasing component sizes, with fields shuffled forward as needed. Bug: 8135266 Change-Id: I65eaf31ed27e5bd5ba0c7d4606454b720b074752
* Support running without a boot image.Alex Light2014-08-251-1/+2
| | | | | | Bug: 17000769 Change-Id: I6404d5050c8a2f4ee6e70d58532eb25ee9de248e
* Merge "Fix bugs in the x86 and arm versions of generic JNI."Nicolas Geoffray2014-08-121-1/+9
|\
| * Fix bugs in the x86 and arm versions of generic JNI.Nicolas Geoffray2014-08-141-1/+9
| | | | | | | | | | | | | | | | | | Also fix the run script of 116-nodex2oat to use the non-prebuild script for target. Bug: 17000769 Change-Id: I439fcd710fb8bb408f3288ff8fb34fef23890adb
* | Reduce stack usage for overflow checksDave Allison2014-08-131-0/+4
|/ | | | | | | | | | | | | | | | | This reduces the stack space reserved for overflow checks to 12K, split into an 8K gap and a 4K protected region. GC needs over 8K when running in a stack overflow situation. Also prevents signal runaway by detecting a signal inside code that resulted from a signal handler invokation. And adds a max signal count to the SignalTest to prevent it running forever. Also reduces the number of iterations for the InterfaceTest as this was taking (almost) forever with the --trace option on run-test. Bug: 15435566 Change-Id: Id4fd46f22d52d42a9eb431ca07948673e8fda694
* ART: Build fix for dex_cache reworkAndreas Gampe2014-08-061-1/+1
| | | | | | A formerly public method is now private. Change-Id: I9834cfcf651ab2f3553633cad45ea4ed05f3e4c7
* Merge "ART: Add guards to the dex cache and its shortcuts"Andreas Gampe2014-08-061-3/+3
|\
| * ART: Add guards to the dex cache and its shortcutsAndreas Gampe2014-08-061-3/+3
| | | | | | | | | | | | | | | | Do not return fields, methods or classes if the (declaring) class is erroneous. Bug: 16692788 Change-Id: If43c2414ad0eb22db5eba7cf66396c7f16c26597
* | Merge "Implement TLAB fast paths in artAllocObjectFromCode."Hiroshi Yamauchi2014-08-051-0/+61
|\ \ | |/ |/|
| * Implement TLAB fast paths in artAllocObjectFromCode.Hiroshi Yamauchi2014-08-061-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GSS/TLAB GC speedup on N4 (ms): MemAllocTest 2963 -> 2792 BinaryTrees 2205 -> 2113 Also, measured wth -XX:IgnoreMaxFootprint to invoke GC less often (only when the bump pointer space is filled rather than based on the target utilization): MemAllocTest 2707 -> 2590 BinaryTrees 2023 -> 1906 TODO: implement fast paths for array allocations. Bug: 9986565 Change-Id: I73ff6327b229704f8ae5924ae9b747443c229841
* | Fix proxy tracing and enable tests that now work with tracing.Jeff Hao2014-08-061-2/+1
|/ | | | | | | Also updates proxy_test to generate an image for GetQuickOatCodeFor. Bug: 16386215 Change-Id: Ie7daad3d73ea7b60187bc1e7037ade0df8277107
* Merge "Revert "Fix proxy tracing and enable tests that now work with tracing.""Nicolas Geoffray2014-07-231-1/+2
|\
| * Revert "Fix proxy tracing and enable tests that now work with tracing."Nicolas Geoffray2014-07-291-1/+2
| | | | | | | | | | | | This reverts commit 0398e171f206cd3b140a358ac31b0a3760380df1. Change-Id: I1346ab01485cc7207be0ecb4d8788c500c0df903
* | AArch64: Clean up CalleeSaveMethod frame and the use of temp registers.Zheng Xu2014-07-291-9/+15
|/ | | | | | | | | | | | | | | | | | | | | | | | | | CalleeSaveMethod frame size changes : SaveAll : 368 -> 176 RefOnly : 176 -> 96 RefsAndArgs : 304 -> 224 JNI register spill size changes : 160 -> 88 In the transition assembly, use registers following the rules: 1. x0-x7 as temp/argument registers. 2. IP0, IP1 as scratch registers. 3. After correct type of callee-save-frame has been setup, all registers are scratch-able(probably except xSELF and xSUSPEND). 4. When restore callee-save-frame, IP0 and IP1 should be untouched. 5. From C to managed code, we assume all callee save register in AAPCS will be restored by managed code except x19(SUSPEND). In quick compiler: 1. Use IP0, IP1 as scratch register. 2. Use IP1 as hidden argument register(IP0 will be scratched by trampoline.) Change-Id: I05ed9d418b01b9e87218a7608536f57e7a286e4c
* Fix proxy tracing and enable tests that now work with tracing.Jeff Hao2014-07-281-2/+1
| | | | | Bug: 16386215 Change-Id: Iec2a372c921caceb050c6baf72d48b3d822899a4
* ART: Rework quick entrypoint code in Mir2Lir, cleanupAndreas Gampe2014-07-283-105/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To reduce the complexity of calling trampolines in generic code, introduce an enumeration for entrypoints. Introduce a header that lists the entrypoint enum and exposes a templatized method that translates an enum value to the corresponding thread offset value. Call helpers are rewritten to have an enum parameter instead of the thread offset. Also rewrite LoadHelper and GenConversionCall this way. It is now LoadHelper's duty to select the right thread offset size. Introduce InvokeTrampoline virtual method to Mir2Lir. This allows to further simplify the call helpers, as well as make OpThreadMem specific to X86 only (removed from Mir2Lir). Make GenInlinedCharAt virtual, move a copy to X86 backend, and simplify both copies. Remove LoadBaseIndexedDisp and OpRegMem from Mir2Lir, as they are now specific to X86 only. Remove StoreBaseIndexedDisp from Mir2Lir, as it was only ever used in the X86 backend. Remove OpTlsCmp from Mir2Lir, as it was only ever used in the X86 backend. Remove OpLea from Mir2Lir, as it was only ever defined in the X86 backend. Remove GenImmedCheck from Mir2Lir as it was neither used nor implemented. Change-Id: If0a6182288c5d57653e3979bf547840a4c47626e
* Merge "Fix art test failures for Mips."Jeff Hao2014-07-161-0/+4
|\
| * Fix art test failures for Mips.Douglas Leung2014-07-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | This patch fixes the following art test failures for Mips: 003-omnibus-opcodes 030-bad-finalizer 041-narrowing 059-finalizer-throw Change-Id: I4e0e9ff75f949c92059dd6b8d579450dc15f4467 Signed-off-by: Douglas Leung <douglas@mips.com>
* | Remove object_utils.h.Ian Rogers2014-07-164-4/+0
|/ | | | | | | | | Break into object_lock, field_helper and method_helper. Clean up header files following this. Also tidy some of the Handle code in response to compiler errors when resolving the changes in this CL. Change-Id: I73e63015a0f02a754d0866bfaf58208aebcaa295
* Improve performance of invokevirtual/invokeinterface with embedded imt/vtableMingyao Yang2014-07-118-8/+8
| | | | | | | | | Add an embedded version of imt/vtable into class object. Both tables start at fixed offset within class object so method/entry point can be loaded directly from class object for invokeinterface/invokevirtual. Bug: 8142917 Change-Id: I4240d58cfbe9250107c95c0708c036854c455968
* Merge "Fix missing single-step event"Sebastien Hertz2014-07-101-2/+7
|\
| * Fix missing single-step eventSebastien Hertz2014-07-101-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During debugging, we used to suspend too lately after a step. It occurred when we were stepping out of an interpreted method into a compiled "caller" method. The issue is we did not deoptimize when returning from the interpreted method but only did it when returning from the compiled method. Therefore we were not executing the rest of the compiled method's code with interpreter which prevents from debugging it. This CL fixes this issue by using instrumentation entry/exit stubs when calling interpreted method from compiled code. Therefore, we execute instrumentation exit stub when returning from interpreter and are able to deoptimize from this point. This allows to execute compiled method's code with interpreter and to debug it. We now also prevent from reporting method entry/exit twice while instrumenting interpreted methods. We report method entry/exit events only from interpreter. Bug: 14422182 Bug: 11705760 Change-Id: Ia1175d36202239273083c4e9733c7e9290244090
* | x86_64: Enable fp-reg promotionSerguei Katkov2014-07-101-2/+2
|/ | | | | | | | | Patch introduces 4 register XMM12-15 available for promotion of fp virtual registers. Change-Id: I3f89ad07fc8ae98b70f550eada09be7b693ffb67 Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com> Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>