OSDN Git Service

android-x86/art.git
9 years agoMerge "ART: Relax java_vm_ext test"
Andreas Gampe [Fri, 9 Jan 2015 01:01:10 +0000 (01:01 +0000)]
Merge "ART: Relax java_vm_ext test"

9 years agoART: Relax java_vm_ext test
Andreas Gampe [Fri, 9 Jan 2015 00:43:13 +0000 (16:43 -0800)]
ART: Relax java_vm_ext test

Bionic gives more than the requested stack size in some cases, see
change-id I7037ac8273ebe54dd19b1561c7a376819049124c. In that case,
attaching a thread with STACK_MIN may actually succeed.

Bug: 18908062
Change-Id: Ibb3f5c7a7399c01ec2032a133896cf91327370ed

9 years agoMerge "Add clamp growth limit"
Mathieu Chartier [Fri, 9 Jan 2015 00:12:28 +0000 (00:12 +0000)]
Merge "Add clamp growth limit"

9 years agoAdd clamp growth limit
Mathieu Chartier [Thu, 8 Jan 2015 19:28:13 +0000 (11:28 -0800)]
Add clamp growth limit

Clamp growth limit shrinks the space memmaps to the current growth
limit. This reduces virtual memory usage for apps with small heaps.

Bug: 18387825
Bug: 17131630

Change-Id: I4a8fdc335d2c40492e991708adabcc46299efb7d

9 years agoMerge "ART: Refactored regex code in Checker"
David Brazdil [Thu, 8 Jan 2015 22:20:26 +0000 (22:20 +0000)]
Merge "ART: Refactored regex code in Checker"

9 years agoART: Refactored regex code in Checker
David Brazdil [Wed, 31 Dec 2014 11:49:30 +0000 (11:49 +0000)]
ART: Refactored regex code in Checker

This patch refactors how Checker constructs regular expressions which
it uses to parse tests and verify compiler output. It also replaces
all occurrences of the '[0-9]+' ID-matching expression with the '\d+'
shorthand.

Change-Id: I5f854a25707e44ed2fa1673ff084990e8f43e4a2

9 years agoMerge "ART: Fixed formatting in HGraphVisualizerPrinter"
David Brazdil [Thu, 8 Jan 2015 21:50:01 +0000 (21:50 +0000)]
Merge "ART: Fixed formatting in HGraphVisualizerPrinter"

9 years agoMerge "ART: Fix Mac build"
Andreas Gampe [Thu, 8 Jan 2015 19:37:26 +0000 (19:37 +0000)]
Merge "ART: Fix Mac build"

9 years agoART: Fix Mac build
Andreas Gampe [Thu, 8 Jan 2015 19:32:22 +0000 (11:32 -0800)]
ART: Fix Mac build

Fix Mac build after change-id Id2710d2fd44b7c3b3335973a9288979a5793638b.

Bug: 18933933
Change-Id: Ib0bb5082908d5dff33ef8f8a69d82c07406c176d

9 years agoART: Fixed formatting in HGraphVisualizerPrinter
David Brazdil [Thu, 8 Jan 2015 19:28:33 +0000 (19:28 +0000)]
ART: Fixed formatting in HGraphVisualizerPrinter

Change-Id: I06d9bb0fc03e13cfc49f2b4da07a0ee2d09a339a

9 years agoMerge "Add VerifyObject to StackHandleScope::SetReference"
Mathieu Chartier [Thu, 8 Jan 2015 18:54:45 +0000 (18:54 +0000)]
Merge "Add VerifyObject to StackHandleScope::SetReference"

9 years agoMerge "Implement double and float support for arm in register allocator."
Nicolas Geoffray [Thu, 8 Jan 2015 18:52:33 +0000 (18:52 +0000)]
Merge "Implement double and float support for arm in register allocator."

9 years agoAdd VerifyObject to StackHandleScope::SetReference
Mathieu Chartier [Thu, 8 Jan 2015 17:41:25 +0000 (09:41 -0800)]
Add VerifyObject to StackHandleScope::SetReference

Helps catch GC bugs. Also moved some of the HandleScope logic to the
inl file.

Bug: 13054004
Change-Id: I81b9dd717092b6a467fcd28b4df0089ec075dd44

