summaryrefslogtreecommitdiffstats
path: root/runtime
Commit message (Collapse)AuthorAgeFilesLines
* Fix clang to compile and run host tests.Ian Rogers2014-02-2812-60/+108
| | | | | | | | | | | | | | Don't use the computed goto interpreter with clang 3.4 as it causes compilation to hang. Avoid inclusion of LLVM_(HOST|DEVICE)_BUILD_MK except for with portable as it sets clang incompatible cflags. Most fixes are self-evident, for the quick dex file method inliner the enums were being used with ostreams, so fix the enums and operator out python script to allow this. Note this change effects portable but this is untestable as portable was broken by ELF file and mc linker changes. Change-Id: Ia54348f6b1bd3f76d3b71c6e8c5f97626386b903
* Merge "Support in VMRuntime for allocating "unpadded" arrays."Ian Rogers2014-03-012-2/+36
|\
| * Support in VMRuntime for allocating "unpadded" arrays.Ian Rogers2014-02-282-2/+36
| | | | | | | | | | | | Bug: 13028925. Change-Id: I0a53645f0468aaf44d38aabe016cb610fcfefaf7
* | Add VerifyObject calls to JniMethodEndWithReference.Mathieu Chartier2014-02-281-0/+2
| | | | | | | | | | Bug: 12934910 Change-Id: I9d0926100c5e08dfbaea8926e8ac7cdd4e7dfe1c
* | Add custom SIGSEGV handler to help find heap corruption.Mathieu Chartier2014-02-2817-27/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new signal handler prints heap diagnostics when you get a SIGSEGV. Added a fault message member in runtime which is modifiable by Runtime::SetFaultMessage. When you get a SIGSEGV it will print out whatever is stored in this string as well as the normal information. This is useful for debugging heap corruption since it lets you see which threads were in which methods when the last GC occured. Added some smarter object dumping logic when the faulting address is in the heap. Bug: 12934910 Change-Id: Ia72be2c39f70ad711cbd746d66fad2b617d5d29f
* | Merge "Avoid tripping up debuggered with the fatal crash abort"Brian Carlstrom2014-02-281-2/+2
|\ \
| * | Avoid tripping up debuggered with the fatal crash abortBrian Carlstrom2014-02-271-2/+2
| | | | | | | | | | | | | | | Bug: 13226780 Change-Id: Ia876d1dc7774713ec49fb8e6b0625f118fffb198
* | | Fix 080-oom-throw with semispace GC.Mathieu Chartier2014-02-271-0/+1
| | | | | | | | | | | | | | | | | | | | | Fixes a moving GC related error in array allocations where we didn't consider that the array class might have moved. Change-Id: Iefe8bdc06b51ec2329a7984359f3da7fda479fec
* | | Merge "Workaround for range ops spanning vreg gap"buzbee2014-02-271-0/+5
|\ \ \
| * | | Workaround for range ops spanning vreg gapbuzbee2014-02-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Dalvik runtime model includes two stacks: an interpreted stack holding the Dalvik virtual registers, and a native stack used by the runtime system itself. The interpreted stack closely follows the Dalvik byte-code frame layout and invoke model, in which a callee's incoming argument are physically located in the out region of the caller's frame. Further, the non-argument vregs of a method are contiguous with its in argument region. The Art runtime model retains the notion of a callee's incoming arguments being physically located in the out region of a caller's frame. However, because Art uses a single-stack model, a method's incoming argument region is not contiguous with its non-argument virtual register storage. There is a gap between them that is used to store the native return PC of the caller, as well as the callee save register spill region. The Dalvik's bytecode instruction set includes several "range" format instructions (invoke-static-range, fill-array-data-range, etc.). These instructions define a contiguous range of virtual registers as arguments. Given the current Dalvik bytecode definition, there is no rule preventing an operand range from spanning the incoming argument and normal vregs. In Dalvik, this would not have been an issue. In Art, it adds complexity to correctly copy a range of arguments with a potential gap somewhere in the middle. We don't believe this is a common situation. This workaround CL ensures correct behavior by detecting the spanning case and falling back to the interpreter. If it turns out this is a more common case than expected, compiler support can be added. More likely, though, is that we will disallow spanning ranges in a future revision of the bytecode (going forward, existing range-spanning bytecode will continue to be supported). Fix for internal tracking bug 13216301 Fix for external bug https://code.google.com/p/android/issues/detail?id=66371 Change-Id: I9562aa5ab0aae8ebf333c8b72caac8a1be33ab3c
* | | | Merge "Remove some stray stringpiece.h includes"Brian Carlstrom2014-02-277-6/+4
|\ \ \ \ | |/ / / |/| / / | |/ /
| * | Remove some stray stringpiece.h includesBrian Carlstrom2014-02-277-6/+4
| |/ | | | | | | | | Bug: 13186058 Change-Id: I2cb313425864a5d4e988fcf71a99c60ad63c63fb
* | Enable large object space for command line runs.Mathieu Chartier2014-02-273-10/+18
| | | | | | | | | | | | | | | | | | | | Added a dynamic large_object_threshold_ variable which is max int when the large object space is disabled. No longer clear timing logger timings after zygote creation since it is not required and removes the boot semispace timings. Change-Id: I693865f4699cc32381199377239854c6ec42f37e
* | Merge "Add null check in artQuickResolutionTrampoline"Mathieu Chartier2014-02-271-7/+11
|\ \ | |/ |/|
| * Add null check in artQuickResolutionTrampolineMathieu Chartier2014-02-271-7/+11
| | | | | | | | | | | | | | Also fix possible compaction bug around ResolveMethod. Bug: 13221223 Change-Id: I0495eaee8d5f9ae5da0a87c4800a66cd04dc4aa7
* | Clean up MappingTable::FirstDexToPcPtr().Vladimir Marko2014-02-271-2/+2
| | | | | | | | | | | | | | | | Use DecodeSignedLeb128() to skip over dex PCs. This is just to be consistent, the number of bytes skipped is the same as with DecodeUnsignedLeb128() and the result is ignored. Change-Id: Ib5198b0367030957a6e2c650200121c2d828c0a6
* | Merge "art: Fix build errors for x86_64 target"Ian Rogers2014-02-272-4/+4
|\ \
| * | art: Fix build errors for x86_64 targetDmitry Petrochenko2014-02-272-4/+4
| |/ | | | | | | | | | | | | Fixes build issues introduced by multilib, CompilerOptions and ElfFile patches. Change-Id: Ic05d149e3c7a1e644d0cb50cc7c3599025c90bdf Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
* | Ensure usable space data is zeroed in arrays.Ian Rogers2014-02-274-11/+19
| | | | | | | | | | | | Address other outstanding review comments. Change-Id: Iaffe04de080772a0d0c5fd973bcac0e23c8c3e25
* | Merge "Incorrect result of compareTo between empty and non-empty strings"Ian Rogers2014-02-271-0/+2
|\ \ | |/ |/|
| * Incorrect result of compareTo between empty and non-empty stringsAlexei Zavjalov2014-02-271-0/+2
| | | | | | | | | | | | | | | | | | | | Current implementation of the Strings.compareTo() handles the case when empty string compares to non-empty string in the wrong way. This patch adds handler for such cases. Change-Id: I35cc2cfd5141551d6da65748c44b59e64a3f8117 Signed-off-by: Alexei Zavjalov <alexei.zavjalov@intel.com>
* | Merge "ElfFile should protect itself from bad input"Brian Carlstrom2014-02-272-133/+259
|\ \
| * | ElfFile should protect itself from bad inputBrian Carlstrom2014-02-262-133/+259
| | | | | | | | | | | | | | | Bug: 13207536 Change-Id: Ia0406a7e8fce4030570503471e003d4da581652f
* | | Make allocations report usable size.Ian Rogers2014-02-2644-547/+903
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Work-in-progress to allow arrays to fill usable size. Bug: 13028925. Use C++11's override keyword on GCC >= 2.7 to ensure that we override GC and allocator methods. Move initial mirror::Class set up into a Functor so that all allocated objects have non-zero sizes. Use this property to assert that all objects are never larger than their usable size. Other bits of GC related clean-up, missing initialization, missing use of const, hot methods in .cc files, "unimplemented" functions that fail at runtime in header files, reducing header file includes, move valgrind's space into its own files, reduce number of array allocation routines. Change-Id: Id5760041a2d7f94dcaf17ec760f6095ec75dadaa
* | Split up CommonTest into CommonRuntimeTest and CommonCompilerTestBrian Carlstrom2014-02-2633-870/+887
| | | | | | | | Change-Id: I8dcf6b29a5aecd445f1a3ddb06386cf81dbc9c70
* | Merge "(Experimental) Add Brooks pointers."Hiroshi Yamauchi2014-02-2613-1/+171
|\ \
| * | (Experimental) Add Brooks pointers.Hiroshi Yamauchi2014-02-2513-1/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | This feature is disabled by default. Verified that the Brooks pointers are installed correctly by using the CMS/SS collectors. Change-Id: Ia9be9814ab6e29169ac85edc4792ce8c81d552a9
* | | Fix moving GC bugs in EnterInterpreterFromInvoke.Mathieu Chartier2014-02-251-10/+14
| |/ |/| | | | | | | | | | | Calling EnterInterpreterFromInvoke on a static method could cause class initialization and trash the args before calling the method. Change-Id: If053d46dd6db403c8ebd1a816c20635194dd0e99
* | Remove duplicate card pre-cleaning.Mathieu Chartier2014-02-252-17/+26
| | | | | | | | | | | | | | Sticky GC was pre-cleaning cards twice since MarkingPhase calls MarkReachableObjects. Change-Id: I61572b79c855bcd02085a1f7ff96dd0089db95fb
* | Merge "Print message when throwing new exception with pending exception."Mathieu Chartier2014-02-252-1/+12
|\ \ | |/ |/|
| * Print message when throwing new exception with pending exception.Mathieu Chartier2014-02-252-1/+12
| | | | | | | | | | | | | | Useful to see what the new exception is. Bug: 12957138 Change-Id: I751b3a9b0b5d57d72f15d3ed7fa746a1991b181c
* | Merge "Fix the memory protection issue in RosAllocSpace::CreateFromMemMap()"Hiroshi Yamauchi2014-02-252-6/+6
|\ \
| * | Fix the memory protection issue in RosAllocSpace::CreateFromMemMap()lzang12014-02-252-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the implementation of RosAllocSpace::CreateFromMemMap(), the memory beyond the starting_size should be protected. But the argument of mprotect is wrongly set to be "capacity - initial_size", logically it should be "capacity - starting_size" This patch also fix the same issue in dlmalloc Change-Id: Icbd4ba790f344d4fa79d9896657f638a03d6f8aa Author: Lin Zang <lin.zang@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
* | | Move waitpid(2) includes to art::Exec implementationBrian Carlstrom2014-02-253-5/+2
| | | | | | | | | | | | | | | | | | (cherry picked from commit 446a13ff04dae7ef9c90584e7cf8e834ee841681) Change-Id: Id5fe3dd8e6c4cef953c39b00f2a53b23da5a6247
* | | Merge "Avoid going through char* for std::string API"Brian Carlstrom2014-02-252-10/+8
|\ \ \
| * | | Avoid going through char* for std::string APIBrian Carlstrom2014-02-252-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 13186058 (cherry picked from commit 14ae4a873e91ae8cb1c00013579b5b058268879d) Change-Id: Ib529cc10abc2d413e9da65c043dbc2638b734acd
* | | | Merge "Encode VmapTable entries offset by 2 to reduce size."Vladimir Marko2014-02-253-9/+15
|\ \ \ \ | |/ / / |/| | |
| * | | Encode VmapTable entries offset by 2 to reduce size.Vladimir Marko2014-02-253-9/+15
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | We're using special values 0xffff and 0xfffe for an fp register marker and for method pointer, respectively. These values were being encoded as 3 bytes each and this changes their encoding to 1 byte. Bug: 9437697 Change-Id: Ic1720e898b131a5d3f6ca87d8e1ecdf76fb4160a
* | | Remove started runtime check in RevokeAllThreadLocalAllocationStacksMathieu Chartier2014-02-254-15/+17
|/ / | | | | | | | | | | | | | | | | | | This check occasionally caused some thread local allocation stacks to incorrectly not get revoked when multiple threads were allocating without a started runtime. This showed up in image_test with compaction enabled when we were initializing classes in the compiler driver. Change-Id: I7f28d072feea333c2503e35265ba25c51a6308fe
* | Fix debugger disconnection crash.Sebastien Hertz2014-02-251-14/+18
| | | | | | | | | | | | | | | | | | Fixes a check failure where we uninstall instrumentation while we did not install it before. This happens when the JDWP thread stops with no debugger connected. Bug: 13168905 Change-Id: I83766ced79721747e5a7aaf27ce01a853ad55f03
* | Merge "Create CompilerOptions"Brian Carlstrom2014-02-2510-291/+160
|\ \
| * | Create CompilerOptionsBrian Carlstrom2014-02-2410-291/+160
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Package up most compiler related options in CompilerOptions. Details include: - Includes compiler filter, method thresholds, SEA IR mode. - Excludes those needed during Runtime::Init such as CompilerCallbacks and VerificationResults. - Pass CompilerOptions to CompilerDriver. - Remove CompilerOptions from Runtime. - Add ability to pass options for app and image dex2oat to runtime via -Xcompiler-option and -Ximage-compiler-option respectively. Other - Replace 2x CompilerCallbacks implementations with one. - Factor out execv code for use by both image and oat generation. - More OatFile error_msg reporting. - DCHECK for SuspendAll found trying to run valgrind. Change-Id: Iecb57da907be0c856d00c3cd634b5042a229e620
* | Merge "Avoid std::string allocations for finding an array class."Ian Rogers2014-02-2529-305/+403
|\ \
| * | Avoid std::string allocations for finding an array class.Ian Rogers2014-02-2429-305/+403
| |/ | | | | | | | | | | | | | | | | | | | | | | Introduce ClassLinker::FindArrayClass which performs an array class lookup given the element/component class. This has a 16 element cache of recently looked up arrays. Pass the current thread to ClassLinker Find .. Class routines to avoid calls to Thread::Current(). Avoid some uses of FindClass in the debugger where WellKnownClasses is a faster and more compacting GC friendly alternative. Change-Id: I60e231820b349543a7edb3ceb9cf1ce92db3c843
* | Merge "Card pre-cleaning."Mathieu Chartier2014-02-253-14/+47
|\ \
| * | Card pre-cleaning.Mathieu Chartier2014-02-243-14/+47
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now pre-clean cards before the pause in the concurrent mark sweep collectors. This provides substantial a pause time reduction for GC iterations which have a lot of dirty cards. The only downside is a slight GC time increase for large heaps. Benchmark FormulaEvaluationActions.EvaluateAndApplyChanges: Before: Partial average pause: 5.47ms Sticky average pause: 2.91ms Total GC time: 25.8s After: Partial average pause: 1.98ms Sticky average pause: 1.66ms Total GC time: 27.0s Benchmark score difference in the noise. Change-Id: If9f01f8c1501f122e19432438108d48e723b332e
* | Fix debugger deadlock.Sebastien Hertz2014-02-243-4/+21
|/ | | | | | | | | | | | | | Fixes a deadlock between the event thread lock and the processing request lock where the JDWP thread and the event thread wait for each other. We now move the call to StartProcessingRequest after the call to SetWaitForEventThread in JdwpState::ProcessRequest so locks are taken in the same order in both threads. Also adds some thread safety annotations and JDWP verbose logs for debug (only enabled if we pass the -verbose:jdwp option to the runtime). Bug: 13165103 Change-Id: I4e8b6526d973bfee56e69e8e14eddf56adfa1939
* Merge "Make ARM assembly labels local."Ian Rogers2014-02-221-62/+62
|\
| * Make ARM assembly labels local.Ian Rogers2014-02-211-62/+62
| | | | | | | | | | | | Avoids the symbols being part of the symbol file and confusing tools like gdb. Change-Id: I90f9ce4a058cd4b69757e32df58fc88ab8d81b68
* | Merge "Make X86 assembly labels local."Ian Rogers2014-02-223-42/+42
|\ \