OSDN Git Service

android-x86/art.git
8 years agoRevert "Revert "ART: Reference.getReferent intrinsic for x86 and x86_64""
Serguei Katkov [Mon, 16 May 2016 05:53:15 +0000 (11:53 +0600)]
Revert "Revert "ART: Reference.getReferent intrinsic for x86 and x86_64""

This reverts commit 0997d24e67d78f2146ebae2888eda0d7d254789a.

ART_HEAP_POISONING=true mode is fixed.

Change-Id: I83f6d5c101ea6a86802753f81b3e4348a263fb21
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
8 years agoMerge "Fix JNIEnv-on-wrong-thread abort message."
Treehugger Robot [Fri, 13 May 2016 20:40:06 +0000 (20:40 +0000)]
Merge "Fix JNIEnv-on-wrong-thread abort message."

8 years agoFix JNIEnv-on-wrong-thread abort message.
Daniel Erat [Wed, 11 May 2016 00:07:18 +0000 (18:07 -0600)]
Fix JNIEnv-on-wrong-thread abort message.

Update an incorrect abort message that claimed that thread A
was using the JNIEnv from thread A (when the JNIEnv was in
fact from another thread). Now, the message is e.g.

  JNI DETECTED ERROR IN APPLICATION: thread
  Thread[1,tid=628,Native,Thread*=0xb038b400,peer=0x75efc1f0,"main"]
  using JNIEnv* from thread
  Thread[6,tid=640,Runnable,Thread*=0xaa890800,peer=0x12c00ca0,"Binder:628_1"]

Change-Id: I877a78c47e88d1e8a28bade8ea40be6bed58439f

8 years agoMerge "Use _exit instead of exit for the system exit."
Hiroshi Yamauchi [Fri, 13 May 2016 18:07:16 +0000 (18:07 +0000)]
Merge "Use _exit instead of exit for the system exit."

8 years agoMerge "Ensure that java.lang.reflect.Field is initialized"
Przemyslaw Szczepaniak [Fri, 13 May 2016 12:26:22 +0000 (12:26 +0000)]
Merge "Ensure that java.lang.reflect.Field is initialized"

8 years agoEnsure that java.lang.reflect.Field is initialized
Przemyslaw Szczepaniak [Thu, 12 May 2016 13:55:48 +0000 (14:55 +0100)]
Ensure that java.lang.reflect.Field is initialized

Recent change in libcore (a move of clinit code
to register function for java.net.InetAddress
class) was triggering a failure in 119-noimage-patchoat
test. Failure was occurring when the test was running
without the image. This was caused by the
java.lang.reflect.Field not being initialized when
running InetAddress.<clinit>, which is a side effect
of calling JNIEnv->GetMethodId inside the libcore JNI_OnLoad.

This changes makes sure that this class is initialized
when we're running without image.

Bug: 28153851
Change-Id: I8aeb5eb312a163c452c40b851112544a8340e488

8 years agoMerge "Revert "ART: Reference.getReferent intrinsic for x86 and x86_64""
Nicolas Geoffray [Fri, 13 May 2016 09:30:18 +0000 (09:30 +0000)]
Merge "Revert "ART: Reference.getReferent intrinsic for x86 and x86_64""

8 years agoRevert "ART: Reference.getReferent intrinsic for x86 and x86_64"
Nicolas Geoffray [Fri, 13 May 2016 09:29:01 +0000 (09:29 +0000)]
Revert "ART: Reference.getReferent intrinsic for x86 and x86_64"

Fails heap poisoning configuration.

This reverts commit afdc97ebcb4e58afb7cf54d846d30314e6499d83.

Change-Id: I50e53756a2b85059b89cfb8950f8c9e2b032743c

8 years agoMerge "Fix oatdump crash on arm64/arm code. Also adds 16 bit literal information."
Aart Bik [Thu, 12 May 2016 18:53:32 +0000 (18:53 +0000)]
Merge "Fix oatdump crash on arm64/arm code. Also adds 16 bit literal information."

8 years agoMerge "Don't expect permission to open foreign dex use marks."
Treehugger Robot [Thu, 12 May 2016 17:13:48 +0000 (17:13 +0000)]
Merge "Don't expect permission to open foreign dex use marks."

8 years agoMerge "Hold a ClassLoader reference in NativeAllocationRegistry."
Richard Uhler [Thu, 12 May 2016 17:05:13 +0000 (17:05 +0000)]
Merge "Hold a ClassLoader reference in NativeAllocationRegistry."