9 years agoMerge "ART: Improved fail reporting in Checker"
David Brazdil [Thu, 8 Jan 2015 18:44:19 +0000 (18:44 +0000)]
Merge "ART: Improved fail reporting in Checker"

9 years agoART: Improved fail reporting in Checker
David Brazdil [Wed, 31 Dec 2014 17:28:38 +0000 (17:28 +0000)]
ART: Improved fail reporting in Checker

Checker now keeps track of line numbers and prints more informative
log messages.

Change-Id: I59ba3fb81d91e265a7358b6abb116dcb9ce97cbb

9 years agoMerge "Do not use clang for mips target."
Chih-Hung Hsieh [Thu, 8 Jan 2015 18:26:12 +0000 (18:26 +0000)]
Merge "Do not use clang for mips target."

9 years agoMerge "ART: Pass ucontext to Backtrace in Stack Dump"
Andreas Gampe [Thu, 8 Jan 2015 17:38:02 +0000 (17:38 +0000)]
Merge "ART: Pass ucontext to Backtrace in Stack Dump"

9 years agoART: Pass ucontext to Backtrace in Stack Dump
Andreas Gampe [Thu, 8 Jan 2015 06:08:35 +0000 (22:08 -0800)]
ART: Pass ucontext to Backtrace in Stack Dump

In case of an unexpected signal on the host we dump the thread stack
ourselves. We have to pass the context given to the signal handler,
as the signal handler is run on an alternate stack. Otherwise
libbacktrace can't dump the actual faulty part.

Bug: 18933933
Change-Id: Id2710d2fd44b7c3b3335973a9288979a5793638b

9 years agoMerge "JDWP: do not report start/end events for thread without peer"
Sebastien Hertz [Thu, 8 Jan 2015 16:26:04 +0000 (16:26 +0000)]
Merge "JDWP: do not report start/end events for thread without peer"

9 years agoImplement double and float support for arm in register allocator.
Nicolas Geoffray [Wed, 7 Jan 2015 16:01:24 +0000 (16:01 +0000)]
Implement double and float support for arm in register allocator.

The basic approach is:
- An instruction that needs two registers gets two intervals.
- When allocating the low part, we also allocate the high part.
- When splitting a low (or high) interval, we also split the high
  (or low) equivalent.
- Allocation follows the (S/D register) requirement that low
  registers are always even and the high equivalent is low + 1.

Change-Id: I06a5148e05a2ffc7e7555d08e871ed007b4c2797

9 years agoDo not use clang for mips target.
Chih-Hung Hsieh [Fri, 19 Dec 2014 03:25:50 +0000 (19:25 -0800)]
Do not use clang for mips target.

Clang assembler cannot compile some inlined assembly code
in valgrind_malloc_space-inl.h:192:5: error: used $at without ".set noat"
However, clang generated assembly code for runtime/mirror/array.cc
cannot be compiled by gas.

BUG: 18789639
BUG: 18807290
Change-Id: Ifdeb3c50f11cefc7f0d62c1d36fdd1f8b9344fb4

9 years agoMerge "Fix valgrind imgdiag test failure / memory leak in runtime"
Igor Murashkin [Thu, 8 Jan 2015 02:44:30 +0000 (02:44 +0000)]
Merge "Fix valgrind imgdiag test failure / memory leak in runtime"

9 years agoMerge "ART: Print INTERNAL_FATAL Log messages immediately"
Andreas Gampe [Thu, 8 Jan 2015 02:27:49 +0000 (02:27 +0000)]
Merge "ART: Print INTERNAL_FATAL Log messages immediately"

9 years agoART: Print INTERNAL_FATAL Log messages immediately
Andreas Gampe [Thu, 8 Jan 2015 02:01:29 +0000 (18:01 -0800)]
ART: Print INTERNAL_FATAL Log messages immediately

To diagnose some problems, print out messages sent to Severity level
INTERNAL_FATAL immediately. This avoids the buffering we do.

Bug: 18933933
Change-Id: I3e536ae2e78560eb561d0b873fb4e88b9495ebbf

9 years agoMerge "Re-enable ParallelGC test for gcstress mode"
Mathieu Chartier [Thu, 8 Jan 2015 02:00:29 +0000 (02:00 +0000)]
Merge "Re-enable ParallelGC test for gcstress mode"

