summaryrefslogtreecommitdiffstats
path: root/runtime
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Improve GSS reference processing."Hiroshi Yamauchi2014-04-295-7/+35
|\
| * Improve GSS reference processing.Hiroshi Yamauchi2014-04-285-7/+35
| | | | | | | | | | | | | | | | | | Support the case where the reference object is in the free list space and the referent object is in the bump pointer space at a bump pointer space collection. Bug: 11650816 Change-Id: If98b08edc9e37351c74ee07cb3f2d30c2b4d0056
* | Merge "Remove unreachable JNI workaround code."Ian Rogers2014-04-281-75/+0
|\ \
| * | Remove unreachable JNI workaround code.Ian Rogers2014-04-281-75/+0
| |/ | | | | | | Change-Id: I8d737ced8b553ed80a1fd72560e62abd78ff8b12
* | Always log explicit GC.Mathieu Chartier2014-04-284-30/+30
|/ | | | | | | | People who use DDMS want to see that a GC actually occurs when they press GC button. Bug: 14325353 Change-Id: I44e0450c92abf7223d33552ed37f626fe63e1c28
* Fix racy DCHECKS.Mathieu Chartier2014-04-281-2/+6
| | | | | | | | | Added a size bracket lock to fix a race condition where we were inserting into full_runs_ and non_full_runs_ holding a lock but reading without holding a lock from a different thread. Bug: 14326370 Change-Id: I5c492bddc4b9927e4a36603f3d787b046961675d
* Merge "Avoid volatile 64-bit tearing on 32-bit architectures."Ian Rogers2014-04-281-4/+63
|\
| * Avoid volatile 64-bit tearing on 32-bit architectures.Ian Rogers2014-04-281-4/+63
| | | | | | | | | | | | | | | | | | Change b122a4bbed34ab22b4c1541ee25e5cf22f12a926 removed inline assembly for volatile 64bit read/writes. This isn't sound in the general case, reinstate. Motivating change: https://android-review.googlesource.com/91250 Add optimizations for ARM in the case of LPAE support. Change-Id: Ie86d8885d27c8f0da75f0c3bd50d4553a331282f
* | Merge "ART: Bitvector extensions for dumping and size handling"Vladimir Marko2014-04-282-16/+72
|\ \
| * | ART: Bitvector extensions for dumping and size handlingJean Christophe Beyler2014-04-242-16/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added dumping functions and the ensure size and clear function. - Fixed a bug in union where if a bit is not set in the source, an buffer overflow can occur later down. Change-Id: Iff40529f3a8970a1ce2dd5c591f659f71924dea3 Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com> Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com> Signed-off-by: Yixin Shou <yixin.shou@intel.com> Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com> Signed-off-by: Udayan Banerji <udayan.banerji@intel.com>
* | | Merge "Move mapping table and vmap table offsets to OatMethodHeader."Vladimir Marko2014-04-2815-143/+181
|\ \ \
| * | | Move mapping table and vmap table offsets to OatMethodHeader.Vladimir Marko2014-04-2515-143/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change has a libcore/ companion CL "Remove ArtMethod's quick fields mapping table and vmap table." https://android-review.googlesource.com/91254 Bug: 11767815 Change-Id: I46ce2067e1ecd915da3890606498e31ffc332813
* | | | Rosalloc: fix signature for 64bAndreas Gampe2014-04-251-1/+1
| | | | | | | | | | | | | | | | Change-Id: I56df1df0118a0aa1584e51fb574902f7eb88cd80
* | | | Merge "Add "arch_test" gtest for assembly stub constants, add some ARM64 ↵Andreas Gampe2014-04-2515-23/+691
|\ \ \ \ | | | | | | | | | | | | | | | assembly code"
| * | | | Add "arch_test" gtest for assembly stub constants, add some ARM64 assembly codeAndreas Gampe2014-04-2515-23/+691
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a test that (1) checks all callee-save method frame sizes for all architectures, (2) checks thread offsets for the runtime architecture and (3) checks callee-save method offsets for the runtime architecture. The "asm_support_XXX.h" files now only contain definitions that are common between all architectures. Architecture-specific definitions (i.e., special registers names) have been pushed into the corresponding .S file. This change was required to be able to undefine definitions in the test, so that multiple tests can be written in one file. Test (1) above is in a sense two-stage. The arch_test gtest compares constants (if it finds them) against the frame size as reported by the ArtMethods created by the Runtime. This works for all architectures as we can provide the instruction-set to CreateCalleeSaveMethod. The second stage of the "test" are preprocessor tests with "#error" in the case that the constants are not the expected value. Optimally I'd like to change that to an actual runtime test exercising the assembly code, which would also allow to check whether the right registers are stored. Also added missing assembly code for ARM64 for the callee-save macros. Also fix X86_64 compilation for Clang 3.5. Change-Id: I018e6433dffd3d31ba3bfcd75661653f4c7b6552
* | | | | Merge "Do not require dexopt when previous profile does not exist"Brian Carlstrom2014-04-251-14/+13
|\ \ \ \ \
| * | | | | Do not require dexopt when previous profile does not existBrian Carlstrom2014-04-251-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also turn down some dex2oat related noise Bug: 14184659 Change-Id: I134890f2c452d7f85ca4b736b5724f42533c2a7f
* | | | | | Merge "Enable reading page map without lock in RosAlloc::BulkFree"Mathieu Chartier2014-04-2511-382/+451
|\ \ \ \ \ \ | |_|/ / / / |/| | | | |
| * | | | | Enable reading page map without lock in RosAlloc::BulkFreeMathieu Chartier2014-04-2511-382/+451
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enabling this flag greatly reduces how much time was spent in the GC. It was not done previously since it was regressing MemAllocTest. With these RosAlloc changes, the benchmark score no longer regresses after we enable the flag. Changed Run::AllocSlot to only have one mode of allocation. The new mode is finding the first free bit in the bitmap. This was previously the slow path but is now the fast path. Some optimizations which enabled this include always having the alloc bitmap bits which correspond to invalid slots be set to 1. This prevents us from needing a bound check since we will never end up allocating there. Changed revoking thread local buffer to point to an invalid run. The invalid run is just a run which always has all the allocation bits set to 1. When a thread attempts to do a thread local allocation from here it will always fail and go slow path. This eliminates the need for a null check for revoked runs. Changed zeroing of memory to happen during free, AllocPages should always return zeroed memory. Added prefetching which happens when we allocate a run. Some refactoring to reduce duplicated code. Ergonomics changes: Changed kStickyGcThroughputAdjustment to 1.0, this helps reduce GC time. Measurements (3 samples per benchmark): Before: MemAllocTest scores: 3463, 3445, 3431 EvaluateAndApplyChanges score | total GC time Iter 1: 3485, 23.602436s Iter 2: 3434, 22.499882s Iter 3: 3483, 23.253274s After: MemAllocTest scores: 3495, 3417, 3409 EvaluateAndApplyChanges score | total GC time: Iter 1: 3375, 17.463462s Iter 2: 3358, 16.185188s Iter 3: 3367, 15.822312s Bug: 8788501 Bug: 11790317 Bug: 9986565 Change-Id: Ifd273a054824028dabed27c07c081dde1816f93c
* | | | | | Merge "Fix ART compilation for Clang 3.5."Stephen Hines2014-04-252-6/+6
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Fix ART compilation for Clang 3.5.Stephen Hines2014-04-242-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds required <> to some template instantiations, which Clang was complaining about (and ignoring otherwise). It also updates the integrated assembler defines, since Clang 3.5 now supports named arguments. Change-Id: I878b8c96bcbc29415582c18a2df678b7f9a9d4ad
* | | | | | Merge "Revert "Revert "ART: Extracts an utility function of the duplicated ↵Andreas Gampe2014-04-251-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | code"""
| * | | | | | Revert "Revert "ART: Extracts an utility function of the duplicated code""Andreas Gampe2014-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b5a14d2a6c18c1ea3c019c53b10af2e8f5dea234. Change-Id: Id09a4cc27ac22db940badf3a277848b38b173eae
* | | | | | | Merge "Add a GTest for Assembly Stubs, Add some ARM64 and X86-64 Stubs"Andreas Gampe2014-04-254-4/+447
|\ \ \ \ \ \ \
| * | | | | | | Add a GTest for Assembly Stubs, Add some ARM64 and X86-64 StubsAndreas Gampe2014-04-254-4/+447
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This GTest adds some runtime testing for the stubs that does not rely on the compiler. This should allow to add or update the stubs and do testing, especially on architectures without working compiler. This test is a bit dangerous: if it doesn't know how to handle an architecture, it will only log a warning. This is so that testing does not break at the moment. The warning is forced to stdout, too, so that it is always visible. Add art_quick_check_cast to ARM64 and X86-64. Add art_quick_memcpy to X86-64. The latter should be removed in a good compiler, as it is practically only overhead. Add minor CFI information in ARM. Change-Id: Ia9c6d0f4035eb1527c12b5f6067dece59e25528d
* | | | | | | Merge "Refactor exception handling for deoptimization"Sebastien Hertz2014-04-2511-135/+248
|\ \ \ \ \ \ \
| * | | | | | | Refactor exception handling for deoptimizationSebastien Hertz2014-04-2511-135/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL refactors the exception handling (on the quick side) by isolating the search of catch handler and the preparation of deoptimization. We rename the CatchFinder class to QuickExceptionHandler so it's less specific to catch handler search. Finding catch handler happens in QuickExceptionHandler::FindCatch. Since the CatchBlockStackVisitor resolves exception types, it may cause thread suspension and breaks the assertion current thread can't be suspended. Therefore, we place the exception in a SirtRef (while it is detached from the current thread) and remove the thread suspension assertion. Deoptimization now happens in QuickExceptionHandler::DeoptimizeStack. It uses the new DeoptimizeStackVisitor class to create shadow frames. We also add the Thread::GetDeoptimizationException method to get the definition of the fake exception in only one place. Change-Id: I01b19fa72af64329b5c3b6c7f0c3339d2d724978
* | | | | | | | Merge "Resolve method's argument reference types"Sebastien Hertz2014-04-251-2/+5
|\ \ \ \ \ \ \ \
| * | | | | | | | Resolve method's argument reference typesSebastien Hertz2014-04-251-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using ResolveClassAndCheckAccess allows to resolve reference types and check we have access to these types too. This also prevents from getting unresolved reference types, which has been observed during deoptimization. Bug: 13464407 Change-Id: I4c02fdff191c195f34502a4d4a20357419982eb1
* | | | | | | | | Merge "Support field watchpoint in interpreter"Sebastien Hertz2014-04-256-31/+116
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / |/| | | | | | | |
| * | | | | | | | Support field watchpoint in interpreterSebastien Hertz2014-04-256-31/+116
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We report field read/write events to instrumentation from the interpreter. This allows it to send JDWP field access and field modification events to debugger. This completes CL https://android-review.googlesource.com/90390. We also fix the JDWP FieldOnly modifier by introducing ModBasket.fieldTypeID. We incorrectly used ModBasket.classId which is actually dedicated to ClassOnly modifier based on thread's location's class id. Finally, we now enable canWatchFieldModification and canWatchFieldAccess JDWP capabilities so a debugger can request these events to be reported. Bug: 8267708 Change-Id: I987852ad47abb27b2f7e78544a8189c7a4e2f462
* | | | | | | | Use __FUNCTION__ in CHECK_NON_NULL_*ARGUMENT.Mathieu Chartier2014-04-241-228/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevents naming errors and reduces code maintenance requirements. Change-Id: I14aba05f0d5dab8009f472b3af0b698551ac2a7e
* | | | | | | | Merge "Make unresolved exception types cause soft verification errors."Jeff Hao2014-04-241-5/+3
|\ \ \ \ \ \ \ \
| * | | | | | | | Make unresolved exception types cause soft verification errors.Jeff Hao2014-04-241-5/+3
| | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, the verifier would allow the first exception it finds for a catch block to be unresolved, but this causes problems if it merges other exceptions later. The verifier should soft fail for any unresolved exception type it finds. Bug: 14256107 Change-Id: I22563ebfe8c9680cc676b73516d5b48bc9c4ecf3
* | | | | | | | Clean up ScopedThreadStateChange + Get/SetPrimtiveArrayRegionMathieu Chartier2014-04-242-12/+7
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplified code in ScopedThreadStateChange and fixed an incorrect name in Get/SetPrimitiveArrayRegion. Change-Id: Id71affec1d64911449d792911cd52104dd179840
* | | | | | | Merge "More code for the read barrier support."Hiroshi Yamauchi2014-04-248-54/+97
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | |
| * | | | | | More code for the read barrier support.Hiroshi Yamauchi2014-04-228-54/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to disable the RB in Object::SizeOf() (and the functions it calls transitively) which the collector will need to call to get the size of an object when copying. Add Object::AtomicSetReadBarrierPointer() for atomic write of a RB pointer. Bug: 12687968 Change-Id: Ibedd252860ac7ccd17e4e7d71b377a8892b48ff0
* | | | | | | Revert "ART: Extracts an utility function of the duplicated code"Andreas Gampe2014-04-241-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 973cc95da6fb617bab133bd7a693c1cb7eafd393. Change-Id: I3883c74ba06116e89d89d9cf085f20cff5d15f77
* | | | | | | ART: Extracts an utility function of the duplicated codeDmitry Petrochenko2014-04-241-0/+6
| |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces an utility function 'DataOffsetOfType' in 'mirror::Array' class that calculates the data offset at given index in an array of given type. Change-Id: Idb19558653c70a129245f220f0fbb553f898865b Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
* | | | | | Merge "Don't allow heap transitions if the runtime is shutting down."Mathieu Chartier2014-04-241-0/+5
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | |
| * | | | | Don't allow heap transitions if the runtime is shutting down.Mathieu Chartier2014-04-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 14254222 Change-Id: I97ac988a96b56a8dc1eec018bf3ef7a691f04745
* | | | | | art: fix dlopen error messageColin Cross2014-04-231-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | detail is a std::string *, dereference it when logging the error message. Change-Id: If73a5806445df17d91ff1a7f4f3a6d31f0e9f54e
* | | | | Merge "Separate maps from code in oat file."Vladimir Marko2014-04-234-4/+30
|\ \ \ \ \ | |_|_|/ / |/| | | / | | |_|/ | |/| |
| * | | Separate maps from code in oat file.Vladimir Marko2014-04-224-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Write all GC maps first, then all mapping tables and then all vmap tables and only then align the offset to page size and write all method code chunks with headers. Bug: 11767815 Change-Id: Ic83555c8303c5be119afc43e95e58c0a32ff2a4f
* | | | Merge "Fix FindCatchBlock to work in -Xverify:none mode."Jeff Hao2014-04-235-10/+23
|\ \ \ \
| * | | | Fix FindCatchBlock to work in -Xverify:none mode.Jeff Hao2014-04-225-10/+23
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | FindCatchBlock now uses ResolveType to get the exception type, since it might not be able to find it in the dex cache. Bug: 13948502 Change-Id: Ia6f1c7dc743206ae1c8551bf6239f48ee4d3a784
* | | | Merge "Remove support for app JNI workarounds."Ian Rogers2014-04-2211-179/+15
|\ \ \ \
| * | | | Remove support for app JNI workarounds.Ian Rogers2014-04-2211-179/+15
| | |_|/ | |/| | | | | | | | | | Change-Id: I4396df7e93fcace4b5b19c2c387e5c30089182a6
* | | | Merge "Warn when thread state lookup fails."Ian Rogers2014-04-221-0/+1
|\ \ \ \
| * | | | Warn when thread state lookup fails.Ian Rogers2014-04-221-0/+1
| | |/ / | |/| | | | | | | | | | Change-Id: I06781caddcade26148921bc225f28db8b3a63a35