8 years agoFix oatdump crash on arm64/arm code.
Aart Bik [Wed, 11 May 2016 17:30:47 +0000 (10:30 -0700)]
Fix oatdump crash on arm64/arm code.
Also adds 16 bit literal information.

Rationale:
When "run-away" instructions are disassembled, the literal
addresses may go out of range, causing oatdump to crash.
This CL guards memory access against the full memory range
allocated to assembly instructions and data (it is possible
but not really necessary to refine this a bit). Out of range
arguments are now displayed as (?) to denote the issue, which
is a lot nicer than crashing.

BUG=28670871

Change-Id: I51e9b6a6a99162546fe31059f14278e8980451c2

8 years agoDon't expect permission to open foreign dex use marks.
Richard Uhler [Tue, 10 May 2016 21:01:18 +0000 (14:01 -0700)]
Don't expect permission to open foreign dex use marks.

sepolicy says we can create the mark files, but open requires
additional permissions we don't need. Don't print a warning when we
aren't given those additional permissions.

Bug: 28241500

(cherry picked from commit 12e4157666bfdc2ca38f459f6447385b80c7ddff)

Change-Id: I272befdb4fa58a0adf550fde52ddab5b5f5a9fe3

8 years agoMerge "ART: Reference.getReferent intrinsic for x86 and x86_64"
Roland Levillain [Thu, 12 May 2016 15:28:38 +0000 (15:28 +0000)]
Merge "ART: Reference.getReferent intrinsic for x86 and x86_64"

8 years agoMerge "Fix another case of live_in at irreducible loop entry."
Nicolas Geoffray [Thu, 12 May 2016 07:58:53 +0000 (07:58 +0000)]
Merge "Fix another case of live_in at irreducible loop entry."

8 years agoFix another case of live_in at irreducible loop entry.
Nicolas Geoffray [Tue, 10 May 2016 13:35:34 +0000 (14:35 +0100)]
Fix another case of live_in at irreducible loop entry.

GVN was implicitly extending the liveness of an instruction across
an irreducible loop.

Fix this problem by clearing the value set at loop entries that contain
an irreducible loop.

bug:28252896

(cherry picked from commit 77ce6430af2709432b22344ed656edd8ec80581b)

Change-Id: Ie0121e83b2dfe47bcd184b90a69c0194d13fce54

8 years agoUse _exit instead of exit for the system exit.
Hiroshi Yamauchi [Thu, 12 May 2016 02:27:44 +0000 (19:27 -0700)]
Use _exit instead of exit for the system exit.

We get DCHECK failures in ~Mutex() called from an atexit handler on
System.exit() in some tests. To avoid it, use _exit instead of exit.

Bug: 28106055
Change-Id: I2a6d2ad8170327553c9c9f0049829e3fd3937180

8 years agoMerge "Add histogram for native allocations"
Mathieu Chartier [Wed, 11 May 2016 21:57:28 +0000 (21:57 +0000)]
Merge "Add histogram for native allocations"

8 years agoAdd histogram for native allocations
Mathieu Chartier [Wed, 11 May 2016 18:35:39 +0000 (11:35 -0700)]
Add histogram for native allocations

Shows up in traces.txt, sample output:
Histogram of native allocation 0:4315,131072:33,1179648:3 bucket size 131072
Histogram of native free 0:995,131072:19,1179648:2 bucket size 131072

Bug: 28680116

(cherry picked from commit 0dce75dc6945c221a054eb9c479fb60efd193719)

Change-Id: Iaa07c6b8da0d6bab64a8fd4af8a02fc0b8c70e9e

8 years agoMerge "Prevent ArtMethod clearing race"
Mathieu Chartier [Wed, 11 May 2016 20:57:07 +0000 (20:57 +0000)]
Merge "Prevent ArtMethod clearing race"

8 years agoPrevent ArtMethod clearing race
Mathieu Chartier [Wed, 11 May 2016 01:13:20 +0000 (18:13 -0700)]
Prevent ArtMethod clearing race

There was race condition where the GC would be visiting the methods
of a class while the class linker overwrote the contents with 0xFE
when copying to a new array.

Since the GC is holding the class table lock at this time, we can
use this lock in the class linker to prevent the race.

Bug: 28699001
Change-Id: I91ca2406ef723e7be69cd1c53f4bafa2e5f63657

