OSDN Git Service

android-x86/art.git
9 years agoART: Check image size when opening
Andreas Gampe [Thu, 19 Feb 2015 19:42:36 +0000 (11:42 -0800)]
ART: Check image size when opening

The image file might have been truncated. In that case, reject
loading the image space.

Bug: 19398702

(cherrypicked from commit beacd381dbdcc9f7f02b5e207037afb993aabba4)

Change-Id: I8e46340fe1e05629704d6e3bae84caf8b0435125

9 years agoam afc4ef58: am 227dfb0a: Fix false alarm on thread suspend timeout
tony.ys_liu [Wed, 11 Feb 2015 17:31:00 +0000 (17:31 +0000)]
am afc4ef58: am 227dfb0a: Fix false alarm on thread suspend timeout

* commit 'afc4ef58d1c153a7f08ef5522f0d108b370c5515':
  Fix false alarm on thread suspend timeout

9 years agoam 227dfb0a: Fix false alarm on thread suspend timeout
tony.ys_liu [Wed, 11 Feb 2015 17:24:56 +0000 (17:24 +0000)]
am 227dfb0a: Fix false alarm on thread suspend timeout

* commit '227dfb0a25d020f0571eb194b98eca350bd6d036':
  Fix false alarm on thread suspend timeout

9 years agoFix false alarm on thread suspend timeout
tony.ys_liu [Wed, 14 Jan 2015 10:28:03 +0000 (18:28 +0800)]
Fix false alarm on thread suspend timeout

Root cause:
  CLOCK_REALTIME will jump backward/forward when system time-of-day clock is changed.
  It implies now_abs_ts will jump a lot across end_abs_ts.
  Then, it makes a false alarm (process crash) on thread suspend timeout when doing ComputeRelativeTimeSpec.

      if (ComputeRelativeTimeSpec(&rel_ts, end_abs_ts, now_abs_ts)) {
        return false;  // Timed out.
      }

Solution:
  Use CLOCK_MONOTONIC instead

Bug: 19296054
Bug: 19268145

(cherry picked from commit 071e48ecfc95b1c67b07c975190d51f646ac4276)

Change-Id: I68fa5afda75e53373e836dd7779821aeb6f1bd46
(cherry picked from commit 7d9ad8bb71df2b1dc957121ef2ebee69d96f8e0c)

9 years agoam 44fb719e: ART: Allow class-loading during deopt
Andreas Gampe [Wed, 11 Feb 2015 02:10:25 +0000 (02:10 +0000)]
am 44fb719e: ART: Allow class-loading during deopt

* commit '44fb719e5f0f5ee7dcf4b1eae703593f1043a169':
  ART: Allow class-loading during deopt

9 years agoART: Allow class-loading during deopt
Andreas Gampe [Tue, 10 Feb 2015 23:37:27 +0000 (15:37 -0800)]
ART: Allow class-loading during deopt

When deoptimizing, we might touch code that uses unloaded classes.

Bug: 19290147
Change-Id: I5776f08ba366e9742336caba0d6af85f00629afc

9 years agoam 7d9ad8bb: Fix false alarm on thread suspend timeout
tony.ys_liu [Fri, 6 Feb 2015 21:02:53 +0000 (21:02 +0000)]
am 7d9ad8bb: Fix false alarm on thread suspend timeout

* commit '7d9ad8bb71df2b1dc957121ef2ebee69d96f8e0c':
  Fix false alarm on thread suspend timeout

9 years agoFix false alarm on thread suspend timeout
tony.ys_liu [Wed, 14 Jan 2015 10:28:03 +0000 (18:28 +0800)]
Fix false alarm on thread suspend timeout

Root cause:
  CLOCK_REALTIME will jump backward/forward when system time-of-day clock is changed.
  It implies now_abs_ts will jump a lot across end_abs_ts.
  Then, it makes a false alarm (process crash) on thread suspend timeout when doing ComputeRelativeTimeSpec.

      if (ComputeRelativeTimeSpec(&rel_ts, end_abs_ts, now_abs_ts)) {
        return false;  // Timed out.
      }

Solution:
  Use CLOCK_MONOTONIC instead

Bug: 19296054

(cherry picked from commit 071e48ecfc95b1c67b07c975190d51f646ac4276)

Change-Id: I68fa5afda75e53373e836dd7779821aeb6f1bd46

9 years agoam 65370e37: Check for null class of class
Mathieu Chartier [Sat, 31 Jan 2015 08:02:23 +0000 (08:02 +0000)]
am 65370e37: Check for null class of class

* commit '65370e37b3fd9e53e3c1bce5757912e8309cd305':
  Check for null class of class

9 years agoCheck for null class of class
Mathieu Chartier [Thu, 29 Jan 2015 18:47:10 +0000 (10:47 -0800)]
Check for null class of class

Experimental fix.

Bug: 19193521
Change-Id: I11571dd5a63852acdbad5d4291510542c2e4b18a

9 years agoam 72d72ef5: Force set resolved method for static invokes
Mathieu Chartier [Thu, 29 Jan 2015 00:05:50 +0000 (00:05 +0000)]
am 72d72ef5: Force set resolved method for static invokes

* commit '72d72ef51aef106d6f0300a72b583bcc5cd90a13':
  Force set resolved method for static invokes