9 years agoRe-enable ParallelGC test for gcstress mode
Mathieu Chartier [Thu, 8 Jan 2015 01:42:07 +0000 (17:42 -0800)]
Re-enable ParallelGC test for gcstress mode

Ran the test hundreds of times with gcstress without any failures.

Bug: 16406852
Change-Id: Idd2d248bd43bfb20ad7313e12ce3dce85bea3de5

9 years agoMerge "Fix signal test to work with gcstress"
Mathieu Chartier [Thu, 8 Jan 2015 01:35:43 +0000 (01:35 +0000)]
Merge "Fix signal test to work with gcstress"

9 years agoFix signal test to work with gcstress
Mathieu Chartier [Thu, 8 Jan 2015 00:00:03 +0000 (16:00 -0800)]
Fix signal test to work with gcstress

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

9 years agoMerge "ART: Fix Clang CFLAGS inclusion"
Andreas Gampe [Thu, 8 Jan 2015 00:39:59 +0000 (00:39 +0000)]
Merge "ART: Fix Clang CFLAGS inclusion"

9 years agoFix valgrind imgdiag test failure / memory leak in runtime
Igor Murashkin [Thu, 8 Jan 2015 00:37:24 +0000 (16:37 -0800)]
Fix valgrind imgdiag test failure / memory leak in runtime

Bug: 18907700
Change-Id: I399a6a64a743d3fac86b8bb5bf0eef1f23b95dc4

9 years agoART: Fix Clang CFLAGS inclusion
Andreas Gampe [Wed, 7 Jan 2015 22:35:44 +0000 (14:35 -0800)]
ART: Fix Clang CFLAGS inclusion

Only include the CFLAGS if Clang is not explicitly disabled for the
architecture.

Change-Id: Ic63d7c8018f633a9b20a4ff9285d6380426017a5

9 years agoMerge "ART: Add copyright to Optimizing's Inliner test"
David Brazdil [Wed, 7 Jan 2015 19:37:32 +0000 (19:37 +0000)]
Merge "ART: Add copyright to Optimizing's Inliner test"

9 years agoART: Add copyright to Optimizing's Inliner test
David Brazdil [Wed, 7 Jan 2015 19:22:04 +0000 (19:22 +0000)]
ART: Add copyright to Optimizing's Inliner test

Change-Id: I10c29d607baa5b8b23b5d998a3c72dafcb7f47b8

9 years agoMerge "Fix sigchainlib's implementation of sigaction"
Dmitriy Ivanov [Tue, 6 Jan 2015 23:44:13 +0000 (23:44 +0000)]
Merge "Fix sigchainlib's implementation of sigaction"

9 years agoFix sigchainlib's implementation of sigaction
Dmitriy Ivanov [Tue, 6 Jan 2015 22:55:26 +0000 (14:55 -0800)]
Fix sigchainlib's implementation of sigaction

  Correctly handles the case when old_action == new_action

Bug: 18740478
Change-Id: I97092318439e4f6f0a2513d4336496c72f8c5599
(cherry picked from commit 797a29b334f2d311135602bf5204ae8b890f4a14)

9 years agoMerge "Fix frequent gcstress ThreadStress crash"
Mathieu Chartier [Tue, 6 Jan 2015 22:31:47 +0000 (22:31 +0000)]
Merge "Fix frequent gcstress ThreadStress crash"

9 years agoFix frequent gcstress ThreadStress crash
Mathieu Chartier [Tue, 6 Jan 2015 22:17:57 +0000 (14:17 -0800)]
Fix frequent gcstress ThreadStress crash

Calling IdentityHashCode before PrettyTypeOf was causing occasional
stale root errors since IdentityHashCode can cause thread suspension.

Cleaned up VisitLocks.

Bug: 18766916
Change-Id: I7679539877e48a8c9aadb8a34718404ebce98d25

9 years agoMerge "ART: Fix leak in codegen_test"
Andreas Gampe [Tue, 6 Jan 2015 22:20:39 +0000 (22:20 +0000)]
Merge "ART: Fix leak in codegen_test"

9 years agoMerge "Don't allow suspension from FindLocksAtDexPc"
Mathieu Chartier [Tue, 6 Jan 2015 22:16:05 +0000 (22:16 +0000)]
Merge "Don't allow suspension from FindLocksAtDexPc"