8 years agoMerge "Revert "Revert "Make run-test default to optimizing compiler."""
Alex Light [Wed, 11 May 2016 16:14:01 +0000 (16:14 +0000)]
Merge "Revert "Revert "Make run-test default to optimizing compiler."""

8 years agoMerge "Add cmpb instruction to x86 and x86_64 assembler"
Roland Levillain [Wed, 11 May 2016 09:33:22 +0000 (09:33 +0000)]
Merge "Add cmpb instruction to x86 and x86_64 assembler"

8 years agoMerge "Revert "Blacklist test.""
Nicolas Geoffray [Wed, 11 May 2016 07:36:05 +0000 (07:36 +0000)]
Merge "Revert "Blacklist test.""

8 years agoRevert "Blacklist test."
Nicolas Geoffray [Wed, 11 May 2016 07:35:43 +0000 (07:35 +0000)]
Revert "Blacklist test."

bug:28574453

This reverts commit e85dff7f4c4621f65153be56994b4bb4ad00190f.

Change-Id: I95218cd90d696dd1db95eda05817bdd43ccfff9e

8 years agoMerge "Revert some flaky unloading"
Mathieu Chartier [Wed, 11 May 2016 01:11:02 +0000 (01:11 +0000)]
Merge "Revert some flaky unloading"

8 years agoRevert some flaky unloading
Mathieu Chartier [Wed, 11 May 2016 00:31:48 +0000 (17:31 -0700)]
Revert some flaky unloading

Revert "Revert "Revert "Remove double unloading hack"""

This reverts commit c0f2e678e45ff191f90651117f4e238caa521b80.

Revert "Revert "Revert "Revert "Revert "(dl)Close native libraries on unload"""""

This reverts commit 33bae7d52debe898879fc034a5524b1b165dbd88.

Still flaky.

Bug: 28406866

Change-Id: I31a9ace17c676ac615ed04a9f4ac51582fca55d9

8 years agoMerge changes I11f1f820,Iafec1f83
Mathieu Chartier [Tue, 10 May 2016 20:43:02 +0000 (20:43 +0000)]
Merge changes I11f1f820,Iafec1f83

* changes:
  Revert "Revert "Revert "Revert "(dl)Close native libraries on unload""""
  Revert "Revert "Remove double unloading hack""

8 years agoMerge "Break the debug cycle!"
Aart Bik [Tue, 10 May 2016 19:20:32 +0000 (19:20 +0000)]
Merge "Break the debug cycle!"

8 years agoMerge "Make all java.lang.reflect.Constructor methods handle proxies."
Alex Light [Tue, 10 May 2016 18:05:16 +0000 (18:05 +0000)]
Merge "Make all java.lang.reflect.Constructor methods handle proxies."

8 years agoMerge "Add ability to see if a dex file is backed by an oat file."
Treehugger Robot [Tue, 10 May 2016 17:47:38 +0000 (17:47 +0000)]
Merge "Add ability to see if a dex file is backed by an oat file."

8 years agoRevert "Revert "Make run-test default to optimizing compiler.""
Alex Light [Tue, 10 May 2016 17:01:22 +0000 (10:01 -0700)]
Revert "Revert "Make run-test default to optimizing compiler.""

This reverts commit 4650c939e8590b2d421241023e359260b1b59bf1.

Change-Id: I3814c6a579d3d88222b53d7ae63a2d4b03b620a7

8 years agoMerge "Fix issue with Constructor proxies."
Alex Light [Tue, 10 May 2016 17:17:46 +0000 (17:17 +0000)]
Merge "Fix issue with Constructor proxies."

8 years agoRevert "Revert "Revert "Revert "(dl)Close native libraries on unload""""
Mathieu Chartier [Tue, 10 May 2016 17:12:00 +0000 (10:12 -0700)]
Revert "Revert "Revert "Revert "(dl)Close native libraries on unload""""

This reverts commit 624b68ecbe67dd91cb50f588fbfa2243def47f1e.

8 years agoRevert "Revert "Remove double unloading hack""
Mathieu Chartier [Tue, 10 May 2016 17:11:48 +0000 (10:11 -0700)]
Revert "Revert "Remove double unloading hack""

This reverts commit e9cae49599856fe737cee87783438d2c5dabccfe.

8 years agoBreak the debug cycle!
Aart Bik [Thu, 5 May 2016 22:10:42 +0000 (15:10 -0700)]
Break the debug cycle!