9 years agoForce set resolved method for static invokes
Mathieu Chartier [Wed, 28 Jan 2015 21:11:44 +0000 (13:11 -0800)]
Force set resolved method for static invokes

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
(cherry picked from commit e4a91bbeaa118bc01a5c338c6a6d9ee094a6a2c6)
Change-Id: I26f8644a7f725f5c2dc2a94a8e9578f573792507

9 years agoam 24c846a0: Quick: Fix range check for intrinsic String.charAt() on x86.
Vladimir Marko [Mon, 26 Jan 2015 19:30:02 +0000 (19:30 +0000)]
am 24c846a0: Quick: Fix range check for intrinsic String.charAt() on x86.

* commit '24c846a0df02d4cc2ef8a9c476305dca96be40db':
  Quick: Fix range check for intrinsic String.charAt() on x86.

9 years agoQuick: Fix range check for intrinsic String.charAt() on x86.
Vladimir Marko [Mon, 26 Jan 2015 14:06:46 +0000 (14:06 +0000)]
Quick: Fix range check for intrinsic String.charAt() on x86.

Bug: 19125146

(cherry picked from commit 00ca84730a21578dcc6b47bd8e08b78ab9b2dded)

Change-Id: I67184371597fdcc9d9186172c1cff4efd3ca3093

9 years agoam 980417bf: Merge "ART: On shutdown, only warn on mutex contention" into lmp-mr1-dev
Andreas Gampe [Fri, 23 Jan 2015 22:44:29 +0000 (22:44 +0000)]
am 980417bf: Merge "ART: On shutdown, only warn on mutex contention" into lmp-mr1-dev

* commit '980417bfc03fb01e73868739c04b569dd1a97a5f':
  ART: On shutdown, only warn on mutex contention

9 years agoMerge "ART: On shutdown, only warn on mutex contention" into lmp-mr1-dev
Andreas Gampe [Fri, 23 Jan 2015 22:34:24 +0000 (22:34 +0000)]
Merge "ART: On shutdown, only warn on mutex contention" into lmp-mr1-dev

9 years agoam 6e18c0ab: Merge "Allow preopted apps to have sharpened calls for non-x86 architect...
Jeff Hao [Fri, 23 Jan 2015 18:52:21 +0000 (18:52 +0000)]
am 6e18c0ab: Merge "Allow preopted apps to have sharpened calls for non-x86 architectures." into lmp-mr1-dev

* commit '6e18c0ab373f9c36b5dc86445a25fbee972ee204':
  Allow preopted apps to have sharpened calls for non-x86 architectures.

9 years agoam 90a33595: Fix exception handling during deoptimization
Sebastien Hertz [Fri, 23 Jan 2015 18:52:20 +0000 (18:52 +0000)]
am 90a33595: Fix exception handling during deoptimization

* commit '90a33595bc637f5768a7726a186bdfe25efcd0d6':
  Fix exception handling during deoptimization

9 years agoMerge "Allow preopted apps to have sharpened calls for non-x86 architectures." into...
Jeff Hao [Fri, 23 Jan 2015 18:46:31 +0000 (18:46 +0000)]
Merge "Allow preopted apps to have sharpened calls for non-x86 architectures." into lmp-mr1-dev

9 years agoART: On shutdown, only warn on mutex contention
Andreas Gampe [Fri, 23 Jan 2015 03:48:51 +0000 (19:48 -0800)]
ART: On shutdown, only warn on mutex contention

Do not abort, as daemon threads may still be active.

Bug: 17894429
Change-Id: I7c1d50ff8d4a5e150279e703a69c8f2f1d423e6b

9 years agoFix exception handling during deoptimization
Sebastien Hertz [Fri, 16 Jan 2015 18:49:09 +0000 (19:49 +0100)]
Fix exception handling during deoptimization

When interpreting a deoptimized shadow frame, we may start with a
pending exception thrown by a previous deoptimized shadow frame (from
a previous invoke). Therefore, we need to handle it before executing
any instruction, otherwise we execute incorrect code.

Because we need the DEX pc of the throwing instruction to find a
matching catch handler, we initialize deoptimized shadow frames with
the current DEX pc at the time the stack is deoptimized.
When we are about to interpret a deoptimized shadow frame, we need to
update the shadow frame with the DEX pc of the next instruction to
interpret. There are three cases:
- if there is no pending exception, this is the instruction following
the current one.
- if there is a pending exception and we found a matching catch
handler, this is the first instruction of this handler.
- if there is a pending exception but there is no matching catch
handler, we do not execute the deoptimized shadow frame and continue
to its caller.

The verifier now fails when a method starts with a move-exception
instruction. Indeed we cannot start executing a method with a pending
exception.

Bug: 19057915
Bug: 19041195
Bug: 18607595

(cherry picked from commit 270a0e16c3b8e5b95cbfdbd8996ac137c7c6322b)

Change-Id: Ib4fdd0ad704b4f2369d229737c9cc77f559cea55

9 years agoAllow preopted apps to have sharpened calls for non-x86 architectures.
Jeff Hao [Fri, 23 Jan 2015 02:25:30 +0000 (18:25 -0800)]
Allow preopted apps to have sharpened calls for non-x86 architectures.

Bug: 19100762

Change-Id: Iefd4265cb7864cdaa12c1f9e44bfaa5aa4fb93ec

9 years agoam 92fbd284: Use correct handle scope offset from StackVisitor
Sebastien Hertz [Thu, 22 Jan 2015 21:49:16 +0000 (21:49 +0000)]
am 92fbd284: Use correct handle scope offset from StackVisitor