9 years agoART: Fix leak in codegen_test
Andreas Gampe [Tue, 6 Jan 2015 22:13:52 +0000 (14:13 -0800)]
ART: Fix leak in codegen_test

Make sure the InstructionSetFeatures isn't leaked.

Change-Id: Ide25773500c1513ecb204a380bb0a95513ff7276

9 years agoDon't allow suspension from FindLocksAtDexPc
Mathieu Chartier [Sat, 20 Dec 2014 02:41:47 +0000 (18:41 -0800)]
Don't allow suspension from FindLocksAtDexPc

Transitioning to suspended from runnable sometimes runs dump
checkpoints in ThreadStress which can cause deadlocks. This happens
since FindLocksAtDexPC runs the verifier which calls
AllowThreadSuspension. This results in a blocked thread which holds
the monitor lock, and if another thread tries to do a monitor enter,
it deadlocks while holding the mutator lock (assuming the GC is
suspending all).

The fix for avoiding this deadlock is not calling
AllowThreadSuspension from FindLocksAtDexPc.

Bug: 18576985
Change-Id: I7e5faaf3bbbd5b5f680de95d53c33b5106705b0c

9 years agoMerge "Mute common case DexFile.isDexOptNeeded log spam"
Brian Carlstrom [Tue, 6 Jan 2015 20:33:52 +0000 (20:33 +0000)]
Merge "Mute common case DexFile.isDexOptNeeded log spam"

9 years agoMute common case DexFile.isDexOptNeeded log spam
Brian Carlstrom [Tue, 6 Jan 2015 20:05:34 +0000 (12:05 -0800)]
Mute common case DexFile.isDexOptNeeded log spam

Bug: 18914409
Change-Id: I885f1aa87c48ff25353d44b720c7cff24ed01e45

9 years agoMerge "ART: Remove LowestSetBit and IsPowerOfTwo"
Andreas Gampe [Tue, 6 Jan 2015 16:54:43 +0000 (16:54 +0000)]
Merge "ART: Remove LowestSetBit and IsPowerOfTwo"

9 years agoMerge "ART: Remove unused parts of x86 assemblers"
Andreas Gampe [Tue, 6 Jan 2015 16:54:15 +0000 (16:54 +0000)]
Merge "ART: Remove unused parts of x86 assemblers"

9 years agoMerge "ART: Fix divide-by-zero for ARM"
Andreas Gampe [Tue, 6 Jan 2015 16:53:10 +0000 (16:53 +0000)]
Merge "ART: Fix divide-by-zero for ARM"

9 years agoART: Fix divide-by-zero for ARM
Andreas Gampe [Tue, 6 Jan 2015 03:30:59 +0000 (19:30 -0800)]
ART: Fix divide-by-zero for ARM

There was an infinite loop in the code generation for a divide
by literal zero.

Bug: 18887754
Change-Id: Ibd481918d3c6d7bc62fdd1a6807042009f561d95

9 years agoART: Remove LowestSetBit and IsPowerOfTwo
Andreas Gampe [Tue, 6 Jan 2015 16:28:12 +0000 (08:28 -0800)]
ART: Remove LowestSetBit and IsPowerOfTwo

Remove those functions from Mir2Lir and replace with functionality
from utils.h.

Change-Id: Ieb67092b22d5d460b5241c7c7931c15b9faf2815

9 years agoART: Remove unused parts of x86 assemblers
Andreas Gampe [Tue, 6 Jan 2015 15:47:10 +0000 (07:47 -0800)]
ART: Remove unused parts of x86 assemblers

These functions are neither used nor functional.

Change-Id: Ib6d0761388a45662ad9448ceb2c539c6f0b77f23

9 years agoMerge "Improve Thumb disassembler for LDR/STR/PUSH/POP/BKPT."
Vladimir Marko [Tue, 6 Jan 2015 12:27:54 +0000 (12:27 +0000)]
Merge "Improve Thumb disassembler for LDR/STR/PUSH/POP/BKPT."

9 years agoMerge "Look at instruction set features when generating volatiles code"
Calin Juravle [Tue, 6 Jan 2015 12:10:48 +0000 (12:10 +0000)]
Merge "Look at instruction set features when generating volatiles code"

9 years agoImprove Thumb disassembler for LDR/STR/PUSH/POP/BKPT.
Vladimir Marko [Mon, 5 Jan 2015 15:17:01 +0000 (15:17 +0000)]
Improve Thumb disassembler for LDR/STR/PUSH/POP/BKPT.