Rationale:
When entering the path that implements method invocation,
it is possible for the interpreter and JIT to cycle around
trying to interpret or compile a method, never making a
decision. This bug fix avoids such cycling with a minimum
of extra runtime overhead.

BUG=28537292

Change-Id: If805b7bc0279019d0ebf322ddd17cb57a9e884eb

8 years agoAdd ability to see if a dex file is backed by an oat file.
Jeff Hao [Fri, 22 Apr 2016 21:00:06 +0000 (14:00 -0700)]
Add ability to see if a dex file is backed by an oat file.

Native support for new DexFile.isBackedByOatFile.

Part of a multi-project change.

Bug: 26880306

(cherry-picked from commit 93a66cc779898d46c620e5d9c8bc71e2a71f6610)

Change-Id: I8843d13d961b24a7caec549abe630524d734e78e

8 years agoFix issue with Constructor proxies.
Alex Light [Mon, 9 May 2016 22:31:18 +0000 (15:31 -0700)]
Fix issue with Constructor proxies.

Bug: 28659889
Change-Id: I4307916c79e7b56608c3ff5c9bbe83e175254f28

8 years agoHold a ClassLoader reference in NativeAllocationRegistry.
Richard Uhler [Tue, 3 May 2016 20:05:50 +0000 (13:05 -0700)]
Hold a ClassLoader reference in NativeAllocationRegistry.

So that the native library isn't unloaded before we have a chance to
call the freeFunction.

Bug: 28406866

(cherry picked from commit 7d3c7390a8cbeff12fe790e5d12da6e07cf8c298)

Change-Id: I38edb9ba6855ef98743001e4bbf4fd80fb27873d

8 years agoMerge "Intrinsify String.length() and String.isEmpty() as HIR."
Vladimir Marko [Tue, 10 May 2016 14:30:06 +0000 (14:30 +0000)]
Merge "Intrinsify String.length() and String.isEmpty() as HIR."

8 years agoMerge "DexFile: Add an API to query oat file status."
Narayan Kamath [Tue, 10 May 2016 14:05:52 +0000 (14:05 +0000)]
Merge "DexFile: Add an API to query oat file status."

8 years agoMerge "Reduce memory usage of SSA Phi elimination and make it faster."
Treehugger Robot [Tue, 10 May 2016 13:47:54 +0000 (13:47 +0000)]
Merge "Reduce memory usage of SSA Phi elimination and make it faster."

8 years agoReduce memory usage of SSA Phi elimination and make it faster.
Vladimir Marko [Tue, 10 May 2016 12:31:23 +0000 (13:31 +0100)]
Reduce memory usage of SSA Phi elimination and make it faster.

Use an ArenaBitVector instead of an ArenaSet<> that leaks
its allocated memory on clear(). We were also erroneously
using the O(n) helper ContainsElement() for the ArenaSet<>
instead of the O(log n) ArenaSet<>::find() which made the
methods with large number of processed Phis also very slow
to compile in addition to the enormous memory usage.

Bug: 28684584
Change-Id: Idc7604e51cfae643debd0378baf828a1430ec14c

8 years agoDexFile: Add an API to query oat file status.
Narayan Kamath [Mon, 2 May 2016 12:14:48 +0000 (13:14 +0100)]
DexFile: Add an API to query oat file status.

Adds DexFile.getDexFileStatus(path), which returns an opaque,
human-readable string representation of the oat file status. This
representation isn't guaranteed to be stable and can change from
release to release.

bug: 27494108

(cherry picked from commit cd7e7f78b8e97c1f6419f3f44e0d5fdc6eddfdc6)

Change-Id: If6997f7d28d022e118ffea1eec6183841577a637

8 years agoMerge "Revert "Make run-test default to optimizing compiler.""
Nicolas Geoffray [Tue, 10 May 2016 09:13:29 +0000 (09:13 +0000)]
Merge "Revert "Make run-test default to optimizing compiler.""

8 years agoRevert "Make run-test default to optimizing compiler."
Nicolas Geoffray [Tue, 10 May 2016 09:13:13 +0000 (09:13 +0000)]
Revert "Make run-test default to optimizing compiler."

454 and 457 fail with interpreter access checks.

This reverts commit f494663ab5295fadf7209a9a1bead05be5039858.

Change-Id: Iaff6036e83e1745f4ed00b8d6814abd5759c6854

8 years agoMerge "Fix braino when parsing invoke transition weight."
Treehugger Robot [Tue, 10 May 2016 09:11:00 +0000 (09:11 +0000)]
Merge "Fix braino when parsing invoke transition weight."