* commit '92fbd284fa595724c47d1a803b50c3891b9836b3':
  Use correct handle scope offset from StackVisitor

9 years agoUse correct handle scope offset from StackVisitor
Sebastien Hertz [Wed, 17 Dec 2014 19:02:50 +0000 (20:02 +0100)]
Use correct handle scope offset from StackVisitor

Incorrect offset resulted in bad GC roots due to invalid
Stack::GetThisObject for native methods.

Bug: 19070497
Bug: 18785293

(cherry picked from commit e4b7c892c4f40e76c172a77069afde3fe5ce87da)
Change-Id: I10e144cffac00978e3c84d43a30caccd61559b27

9 years agoam ddc1a46d: Merge "ART: Curb dex2oat verbosity" into lmp-mr1-dev
Andreas Gampe [Thu, 22 Jan 2015 19:52:41 +0000 (19:52 +0000)]
am ddc1a46d: Merge "ART: Curb dex2oat verbosity" into lmp-mr1-dev

* commit 'ddc1a46db621d29a79e488605c61bdafb9f4f144':
  ART: Curb dex2oat verbosity

9 years agoMerge "ART: Curb dex2oat verbosity" into lmp-mr1-dev
Andreas Gampe [Thu, 22 Jan 2015 17:38:38 +0000 (17:38 +0000)]
Merge "ART: Curb dex2oat verbosity" into lmp-mr1-dev

9 years agoam 108a9acc: Merge "JDWP: fix breakpoint for method in the image" into lmp-mr1-dev
Sebastien Hertz [Wed, 21 Jan 2015 22:03:22 +0000 (22:03 +0000)]
am 108a9acc: Merge "JDWP: fix breakpoint for method in the image" into lmp-mr1-dev

* commit '108a9acc9be80a1324f88f903523464fba018480':
  JDWP: fix breakpoint for method in the image

9 years agoMerge "JDWP: fix breakpoint for method in the image" into lmp-mr1-dev
Sebastien Hertz [Wed, 21 Jan 2015 19:49:40 +0000 (19:49 +0000)]
Merge "JDWP: fix breakpoint for method in the image" into lmp-mr1-dev

9 years agoART: Curb dex2oat verbosity
Andreas Gampe [Tue, 20 Jan 2015 22:50:21 +0000 (14:50 -0800)]
ART: Curb dex2oat verbosity

Only print dedupe collisions in a debug build or on verbose logging.

Bug: 19082662

(cherry picked from commit 8d295f8f0e88fa5c6373962d545020a06033b3fc)

Change-Id: I08bd04a453d95b6dba6cf6955b5741cd97daf480

9 years agoJDWP: fix breakpoint for method in the image
Sebastien Hertz [Wed, 26 Nov 2014 21:11:27 +0000 (22:11 +0100)]
JDWP: fix breakpoint for method in the image

When we set a breakpoint in a compiled method, we deoptimize it by
changing its entrypoint so it is executed with the interpreter.
However, methods in the image can be called with their direct code
pointer, ignoring the updated entrypoint. In that case, the method
is not executed with the interpreter and we miss the breakpoint.

This CL avoids that situation by forcing a full deoptimization so
everything runs with the interpreter. However, if the image has been
compiled in PIC mode, we keep using selective deoptimization because
direct code pointer is not used in this mode.

Bug: 17965285

(cherry picked from commit 6963e44331258b131bcc0599b868ba15902d6d22)

Change-Id: I9bf738f89b9eb6d18733503216b376b8a1d181f5

9 years agoam b34d505b: Fix infinite loop in GenerateIdentityHashCode
tony.ys_liu [Fri, 16 Jan 2015 22:13:51 +0000 (22:13 +0000)]
am b34d505b: Fix infinite loop in GenerateIdentityHashCode

* commit 'b34d505b090cfefd01665aa735364962a364303e':
  Fix infinite loop in GenerateIdentityHashCode

9 years agoFix infinite loop in GenerateIdentityHashCode
tony.ys_liu [Fri, 16 Jan 2015 11:16:45 +0000 (19:16 +0800)]
Fix infinite loop in GenerateIdentityHashCode

Root Cause:
  If no one changes the seed, it will become infinite loop due to below condition
    (expected_value & LockWord::kHashMask) == 0

Solution:
  Changes the seed before entering the next loop

Added test.

Bug: 19046417

(cherry picked from commit 7380c3175b443cdc6f12a2a3a91df188eaaa5a61)

Change-Id: I7d1c377dd1bda780681514b24d61ebc776bc80ab

9 years agoam f2df4941: Merge "Print more info in MarkSweep::VerifyRoot" into lmp-mr1-dev
Mathieu Chartier [Thu, 15 Jan 2015 20:06:36 +0000 (20:06 +0000)]
am f2df4941: Merge "Print more info in MarkSweep::VerifyRoot" into lmp-mr1-dev

* commit 'f2df4941be3c48daee65f2ca1852994240872e4d':
  Print more info in MarkSweep::VerifyRoot

9 years agoMerge "Print more info in MarkSweep::VerifyRoot" into lmp-mr1-dev
Mathieu Chartier [Thu, 15 Jan 2015 19:59:36 +0000 (19:59 +0000)]
Merge "Print more info in MarkSweep::VerifyRoot" into lmp-mr1-dev

9 years agoPrint more info in MarkSweep::VerifyRoot
Mathieu Chartier [Wed, 14 Jan 2015 22:55:47 +0000 (14:55 -0800)]
Print more info in MarkSweep::VerifyRoot