Disassemble 16-bit Thumb PUSH, POP, BKPT.

Clean up 32-bit load/store to handle all cases (including
previously unrecognized indexed load/store) in one place;
this also fixes LDRSH erroneously disassembled as LDRSB.

Recognize more UNDEFINED instructions and other minor
cleanup.

Change-Id: Ifdd177745b70e3f774cc0469deb81191b035f51b

9 years agoMerge "ART: Add imgdiag_test test dependency"
Andreas Gampe [Tue, 6 Jan 2015 00:30:53 +0000 (00:30 +0000)]
Merge "ART: Add imgdiag_test test dependency"

9 years agoMerge "ART: Reorder entrypoint argument order"
Andreas Gampe [Mon, 5 Jan 2015 19:26:08 +0000 (19:26 +0000)]
Merge "ART: Reorder entrypoint argument order"

9 years agoMerge "Opt Compiler: ARM64: Add support for rem-float, rem-double and volatile."
Calin Juravle [Mon, 5 Jan 2015 18:30:49 +0000 (18:30 +0000)]
Merge "Opt Compiler: ARM64: Add support for rem-float, rem-double and volatile."

9 years agoOpt Compiler: ARM64: Add support for rem-float, rem-double and volatile.
Serban Constantinescu [Mon, 5 Jan 2015 16:08:49 +0000 (16:08 +0000)]
Opt Compiler: ARM64: Add support for rem-float, rem-double and volatile.

Add support for rem-float, rem-double and volatile memory accesses
using acquire-release and memory barriers.

Change-Id: I96a24dff66002c3b772c3d8e6ed792e3cb59048a
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
9 years agoLook at instruction set features when generating volatiles code
Calin Juravle [Fri, 19 Dec 2014 17:22:29 +0000 (17:22 +0000)]
Look at instruction set features when generating volatiles code

Change-Id: Ia882405719fdd60b63e4102af7e085f7cbe0bb2a

9 years agoMerge "Fix braino in x64 assembler."
Nicolas Geoffray [Mon, 5 Jan 2015 09:16:00 +0000 (09:16 +0000)]
Merge "Fix braino in x64 assembler."

9 years agoMerge "ART: Cut filename for DumpCFG"
Andreas Gampe [Fri, 2 Jan 2015 20:07:10 +0000 (20:07 +0000)]
Merge "ART: Cut filename for DumpCFG"

9 years agoMerge "ART: Ensure FP GET/PUT doesn't use Core register"
Bill Buzbee [Fri, 2 Jan 2015 19:21:24 +0000 (19:21 +0000)]
Merge "ART: Ensure FP GET/PUT doesn't use Core register"

9 years agoMerge "Implement LogLineLowStack() properly."
Vladimir Marko [Fri, 2 Jan 2015 16:22:06 +0000 (16:22 +0000)]
Merge "Implement LogLineLowStack() properly."

9 years agoImplement LogLineLowStack() properly.
Vladimir Marko [Fri, 2 Jan 2015 14:23:26 +0000 (14:23 +0000)]
Implement LogLineLowStack() properly.

Avoid stack-based buffers used by the log formatting in
__android_log_print().

Move the VLOG(threads) in Thread::InitStackHwm() after the
low stack check as it's not safe to actually log before
that; even the StringPrintf() is using a stack-based buffer.

Bug: 18830897
Change-Id: I13b2166438e871c52ab91dabfe98f2200fd7c1cf

9 years agoMerge "ART: New types of Checker assertions"
David Brazdil [Wed, 31 Dec 2014 16:16:29 +0000 (16:16 +0000)]
Merge "ART: New types of Checker assertions"

9 years agoART: New types of Checker assertions
David Brazdil [Fri, 19 Dec 2014 11:17:21 +0000 (11:17 +0000)]
ART: New types of Checker assertions

Checker now supports positive out-of-order assertions (CHECK-DAG),
which are useful for matching dependency graphs, and negative
assertions (CHECK-NOT) to test element removal.

ConstantFolding tests are rewritten using -DAG checks and Inliner
tests are added.

Change-Id: I5afb665f532b24683624b6d21ef4377cb441d731