8 years agoMerge "Attribute arena allocations previously marked as STL."
Vladimir Marko [Tue, 10 May 2016 08:55:58 +0000 (08:55 +0000)]
Merge "Attribute arena allocations previously marked as STL."

8 years agoFix braino when parsing invoke transition weight.
Nicolas Geoffray [Fri, 6 May 2016 15:52:36 +0000 (16:52 +0100)]
Fix braino when parsing invoke transition weight.

bug:27865109

(cherry picked from commit 95bc2f29ef2e9e6b7a71cd123df0c4a1063be1d7)

Change-Id: I56e21714bf803b8fefa2bd8087cd385c7a57564c

8 years agoMerge "Workaround invokesuper underspecified behavior."
Nicolas Geoffray [Tue, 10 May 2016 08:13:27 +0000 (08:13 +0000)]
Merge "Workaround invokesuper underspecified behavior."

8 years agoMerge "Relax the DCHECK in load store elimination."
Nicolas Geoffray [Tue, 10 May 2016 08:12:41 +0000 (08:12 +0000)]
Merge "Relax the DCHECK in load store elimination."

8 years agoART: Reference.getReferent intrinsic for x86 and x86_64
Serguei Katkov [Thu, 5 May 2016 07:42:59 +0000 (13:42 +0600)]
ART: Reference.getReferent intrinsic for x86 and x86_64

Change-Id: I7a7ac9244847dd80d9fa4e4b5ebc5bf451c628ff
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
8 years agoMerge "Remove a common subexpression from profman output"
David Sehr [Tue, 10 May 2016 04:24:17 +0000 (04:24 +0000)]
Merge "Remove a common subexpression from profman output"

8 years agoMerge "Use delete/delete[] rather than free/realloc in tracedump"
David Sehr [Tue, 10 May 2016 01:06:47 +0000 (01:06 +0000)]
Merge "Use delete/delete[] rather than free/realloc in tracedump"

8 years agoMerge "Initialize native loader before starting runtime"
Dimitry Ivanov [Tue, 10 May 2016 00:44:07 +0000 (00:44 +0000)]
Merge "Initialize native loader before starting runtime"

8 years agoMerge "Make --jvm work again"
Treehugger Robot [Tue, 10 May 2016 00:20:57 +0000 (00:20 +0000)]
Merge "Make --jvm work again"

8 years agoMake all java.lang.reflect.Constructor methods handle proxies.
Alex Light [Mon, 9 May 2016 23:25:11 +0000 (16:25 -0700)]
Make all java.lang.reflect.Constructor methods handle proxies.

Bug: 28676926
Change-Id: If5e7f1c886334ce0ea2e3e2b64616eddf69c9377

8 years agoInitialize native loader before starting runtime
Dimitry Ivanov [Mon, 9 May 2016 23:26:13 +0000 (16:26 -0700)]
Initialize native loader before starting runtime

Loading public libraries before everything else
to prevent situation when libssl.so gets into
libopenjdk.so load group which then prevented
from unloading by a global library referencing
the very same libssl.so

Bug: http://b/28449304
Change-Id: I3bbff3cc6926c2377ae5cb5b7b5b5d6e26ea4470

8 years agoMake --jvm work again
Alex Light [Mon, 9 May 2016 23:21:09 +0000 (16:21 -0700)]
Make --jvm work again

A previous commit broke --jvm by making it be passed dex2oat args. Fix
this bug.

Change-Id: I22864ef876c7b3c174af029fe2f1a76cf7825fa7

8 years agoRemove a common subexpression from profman output
David Sehr [Fri, 6 May 2016 19:29:35 +0000 (12:29 -0700)]
Remove a common subexpression from profman output

Change-Id: I12fa4a36f4e9d980a720bb52c6b736ffc91a6700
(cherry picked from commit 727074b62ef86dfb631a99214e6726d7d9c6c6be)

8 years agoUse delete/delete[] rather than free/realloc in tracedump
David Sehr [Fri, 6 May 2016 21:12:23 +0000 (14:12 -0700)]
Use delete/delete[] rather than free/realloc in tracedump

Bug: 28587945
Change-Id: I62281a956503b4351a36d6798bcd61e408b448f6

8 years agoMerge "Revert "Revert "Assembly RegionTLAB allocation fast path for x86_64"""
Treehugger Robot [Mon, 9 May 2016 19:57:08 +0000 (19:57 +0000)]
Merge "Revert "Revert "Assembly RegionTLAB allocation fast path for x86_64"""