Refactored old root callback to use a new class called RootInfo.
RootInfo contains all the relevant info related to the root
associated with the callback. The MarkSweep::VerifyRoot function
now uses this info to print the StackVisitor's described location
if the GC root is of the type kRootJavaFrame.

Some other cleanup.

Example output:
E/art     (12167): Tried to mark 0x123 not contained by any spaces
E/art     (12167): Attempting see if it's a bad root
E/art     (12167): Found invalid root: 0x123 with type RootJavaFrame
E/art     (12167): Location=Visiting method
'void java.lang.Runtime.gc()' at dex PC 0xffffffff (native PC 0x0)
vreg=0

Bug: 18588862
Change-Id: Ic5a2781f704e931265ffb3621c2eab4b2e25f60f

9 years agoam d488fcbb: Merge "Fix wide volatile IGET/IPUT on ARM without atomic ldrd/strd....
Vladimir Marko [Thu, 15 Jan 2015 10:18:58 +0000 (10:18 +0000)]
am d488fcbb: Merge "Fix wide volatile IGET/IPUT on ARM without atomic ldrd/strd." into lmp-mr1-dev

* commit 'd488fcbbde2cca76e71b5d0a3320f83d28c9bdf7':
  Fix wide volatile IGET/IPUT on ARM without atomic ldrd/strd.

9 years agoam cb14cd22: Merge "Add a test for our NPE checks." into lmp-mr1-dev
Vladimir Marko [Thu, 15 Jan 2015 10:18:57 +0000 (10:18 +0000)]
am cb14cd22: Merge "Add a test for our NPE checks." into lmp-mr1-dev

* commit 'cb14cd22a73936cb2d0660685762fd6e69707098':
  Add a test for our NPE checks.

9 years agoMerge "Fix wide volatile IGET/IPUT on ARM without atomic ldrd/strd." into lmp-mr1-dev
Vladimir Marko [Thu, 15 Jan 2015 09:42:38 +0000 (09:42 +0000)]
Merge "Fix wide volatile IGET/IPUT on ARM without atomic ldrd/strd." into lmp-mr1-dev

9 years agoMerge "Add a test for our NPE checks." into lmp-mr1-dev
Vladimir Marko [Thu, 15 Jan 2015 09:41:35 +0000 (09:41 +0000)]
Merge "Add a test for our NPE checks." into lmp-mr1-dev

9 years agoam 300dee9f: Merge "ART: Simple structural class check" into lmp-mr1-dev
Andreas Gampe [Wed, 14 Jan 2015 22:42:11 +0000 (22:42 +0000)]
am 300dee9f: Merge "ART: Simple structural class check" into lmp-mr1-dev

* commit '300dee9ff2c4ce59e821d0aeceb87fab13295f46':
  ART: Simple structural class check

9 years agoMerge "ART: Simple structural class check" into lmp-mr1-dev
Andreas Gampe [Wed, 14 Jan 2015 22:11:19 +0000 (22:11 +0000)]
Merge "ART: Simple structural class check" into lmp-mr1-dev

9 years agoART: Simple structural class check
Andreas Gampe [Fri, 7 Nov 2014 00:52:58 +0000 (16:52 -0800)]
ART: Simple structural class check

Adds a simple check to class-loading when the embedded dex file in
an oat file and the dex file on the class path where we found the
class do not match.

We require that the number of methods and fields do not change, as
that will almost certainly mean that quickened and other compiled
offsets are wrong now. This is a reasonably lightweight change, but
we should investigate a full comparison including name and type of
members.

Bug: 17937814
Bug: 18708951
Change-Id: Icb9638bebd369ab23822817f4a97c8dd8625fea5

9 years agoFix wide volatile IGET/IPUT on ARM without atomic ldrd/strd.
Vladimir Marko [Tue, 13 Jan 2015 17:34:28 +0000 (17:34 +0000)]
Fix wide volatile IGET/IPUT on ARM without atomic ldrd/strd.

If ldrd/strd isn't atomic, IPUT_WIDE uses ldrexd+strexd and
we need to record the safepoint for the ldrexd rather than
strexd. IGET_WIDE was simply missing the memory barrier.

Bug: 18993519

(cherry picked from commit ee5e273e4d0dd91b480c8d5dbcccad15c1b7353c)

Change-Id: I4e9270b994f413c1a047c1c4bb9cce5f29e42cb4

9 years agoAdd a test for our NPE checks.
Nicolas Geoffray [Thu, 11 Sep 2014 17:46:01 +0000 (18:46 +0100)]
Add a test for our NPE checks.

(cherry picked from commit 5f16c8838c8e4524101f5897dac70035c5cc271f)

Change-Id: I0b216fb868ed56d30103fe7843a7eb0169b0b28b

9 years agoam 66516ac4: JDWP: allow VirtualMachine.Resume on partial suspension
Sebastien Hertz [Wed, 14 Jan 2015 11:59:50 +0000 (11:59 +0000)]
am 66516ac4: JDWP: allow VirtualMachine.Resume on partial suspension

* commit '66516ac4547fe40f26e4e117b3ee595904607b95':
  JDWP: allow VirtualMachine.Resume on partial suspension

9 years agoJDWP: allow VirtualMachine.Resume on partial suspension
Sebastien Hertz [Fri, 9 Jan 2015 13:51:41 +0000 (14:51 +0100)]
JDWP: allow VirtualMachine.Resume on partial suspension