9 years agoMerge "ART: Refactored VisualizerPrinter visitor pattern"
David Brazdil [Tue, 30 Dec 2014 10:36:02 +0000 (10:36 +0000)]
Merge "ART: Refactored VisualizerPrinter visitor pattern"

9 years agoART: Reorder entrypoint argument order
Andreas Gampe [Thu, 18 Dec 2014 02:43:01 +0000 (18:43 -0800)]
ART: Reorder entrypoint argument order

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

9 years agoMerge "Update oat version to 053."
Andreas Gampe [Mon, 29 Dec 2014 16:04:04 +0000 (16:04 +0000)]
Merge "Update oat version to 053."

9 years agoART: Refactored VisualizerPrinter visitor pattern
David Brazdil [Mon, 29 Dec 2014 15:35:02 +0000 (15:35 +0000)]
ART: Refactored VisualizerPrinter visitor pattern

This patch refactors the visitor pattern in HGraphVisualizerPrinter
to output instruction-specific details.

Change-Id: Icfed9cd844b973025337a6bb584e1bc88f1ddd58

9 years agoUpdate oat version to 053.
Chenfu Bao [Mon, 29 Dec 2014 08:10:45 +0000 (16:10 +0800)]
Update oat version to 053.

Oat version in class OatHeader had increased to 052,
but commit 2bcb3b228bc418bcc7fdc3d58d0a0da422a0b6d5
(changeID I8cef1c6cc9cb2faa052167a3437e81b4c2cbefa7)
changed it back to 045.

Change-Id: I5bf7b995c9d99a536f6356d9fd5b5e746a933f2e
Signed-off-by: Chenfu Bao <emailwrong@gmail.com>
9 years agoART: Add imgdiag_test test dependency
Andreas Gampe [Sat, 20 Dec 2014 07:12:25 +0000 (23:12 -0800)]
ART: Add imgdiag_test test dependency

The test depends on the binaries. Make sure they are done before we
run the test.

Change-Id: I76e6458b725ba99746772223b2fe961080d1662b

9 years agoART: Cut filename for DumpCFG
Andreas Gampe [Fri, 19 Dec 2014 23:30:11 +0000 (15:30 -0800)]
ART: Cut filename for DumpCFG

If the name/path is too long, we'd silently fail dumping. Cut the
name when it's too long, and write an error message if we still
fail opening.

Change-Id: Id439a3367a8fdb50027959dd8c183913d074e669

9 years agoMerge "ART: Fix verification of constructors."
Andreas Gampe [Mon, 22 Dec 2014 21:47:15 +0000 (21:47 +0000)]
Merge "ART: Fix verification of constructors."

9 years agoMerge "ART: Fix common_compiler_test assumptions"
Andreas Gampe [Mon, 22 Dec 2014 21:45:47 +0000 (21:45 +0000)]
Merge "ART: Fix common_compiler_test assumptions"

9 years agoART: Fix common_compiler_test assumptions
Andreas Gampe [Mon, 22 Dec 2014 21:43:33 +0000 (13:43 -0800)]
ART: Fix common_compiler_test assumptions

JNI-compiled methods now do not have mapping tables or GC maps,
not even zero-sized. Update the code in common_compiler_test.

Bug: 18596910
Change-Id: If22bf1b2e369273148f060b0b1ffc02b2b1ef608

9 years agoART: Fix verification of constructors.
Stephen Kyle [Wed, 17 Dec 2014 17:10:02 +0000 (17:10 +0000)]
ART: Fix verification of constructors.

Summary:

A constructor must call its superclass constructor. However, if one
replaces the invoke-direct superclass.<init>() instruction with a
variety of instructions, the verifier would NOT complain that the
superclass constructor hadn't been called.

Detailed explanation:

This was because if we are verifying the return-void insn of a
constructor, then we check that the register line doesn't contain a
register with an UninitializedThis type. With a method like follows:

Class.<init>()V:
  return-void

Then we hit the return-void, see the UninitializedThis, and fail the
method. However, with a method like follows:

Class.<init>()V:
  nop
  return-void

Any insn that continues or branches onto a return-void instruction will
mark all of the registers as Conflict. This meant that the check in
return-void for an UninitializedThis residing the register line would
_always_ pass if there were any insns before it - the entire line had
been set to Conflict.