8 years agoIntrinsify String.length() and String.isEmpty() as HIR.
Vladimir Marko [Thu, 28 Apr 2016 12:10:02 +0000 (13:10 +0100)]
Intrinsify String.length() and String.isEmpty() as HIR.

Use HArrayLength for String.length() in anticipation of
changing the String.charAt() to HBoundsCheck+HArrayGet to
allow the existing BCE to seamlessly work for strings.
Use HArrayLength+HEqual for String.isEmpty().

We previously relied on inlining but we now want to apply
the new intrinsics even when we do not inline, i.e. when
compiling debuggable (as is currently the case for boot
image) or when we hit inlining limits, i.e. depth, size,
or the number of accumulated dex registers.

Bug: 28330359
Change-Id: Iab9d2f6d2967bdd930a72eb461f27efe8f37c103

8 years agoAttribute arena allocations previously marked as STL.
Vladimir Marko [Mon, 9 May 2016 19:23:34 +0000 (20:23 +0100)]
Attribute arena allocations previously marked as STL.

Bug: 28603175
Change-Id: I488e39b23afb86f3ff5a2df16d2df59eb3adaa0f

8 years agoMerge "Fix ProtoId ordering check in DexFileVerifier."
Vladimir Marko [Mon, 9 May 2016 16:58:28 +0000 (16:58 +0000)]
Merge "Fix ProtoId ordering check in DexFileVerifier."

8 years agoMerge "Make run-test default to optimizing compiler."
Alex Light [Mon, 9 May 2016 16:36:25 +0000 (16:36 +0000)]
Merge "Make run-test default to optimizing compiler."

8 years agoMerge "Improve String.indexOf() intrinsics."
Vladimir Marko [Mon, 9 May 2016 14:59:20 +0000 (14:59 +0000)]
Merge "Improve String.indexOf() intrinsics."

8 years agoMerge "Revert "Remove double unloading hack""
Nicolas Geoffray [Mon, 9 May 2016 08:48:28 +0000 (08:48 +0000)]
Merge "Revert "Remove double unloading hack""

8 years agoRevert "Remove double unloading hack"
Nicolas Geoffray [Mon, 9 May 2016 08:48:08 +0000 (08:48 +0000)]
Revert "Remove double unloading hack"

Needed after dlclose revert.

This reverts commit b408e583385dbf256514885e1671db1b2f633f58.

Change-Id: I0a83af2462f5a51b12d6ee97d70f62b44e487dd5

8 years agoMerge "Revert "Revert "Revert "(dl)Close native libraries on unload""""
Nicolas Geoffray [Mon, 9 May 2016 08:35:46 +0000 (08:35 +0000)]
Merge "Revert "Revert "Revert "(dl)Close native libraries on unload""""

8 years agoRevert "Revert "Revert "(dl)Close native libraries on unload"""
Nicolas Geoffray [Mon, 9 May 2016 08:33:13 +0000 (08:33 +0000)]
Revert "Revert "Revert "(dl)Close native libraries on unload"""

Still flakes on our tests.

This reverts commit 727d6dff8fce26f7f3a252177cc730fbfcbc52ee.

Change-Id: If14076ba9fe91934294c24a23f53d55d88d76fb7

8 years agoMerge "Fix test for verification of clinit method"
Treehugger Robot [Sat, 7 May 2016 01:45:51 +0000 (01:45 +0000)]
Merge "Fix test for verification of clinit method"

8 years agoFix test for verification of clinit method
Alex Light [Sat, 7 May 2016 00:36:36 +0000 (17:36 -0700)]
Fix test for verification of clinit method

Bug: 28605638
Change-Id: Idbf2d59c20b7dda1efb9aa61bce2cefbe2c0040a

8 years agoMerge "Make <clinit> verification stronger for v37+."
Alex Light [Fri, 6 May 2016 21:33:46 +0000 (21:33 +0000)]
Merge "Make <clinit> verification stronger for v37+."

8 years agoMake <clinit> verification stronger for v37+.
Alex Light [Fri, 6 May 2016 17:39:06 +0000 (10:39 -0700)]
Make <clinit> verification stronger for v37+.

Preserve the verification behavior of M for v35 dex files. v37+ get
stronger behavior

Bug: 28605638
Change-Id: If1ff4abcc61e0945f924fe4e10e173c03b4cd1a9