Allows to resume multiple threads with a single VirtualMachine.Resume
command. When some threads are suspended for an event by the debugger
with a suspend count of 1 (other threads are running), a debugger can
resume them all this way.

Bug: 18924933

(cherry picked from commit f9d233dae8ca66ed5a2a474155d6bee0d74c355b)

Change-Id: I948c3b50d43693e86ae31e0928a33a467328583f

9 years agoam 112d6cf8: Merge "Fix sigchainlib\'s implementation of sigaction" into lmp-mr1-dev
Dmitriy Ivanov [Tue, 6 Jan 2015 23:42:24 +0000 (23:42 +0000)]
am 112d6cf8: Merge "Fix sigchainlib\'s implementation of sigaction" into lmp-mr1-dev

* commit '112d6cf8ea4b7c2798e25e4098d170642e796b7e':
  Fix sigchainlib's implementation of sigaction

9 years agoMerge "Fix sigchainlib's implementation of sigaction" into lmp-mr1-dev
Dmitriy Ivanov [Tue, 6 Jan 2015 23:34:46 +0000 (23:34 +0000)]
Merge "Fix sigchainlib's implementation of sigaction" into lmp-mr1-dev

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

9 years agoam 60a1606b: Merge "Mute common case DexFile.isDexOptNeeded log spam" into lmp-mr1-dev
Brian Carlstrom [Tue, 6 Jan 2015 22:58:54 +0000 (22:58 +0000)]
am 60a1606b: Merge "Mute common case DexFile.isDexOptNeeded log spam" into lmp-mr1-dev

* commit '60a1606b4737260c332457a7a3c59cafa35faff0':
  Mute common case DexFile.isDexOptNeeded log spam

9 years agoMerge "Mute common case DexFile.isDexOptNeeded log spam" into lmp-mr1-dev
Brian Carlstrom [Tue, 6 Jan 2015 22:52:48 +0000 (22:52 +0000)]
Merge "Mute common case DexFile.isDexOptNeeded log spam" into lmp-mr1-dev

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

(cherry picked from commit 9851595177fec4d5e328f201f1992719fb40db2a)

Change-Id: If9b741ff8e09400a421e0a0ba1bc0d9ef13a9f99

9 years agoam 56e7666f: ART: Fix divide-by-zero for ARM
Andreas Gampe [Tue, 6 Jan 2015 17:14:09 +0000 (17:14 +0000)]
am 56e7666f: ART: Fix divide-by-zero for ARM

* commit '56e7666fe0df2c1a16b2cc6d12562c3e82199c0d':
  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

(cherry picked from commit cfe71e59c667abb35bc2363c49af7f8b549c44d0)

Change-Id: Ibd481918d3c6d7bc62fdd1a6807042009f561d95

9 years agoam 55933045: Merge "ART: Do not JNI abort on nullptr GetObjectRefType" into lmp-mr1-dev
Andreas Gampe [Mon, 22 Dec 2014 18:30:56 +0000 (18:30 +0000)]
am 55933045: Merge "ART: Do not JNI abort on nullptr GetObjectRefType" into lmp-mr1-dev

* commit '55933045bcbb66dd76046aa279841f3a1efba7b5':
  ART: Do not JNI abort on nullptr GetObjectRefType

9 years agoMerge "ART: Do not JNI abort on nullptr GetObjectRefType" into lmp-mr1-dev
Andreas Gampe [Mon, 22 Dec 2014 18:27:42 +0000 (18:27 +0000)]
Merge "ART: Do not JNI abort on nullptr GetObjectRefType" into lmp-mr1-dev

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

(cherry picked from commit a87630724ef4f8760684fa69c8ecc685735aff88)

Change-Id: Ibda8907ba13b20d2055049492a356ffdf4ddc714

9 years agoam 5e3dd904: Merge "ART: Use interpret-only for vmSafeMode" into lmp-mr1-dev
Andreas Gampe [Sat, 20 Dec 2014 07:15:04 +0000 (07:15 +0000)]
am 5e3dd904: Merge "ART: Use interpret-only for vmSafeMode" into lmp-mr1-dev

* commit '5e3dd904f86783bf4b835084c51d8d3625f00897':
  ART: Use interpret-only for vmSafeMode

9 years agoMerge "ART: Use interpret-only for vmSafeMode" into lmp-mr1-dev
Andreas Gampe [Sat, 20 Dec 2014 07:10:32 +0000 (07:10 +0000)]
Merge "ART: Use interpret-only for vmSafeMode" into lmp-mr1-dev

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
Change-Id: Idb61870beebe2eeb5b11554f95ea6a725c77f16a

9 years agoam 634d58a9: Pass the real capacity to CreateRosAlloc.
Hiroshi Yamauchi [Sat, 20 Dec 2014 01:01:26 +0000 (01:01 +0000)]
am 634d58a9: Pass the real capacity to CreateRosAlloc.

* commit '634d58a91ed636043feed600ca17c6c945a4fb20':
  Pass the real capacity to CreateRosAlloc.

9 years agoPass the real capacity to CreateRosAlloc.
Hiroshi Yamauchi [Sat, 20 Dec 2014 00:02:07 +0000 (16:02 -0800)]
Pass the real capacity to CreateRosAlloc.

(cherrypick commit 94c41dfcaf4bc131964ddd3013432841b07c3839)

Bug: 18808732
Change-Id: Id65469c3deb70c9f750f89cf0e7606849b801a21