The fix is to bring the check for an UninitializedThis forward to the
point just before we set all registers to Conflict, if we're about to
hit a return-void insn in a constructor. It still needs to be done
again in the verification of return-void itself, to avoid the solo
return-void case.

This patch also deals with the case where the only remaining
UninitializedThis reference is overwritten, to avoid a method like the
following from getting through verification:

Class.<init>()V:
  const/4 v0, 0
  return-void

Bug: 18800943

Change-Id: I2e317261844d3b6c78e35228669f3da173316570
Fuzzed-With: https://android-review.googlesource.com/#/c/119463/

9 years agoMerge "ART: Mac build fix"
Andreas Gampe [Mon, 22 Dec 2014 21:07:46 +0000 (21:07 +0000)]
Merge "ART: Mac build fix"

9 years agoART: Mac build fix
Andreas Gampe [Mon, 22 Dec 2014 21:06:44 +0000 (13:06 -0800)]
ART: Mac build fix

Unused parameter on Mac.

Bug: 18596910
Change-Id: If0fab0b58173997d584fcdce195361d792f1098d

9 years agoMerge "ART: Do not compile swap file functionality on Mac"
Andreas Gampe [Mon, 22 Dec 2014 19:33:15 +0000 (19:33 +0000)]
Merge "ART: Do not compile swap file functionality on Mac"

9 years agoART: Do not compile swap file functionality on Mac
Andreas Gampe [Fri, 19 Dec 2014 20:04:06 +0000 (12:04 -0800)]
ART: Do not compile swap file functionality on Mac

Bug: 18596910

(cherry picked from commit 8a9f0049821803051201edebc6d9a0f0639756c3)

Change-Id: Ic06429f41840ce318cfaa837efecc69c2076440e

9 years agoMerge "ART: Swap-space in the compiler"
Andreas Gampe [Mon, 22 Dec 2014 18:30:07 +0000 (18:30 +0000)]
Merge "ART: Swap-space in the compiler"

9 years agoART: Swap-space in the compiler
Andreas Gampe [Tue, 9 Dec 2014 00:59:43 +0000 (16:59 -0800)]
ART: Swap-space in the compiler

Introduce a swap-space and corresponding allocator to transparently
switch native allocations to memory backed by a file.

Bug: 18596910

(cherry picked from commit 62746d8d9c4400e4764f162b22bfb1a32be287a9)

Change-Id: I131448f3907115054a592af73db86d2b9257ea33

9 years agoMerge "ART: Do not JNI abort on nullptr GetObjectRefType"
Andreas Gampe [Mon, 22 Dec 2014 17:43:36 +0000 (17:43 +0000)]
Merge "ART: Do not JNI abort on nullptr GetObjectRefType"

9 years agoART: Do not JNI abort on nullptr GetObjectRefType
Andreas Gampe [Sat, 20 Dec 2014 08:08:35 +0000 (00:08 -0800)]
ART: Do not JNI abort on nullptr GetObjectRefType

A nullptr is a valid input, as it is different from a null reference.

Bug: 18820997
Change-Id: Ibda8907ba13b20d2055049492a356ffdf4ddc714

9 years agoMerge "ART: Use interpret-only for vmSafeMode"
Andreas Gampe [Sat, 20 Dec 2014 07:25:59 +0000 (07:25 +0000)]
Merge "ART: Use interpret-only for vmSafeMode"

9 years agoART: Use interpret-only for vmSafeMode
Andreas Gampe [Fri, 19 Dec 2014 17:53:27 +0000 (09:53 -0800)]
ART: Use interpret-only for vmSafeMode

Set the compiler filter when the zygote tells us that the app is
in vmSafeMode. This ensures that secondary dex files will also be
compiled interpret-only.

Bug: 18812762

(cherry picked from commit 44893692bfb25ceb5c7c5b2e5c606948fbdea298)

Change-Id: Idb61870beebe2eeb5b11554f95ea6a725c77f16a

9 years agoMerge "Add heap task processor"
Mathieu Chartier [Sat, 20 Dec 2014 02:01:01 +0000 (02:01 +0000)]
Merge "Add heap task processor"

9 years agoAdd heap task processor
Mathieu Chartier [Thu, 18 Dec 2014 01:56:03 +0000 (17:56 -0800)]
Add heap task processor

The heap task processor processes async tasks which may be delayed.
The motivation for this change is preventing deadlocks which
can occur when the daemon threads get suspended by GetThreadStack.