8 years agoMerge "Fix libart tests on target"
Dimitry Ivanov [Fri, 6 May 2016 19:44:15 +0000 (19:44 +0000)]
Merge "Fix libart tests on target"

8 years agoFix libart tests on target
Dimitry Ivanov [Fri, 6 May 2016 00:24:28 +0000 (17:24 -0700)]
Fix libart tests on target

1. Add libart/d.so to the list of additional public libraries
2. Fix java.library.path to include /system/lib(64)? for tests
   run by dalvikvm

Bug: http://b/28449304
Change-Id: I11f2dc22e445389160d6f7ed6743bb9664cf3745

8 years agoImprove String.indexOf() intrinsics.
Vladimir Marko [Fri, 6 May 2016 14:52:12 +0000 (15:52 +0100)]
Improve String.indexOf() intrinsics.

If the code point input is a char, we don't need the slow
path. Also improve the slow-path check (if we do need it)
on arm and arm64 to avoid loading 0xffff into a register.

Bug: 28330359
Change-Id: Ie6514c16126717bb0b11e3c7ab2b60eaa70fed4c

8 years agoMerge "Optimizing: LoadString may not have any side effects."
Vladimir Marko [Fri, 6 May 2016 14:46:47 +0000 (14:46 +0000)]
Merge "Optimizing: LoadString may not have any side effects."

8 years agoMerge "ART: Fix dominance for irreducible loops"
David Brazdil [Fri, 6 May 2016 13:45:50 +0000 (13:45 +0000)]
Merge "ART: Fix dominance for irreducible loops"

8 years agoWorkaround invokesuper underspecified behavior.
Aart Bik [Tue, 5 Apr 2016 00:28:59 +0000 (17:28 -0700)]
Workaround invokesuper underspecified behavior.

The verifier allows invokesuper on a class unrelated
to the referring class. However, the runtime uses the vtable of
the super class of the referring class to lookup the ArtMethod.
Since the receiver has no relation to the referring class, this lead
to either jumping to a wrong method, or "luckily" throw a
NoSuchMethodError if the vtable index is out of bounds of the super
class of the referring class.

This changes the runtime behavior to always throw NoSuchMethodError
when hitting such invokesuper.

Also, we make the verifier consistent with the runtime by treating
such calls unresolved.

bug=27627004

Change-Id: I68486501a9625f91679078c5a980b39974ddbf1c

8 years agoART: Fix dominance for irreducible loops
David Brazdil [Fri, 6 May 2016 11:46:21 +0000 (12:46 +0100)]
ART: Fix dominance for irreducible loops

Computation of dominance was broken in the presence of irreducible
loops because the algorithm assumed that back edges are always
dominated by their respective headers and a fix-point iteration is
therefore unnecessary.

This is not true for irreducible loops, forcing us to revisit their
loop headers and all dependent blocks. This patch adds a fix-point
iteration if a back edge not dominated by its header is found.

Bug: 28611485
Change-Id: If84044e49d5b9c682949648033d2861628d7fe05

8 years agoAdd cmpb instruction to x86 and x86_64 assembler
Serguei Katkov [Fri, 6 May 2016 04:24:17 +0000 (10:24 +0600)]
Add cmpb instruction to x86 and x86_64 assembler

Change-Id: I43f41ef2fdf6475238f0987842aefb1c2eb6a36d
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
8 years agoMerge "Stop populating irreducible loop at header"
David Brazdil [Fri, 6 May 2016 10:47:18 +0000 (10:47 +0000)]
Merge "Stop populating irreducible loop at header"

8 years agoMerge "Fix test with libarttest.so."
Nicolas Geoffray [Fri, 6 May 2016 09:10:16 +0000 (09:10 +0000)]
Merge "Fix test with libarttest.so."

8 years agoFix test with libarttest.so.
Nicolas Geoffray [Fri, 6 May 2016 09:08:36 +0000 (10:08 +0100)]
Fix test with libarttest.so.

We used to always skip it as kIsDebugBuild was true for
libarttest.so and libarttestd.so.

Change-Id: I1a5efbba8c2f9d63af824ed727154794aaea8d29

8 years agoMerge "Fix index checks for error strings in DexFileVerifier."
Vladimir Marko [Fri, 6 May 2016 07:58:53 +0000 (07:58 +0000)]
Merge "Fix index checks for error strings in DexFileVerifier."

8 years agoMerge "Add braces per the coding convention"
David Sehr [Fri, 6 May 2016 04:56:05 +0000 (04:56 +0000)]
Merge "Add braces per the coding convention"