9 years agoam 091f9543: Merge "Fix running out of temps when storing invoke-interface result...
Vladimir Marko [Fri, 19 Dec 2014 21:32:25 +0000 (21:32 +0000)]
am 091f9543: Merge "Fix running out of temps when storing invoke-interface result." into lmp-mr1-dev

* commit '091f954303f97bd280c4c7800c130bd198ff1165':
  Fix running out of temps when storing invoke-interface result.

9 years agoam 8a9f0049: ART: Do not compile swap file functionality on Mac
Andreas Gampe [Fri, 19 Dec 2014 21:32:24 +0000 (21:32 +0000)]
am 8a9f0049: ART: Do not compile swap file functionality on Mac

* commit '8a9f0049821803051201edebc6d9a0f0639756c3':
  ART: Do not compile swap file functionality on Mac

9 years agoMerge "Fix running out of temps when storing invoke-interface result." into lmp-mr1-dev
Vladimir Marko [Fri, 19 Dec 2014 21:27:35 +0000 (21:27 +0000)]
Merge "Fix running out of temps when storing invoke-interface result." into lmp-mr1-dev

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
Change-Id: Ic06429f41840ce318cfaa837efecc69c2076440e

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
Change-Id: Ie6c131d68f1853a8317b305a22eab22faea80e90

9 years agoam d9ce7fc1: ART: Fix swap space free list
Andreas Gampe [Fri, 19 Dec 2014 16:46:00 +0000 (16:46 +0000)]
am d9ce7fc1: ART: Fix swap space free list

* commit 'd9ce7fc19b061be7745d8d8a32bc954a0c62d326':
  ART: Fix swap space free list

9 years agoART: Fix swap space free list
Andreas Gampe [Fri, 19 Dec 2014 08:14:38 +0000 (00:14 -0800)]
ART: Fix swap space free list

You should look for the element's size, not the freed size, when
coalescing nodes.

Bug: 18809642
Change-Id: I0c4396d52ef68f392f1e8c76a57e3fb5587b77fb

9 years agoam 62746d8d: ART: Swap-space in the compiler
Andreas Gampe [Fri, 19 Dec 2014 03:33:09 +0000 (03:33 +0000)]
am 62746d8d: ART: Swap-space in the compiler

* commit '62746d8d9c4400e4764f162b22bfb1a32be287a9':
  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
Change-Id: I131448f3907115054a592af73db86d2b9257ea33

9 years agoam 15ff1a86: Merge "JDWP: fix setting multiple breakpoints in the same method" into...
Sebastien Hertz [Thu, 18 Dec 2014 07:03:29 +0000 (07:03 +0000)]
am 15ff1a86: Merge "JDWP: fix setting multiple breakpoints in the same method" into lmp-mr1-dev

* commit '15ff1a8642fbbe3fb29273f35005ccc7524bb942':
  JDWP: fix setting multiple breakpoints in the same method

9 years agoMerge "JDWP: fix setting multiple breakpoints in the same method" into lmp-mr1-dev
Sebastien Hertz [Thu, 18 Dec 2014 06:57:03 +0000 (06:57 +0000)]
Merge "JDWP: fix setting multiple breakpoints in the same method" into lmp-mr1-dev

9 years agoam f535c69f: ART: Punt to the interpreter for VerifiedMethod errors
Andreas Gampe [Thu, 18 Dec 2014 02:47:25 +0000 (02:47 +0000)]
am f535c69f: ART: Punt to the interpreter for VerifiedMethod errors

* commit 'f535c69f115c61ffadca1bd2706244d0aa30f9aa':
  ART: Punt to the interpreter for VerifiedMethod errors

9 years agoART: Punt to the interpreter for VerifiedMethod errors
Andreas Gampe [Wed, 17 Dec 2014 22:35:46 +0000 (14:35 -0800)]
ART: Punt to the interpreter for VerifiedMethod errors

In case that the GC map can't be created (because of size restrictions),
do not fail the class. Instead punt to the interpreter.

Bug: 17791183
Change-Id: I348bb306dbfc85c235fa93c0c527fba6627551fe

9 years agoJDWP: fix setting multiple breakpoints in the same method
Sebastien Hertz [Wed, 17 Dec 2014 15:35:50 +0000 (16:35 +0100)]
JDWP: fix setting multiple breakpoints in the same method

When setting multiple breakpoints in the same method, we were
incorrectly setting the deoptimization kind of all the breakpoints
set after a first breakpoint. This resulted in incorrect
deoptimization/undeoptimization and even an abort. This was caught
by running the debugger with sanity checks enabled with libartd.so.

We now set next breakpoints with the deoptimization kind of the first
existing breakpoint (if any) so we trigger right [un]deoptimization
when adding or removing a breakpoint.

Bug: 18782753
Bug: 18651686

(cherry picked from commit abe93e0098a2648fa286cfea01954737e32c7be9)

Change-Id: I95424e361dc04df0adb54b5afac5b4da2b8b2731

9 years agoam 74608312: Merge "Increase default allocation stack size" into lmp-mr1-dev
Mathieu Chartier [Thu, 11 Dec 2014 20:47:54 +0000 (20:47 +0000)]
am 74608312: Merge "Increase default allocation stack size" into lmp-mr1-dev

* commit '746083126bb04ade001eb9d9b3aeea364633567f':
  Increase default allocation stack size