Other improvements, reduces daemon thread count by one.
Cleaner pending transition VS heap trimming logic.

Bug: 18739541

Change-Id: Idab52b2d9661a6385cada74b93ff297ddc55fc78

9 years agoMerge "Fix running out of temps when storing invoke-interface result."
Vladimir Marko [Fri, 19 Dec 2014 22:54:57 +0000 (22:54 +0000)]
Merge "Fix running out of temps when storing invoke-interface result."

9 years agoFix running out of temps when storing invoke-interface result.
Vladimir Marko [Fri, 19 Dec 2014 19:27:26 +0000 (19:27 +0000)]
Fix running out of temps when storing invoke-interface result.

On ARM, after emitting invoke-interface we didn't have any
free temps to use for storing the result, so we would crash
if the result was an unpromoted dalvik register with stack
location too far from SP.

Bug: 18769895

(cherry picked from commit d6bd06c713e8ec69de96510ef57bdf7adb4781ed)

Change-Id: Id88f6f3788eaf6ecbc7bd68880b445423f6e4f94

9 years agoMerge "Pass the real capacity to CreateRosAlloc."
Hiroshi Yamauchi [Fri, 19 Dec 2014 20:16:12 +0000 (20:16 +0000)]
Merge "Pass the real capacity to CreateRosAlloc."

9 years agoMerge "Move two members out of MIRGraph::temp_::ssa."
Vladimir Marko [Fri, 19 Dec 2014 18:17:26 +0000 (18:17 +0000)]
Merge "Move two members out of MIRGraph::temp_::ssa."

9 years agoMove two members out of MIRGraph::temp_::ssa.
Vladimir Marko [Fri, 19 Dec 2014 18:11:35 +0000 (18:11 +0000)]
Move two members out of MIRGraph::temp_::ssa.

It turns out they are used outside the SSA transformation
by the x86 back-end.

This is a partial revert of
  https://android-review.googlesource.com/120571

Change-Id: Ia5cb2988ab0625d8519901124bd4fc184d5f0886

9 years agoMerge "ART: Implement FP packed reduce for x86"
Bill Buzbee [Fri, 19 Dec 2014 17:59:51 +0000 (17:59 +0000)]
Merge "ART: Implement FP packed reduce for x86"

9 years agoMerge "Clean up dead loops before suspend check elimination."
Vladimir Marko [Fri, 19 Dec 2014 16:21:08 +0000 (16:21 +0000)]
Merge "Clean up dead loops before suspend check elimination."

9 years agoMerge "Clean up post-opt passes, perform only those we need."
Vladimir Marko [Fri, 19 Dec 2014 15:34:09 +0000 (15:34 +0000)]
Merge "Clean up post-opt passes, perform only those we need."

9 years agoClean up dead loops before suspend check elimination.
Vladimir Marko [Fri, 19 Dec 2014 10:29:51 +0000 (10:29 +0000)]
Clean up dead loops before suspend check elimination.

Get rid of BasicBlock::KillUnreachable() and just Kill()
unreachable blocks from the DFS order calculation.

Bug: 18718277
Change-Id: Icaf7b9c2320530e950f87e1e2e2bd1fa5f53cb98

9 years agoMerge "Clean up MIRGraph::CanThrow()."
Vladimir Marko [Fri, 19 Dec 2014 14:32:07 +0000 (14:32 +0000)]
Merge "Clean up MIRGraph::CanThrow()."

9 years agoClean up MIRGraph::CanThrow().
Vladimir Marko [Thu, 18 Dec 2014 17:01:02 +0000 (17:01 +0000)]
Clean up MIRGraph::CanThrow().

Merge with the code from CombineBlocks().

Change-Id: I73c71286acba1b6042f85f0bd19c525450ce9c05

9 years agoClean up post-opt passes, perform only those we need.
Vladimir Marko [Thu, 18 Dec 2014 17:05:58 +0000 (17:05 +0000)]
Clean up post-opt passes, perform only those we need.

Change-Id: If802074d780d91151d236ef52236b6f33ca47258

9 years agoMerge "Fixed CanBeMoved for field access"
Calin Juravle [Fri, 19 Dec 2014 10:51:16 +0000 (10:51 +0000)]
Merge "Fixed CanBeMoved for field access"