8 years agoMerge "Remove double unloading hack"
Mathieu Chartier [Fri, 6 May 2016 02:59:01 +0000 (02:59 +0000)]
Merge "Remove double unloading hack"

8 years agoRemove double unloading hack
Mathieu Chartier [Fri, 6 May 2016 02:55:03 +0000 (19:55 -0700)]
Remove double unloading hack

No longer required since we unload native libraries.

Bug: 28406866
Change-Id: I9ae39b4f2ef0bf6d70c5b7df3e275d36b01ca472

8 years agoAdd braces per the coding convention
David Sehr [Thu, 5 May 2016 20:39:43 +0000 (13:39 -0700)]
Add braces per the coding convention

Bug: 28599906
Change-Id: Ie2cb4f6865b7756ceaf65c400a4090fc9423232a
(cherry picked from commit 64b0f0bf5b03fc53282f61c1d2d2dc6b8c7e7a3e)

8 years agoMerge "Fix libarttest to be non debug"
Mathieu Chartier [Fri, 6 May 2016 00:18:13 +0000 (00:18 +0000)]
Merge "Fix libarttest to be non debug"

8 years agoFix libarttest to be non debug
Mathieu Chartier [Thu, 5 May 2016 22:31:12 +0000 (15:31 -0700)]
Fix libarttest to be non debug

Previously both libarttest and libarttestd had debug enabled. This
made it hard to know which one was loaded (couldn't look at
kIsDebugBuild).

Fixes test 136 with ART_TEST_RUN_TEST_NDEBUG configuration.

Bug: 28406866

Change-Id: I92983f71374b211f96f5b346fec326ea8543f876

8 years agoMake run-test default to optimizing compiler.
Alex Light [Thu, 5 May 2016 22:45:29 +0000 (15:45 -0700)]
Make run-test default to optimizing compiler.

Quick compiler is dead.

Change-Id: I88d83a9935a81a38ca2a02bd3168c35b81a791da

8 years agoMerge "Limit profman log spam with time threshold"
David Sehr [Thu, 5 May 2016 22:35:55 +0000 (22:35 +0000)]
Merge "Limit profman log spam with time threshold"

8 years agoMerge "Fix assert failure in interpreter after deoptimization."
Mingyao Yang [Thu, 5 May 2016 20:52:29 +0000 (20:52 +0000)]
Merge "Fix assert failure in interpreter after deoptimization."

8 years agoLimit profman log spam with time threshold
David Sehr [Thu, 5 May 2016 16:02:38 +0000 (09:02 -0700)]
Limit profman log spam with time threshold

Bug: 28599906
Change-Id: Ibe1001da94c7916761c8f3b4b5dbacd8cf3809a7
(cherry picked from commit 305ed710a8ea732e59bdc782121dea3389adc357)

8 years agoMerge changes I8fab78bc,I8aae0d75
Mathieu Chartier [Thu, 5 May 2016 18:56:14 +0000 (18:56 +0000)]
Merge changes I8fab78bc,I8aae0d75

* changes:
  Change test 136 to use dlopen
  Revert "Revert "(dl)Close native libraries on unload""

8 years agoFix assert failure in interpreter after deoptimization.
Mingyao Yang [Thu, 28 Apr 2016 23:23:01 +0000 (16:23 -0700)]
Fix assert failure in interpreter after deoptimization.

There is code that does
  new String(chararr, 0, chararr_count);
which under debuggable turns into a call into pNewEmptyString() plus a
call into pNewStringFromChars_CII().
Even though we currently don't patch return pc in a runtime method,
calling into pNewEmptyString() is special since it's hacked such
that it's acting as if the caller calls into the java method
StringFactory.newEmptyString() directly. So deoptimization can now
happen at the NewEmptyString site and the assert is triggered since
it's a new instance instead of an invoke instruction.

The fix relaxes the assert to allow the special case.

Bug: 28555675
Change-Id: Idbb159b5aa450df2344cd93ae74fef5f55bdc534

8 years agoChange test 136 to use dlopen
Mathieu Chartier [Thu, 5 May 2016 18:09:58 +0000 (11:09 -0700)]
Change test 136 to use dlopen

dlopen self to prevent the native libary being closed from
DestroyJavaVM. We need this since it is the library currently
executing code.

Bug: 28406866

Change-Id: I8fab78bc7c27f5c03a6670d20d5cf8e44295d5e2