9 years agoMerge "Increase default allocation stack size" into lmp-mr1-dev
Mathieu Chartier [Thu, 11 Dec 2014 20:39:08 +0000 (20:39 +0000)]
Merge "Increase default allocation stack size" into lmp-mr1-dev

9 years agoIncrease default allocation stack size
Mathieu Chartier [Thu, 11 Dec 2014 02:45:30 +0000 (18:45 -0800)]
Increase default allocation stack size

Prevents some GC for alloc which can occur if the allocation stack
overflows.

Bug: 18707404
Change-Id: I00e8e518aa5105b69c70603a8395c81617b87d14

9 years agoam d2c8f92c: Merge "ART: More ELF and oat file safety measures" into lmp-mr1-dev
Andreas Gampe [Thu, 11 Dec 2014 18:34:16 +0000 (18:34 +0000)]
am d2c8f92c: Merge "ART: More ELF and oat file safety measures" into lmp-mr1-dev

* commit 'd2c8f92ccbcb885a7d7bd499a840012df3d8d70a':
  ART: More ELF and oat file safety measures

9 years agoMerge "ART: More ELF and oat file safety measures" into lmp-mr1-dev
Andreas Gampe [Thu, 11 Dec 2014 18:27:18 +0000 (18:27 +0000)]
Merge "ART: More ELF and oat file safety measures" into lmp-mr1-dev

9 years agoART: More ELF and oat file safety measures
Andreas Gampe [Thu, 11 Dec 2014 04:51:45 +0000 (20:51 -0800)]
ART: More ELF and oat file safety measures

In an ELF file, look for a shstrtab section when loading in
program-header-only mode. If the section is outside the file size,
it strongly indicates a broken compile.

When compiling oat files in the class linker, explicitly unlink
on failure. This should catch cases when dex2oat is killed or
crashes and doesn't have a chance to delete its (partial) output.

Bug: 15567083
Change-Id: Ia0c75f151d91c6f26a71696967255d6d409ca882

9 years agoam cba59c39: Merge "Link libsigchain.a instead of sigchain.o" into lmp-mr1-dev
Dmitriy Ivanov [Wed, 10 Dec 2014 22:19:47 +0000 (22:19 +0000)]
am cba59c39: Merge "Link libsigchain.a instead of sigchain.o" into lmp-mr1-dev

* commit 'cba59c39cc42fb661016c6677e89160937fe9e66':
  Link libsigchain.a instead of sigchain.o

9 years agoMerge "Link libsigchain.a instead of sigchain.o" into lmp-mr1-dev
Dmitriy Ivanov [Wed, 10 Dec 2014 22:13:46 +0000 (22:13 +0000)]
Merge "Link libsigchain.a instead of sigchain.o" into lmp-mr1-dev

9 years agoam 6aa9ebe9: Merge "Fix verifier bug caused by confusing ArtMethod::IsDirect vs ArtMe...
Brian Carlstrom [Wed, 10 Dec 2014 20:42:20 +0000 (20:42 +0000)]
am 6aa9ebe9: Merge "Fix verifier bug caused by confusing ArtMethod::IsDirect vs ArtMethod::IsStatic semantics." into lmp-mr1-dev

* commit '6aa9ebe9e90eda9433ec37b87ed883e9cc434ca2':
  Fix verifier bug caused by confusing ArtMethod::IsDirect vs ArtMethod::IsStatic semantics.

9 years agoMerge "Fix verifier bug caused by confusing ArtMethod::IsDirect vs ArtMethod::IsStati...
Brian Carlstrom [Wed, 10 Dec 2014 20:37:04 +0000 (20:37 +0000)]
Merge "Fix verifier bug caused by confusing ArtMethod::IsDirect vs ArtMethod::IsStatic semantics." into lmp-mr1-dev

9 years agoam ae2533bc: Merge "Ensure void type is resolved when running without image" into...
Sebastien Hertz [Wed, 10 Dec 2014 20:23:28 +0000 (20:23 +0000)]
am ae2533bc: Merge "Ensure void type is resolved when running without image" into lmp-mr1-dev

* commit 'ae2533bc91e04915335cc2d8a3c60021a3b3fade':
  Ensure void type is resolved when running without image

9 years agoMerge "Ensure void type is resolved when running without image" into lmp-mr1-dev
Sebastien Hertz [Wed, 10 Dec 2014 20:16:04 +0000 (20:16 +0000)]
Merge "Ensure void type is resolved when running without image" into lmp-mr1-dev

9 years agoLink libsigchain.a instead of sigchain.o
Dmitriy Ivanov [Mon, 20 Oct 2014 21:11:00 +0000 (14:11 -0700)]
Link libsigchain.a instead of sigchain.o

  Relative paths may sometimes lead to failed builds
  if sources are built in particular order.

  Also it is possible to export symbols from static lib
  with LOCAL_WHOLE_STATIC_LIBRARIES variable.

(cherry picked from commit e49a4f6db74f4e66486a6aaf6564f997a94e230f)

Bug: 18701723
Change-Id: I6d62594c2e84020d67254747c1fd465e1144920e

9 years agoEnsure void type is resolved when running without image
Sebastien Hertz [Tue, 9 Dec 2014 18:08:15 +0000 (19:08 +0100)]
Ensure void type is resolved when running without image

To initialize java.lang.Void correctly, we need to ensure the 'void'
class is initialized in the dex cache of core-libart (because Java
code relies on it). However, if we run without image, the dex cache
may not contain the void class before we initialize java.lang.Void
class.

This CL fixes this by forcing the resolution of 'void' class when
initializing the runtime without image.

We also generalize that to other types by not skipping verification
when running with preopted oat files without image. By verifying
all classes, we ensure all resolved types are in the dex caches.

Bug: 18338511
Change-Id: I65e345da47be6eda1ee55897c01a9a4cc1444915

9 years agoFix verifier bug caused by confusing ArtMethod::IsDirect vs ArtMethod::IsStatic seman...
Brian Carlstrom [Wed, 10 Dec 2014 04:15:42 +0000 (20:15 -0800)]
Fix verifier bug caused by confusing ArtMethod::IsDirect vs ArtMethod::IsStatic semantics.

Bug: 18485243

(cherry picked from commit be6fa5eb4a571e14481cf43f4cb264629c069153)

Change-Id: I6e4d8e7587f7e03288ce039471154c1e6ebc7d8a

9 years agoam ab0f981e: Merge "Support proxy method in StackVisitor::GetThisObject" into lmp...
Sebastien Hertz [Tue, 9 Dec 2014 22:19:49 +0000 (22:19 +0000)]
am ab0f981e: Merge "Support proxy method in StackVisitor::GetThisObject" into lmp-mr1-dev

* commit 'ab0f981e81d3c812cd34ca3e7be1e7f11ed8ca14':
  Support proxy method in StackVisitor::GetThisObject

9 years agoMerge "Support proxy method in StackVisitor::GetThisObject" into lmp-mr1-dev
Sebastien Hertz [Tue, 9 Dec 2014 21:53:37 +0000 (21:53 +0000)]
Merge "Support proxy method in StackVisitor::GetThisObject" into lmp-mr1-dev

9 years agoam 59f6b7a2: Merge "ART: GenLongArith has to clobber same operands for 2-op instr...
Bill Buzbee [Tue, 9 Dec 2014 20:13:10 +0000 (20:13 +0000)]
am 59f6b7a2: Merge "ART: GenLongArith has to clobber same operands for 2-op instr" into lmp-mr1-dev

* commit '59f6b7a22845421772daa12f2c7c97ffcdf3b037':
  ART: GenLongArith has to clobber same operands for 2-op instr

9 years agoam b837bd2b: Merge "ART: GenNegLong incorrectly handled register overlap for x86...
Bill Buzbee [Tue, 9 Dec 2014 20:13:09 +0000 (20:13 +0000)]
am b837bd2b: Merge "ART: GenNegLong incorrectly handled register overlap for x86" into lmp-mr1-dev

* commit 'b837bd2bbd29022b48dfbe7910002d3e139e65e4':
  ART: GenNegLong incorrectly handled register overlap for x86

9 years agoMerge "ART: GenLongArith has to clobber same operands for 2-op instr" into lmp-mr1-dev
Bill Buzbee [Tue, 9 Dec 2014 20:06:41 +0000 (20:06 +0000)]
Merge "ART: GenLongArith has to clobber same operands for 2-op instr" into lmp-mr1-dev

9 years agoMerge "ART: GenNegLong incorrectly handled register overlap for x86" into lmp-mr1-dev
Bill Buzbee [Tue, 9 Dec 2014 20:06:25 +0000 (20:06 +0000)]
Merge "ART: GenNegLong incorrectly handled register overlap for x86" into lmp-mr1-dev

9 years agoART: GenLongArith has to clobber same operands for 2-op instr
nikolay serdjuk [Thu, 13 Nov 2014 12:15:23 +0000 (18:15 +0600)]
ART: GenLongArith has to clobber same operands for 2-op instr

When we generate code for 'add-long/2addr v4, v4' and v4 is in
memory, we load v4 in a physical register, do operation and
store result in memory. After that, we should clobber the
physical register because it is not valid anymore.

Signed-off-by: nikolay serdjuk <nikolay.y.serdjuk@intel.com>
(cherry picked from commit 6b9356cf0feb2a4100798481869fd4d18180c29f)

Bug: 18671047
Bug: https://code.google.com/p/android/issues/detail?id=81542
Change-Id: Ie11e29cd32358ddbdccf66eaad46aa07f1269133

9 years agoART: GenNegLong incorrectly handled register overlap for x86
nikolay serdjuk [Mon, 10 Nov 2014 09:53:27 +0000 (16:53 +0700)]
ART: GenNegLong incorrectly handled register overlap for x86

There is a bug in the GenNegLong: it should invoke
   OpRegCopy(temp_reg, rl_result.reg.GetHigh());
instead of
   OpRegCopy(temp_reg, rl_result.reg);
But, anyway there is no need to handle the overlap
anymore because it is already handled in OpRegCopyWide()
which is invoked from StoreValueWide().
Signed-off-by: nikolay serdjuk <nikolay.y.serdjuk@intel.com>
(cherry picked from commit d24c9346138b7b8723461d94d9866762a59929d9)

Bug: 18671045
Bug: https://code.google.com/p/android/issues/detail?id=81544
Change-Id: I6d67a2a1507043c15de4616d0df59459630d4104

9 years agoSupport proxy method in StackVisitor::GetThisObject
Sebastien Hertz [Tue, 25 Nov 2014 15:30:53 +0000 (16:30 +0100)]
Support proxy method in StackVisitor::GetThisObject

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
(cherry picked from commit a836bc9760419af4a515f96c66100a39e865f3b9)

Change-Id: I09b5c1cdfc051d9395bba929d4650804eb3b1f7f