OSDN Git Service

android-x86/art.git
8 years agoART: Add (Fpu)RegHigh stack map location kinds
David Brazdil [Tue, 25 Aug 2015 12:52:43 +0000 (13:52 +0100)]
ART: Add (Fpu)RegHigh stack map location kinds

When running Optimized code on 64-bit, high value of vreg pair may be
stored in the high 32 bits of a CPU register. This is not reflected in
stack maps which would encode both the low and high vreg as
kInRegister with the same register number, making it indistinguishable
from two non-wide vregs with the same value in the lower 32 bits.

Deoptimization deals with this by running the verifier and thus
obtaining vreg pair information, but this would be too slow for try/
catch. This patch therefore adds two new stack map location kinds:
kInRegisterHigh and kInFpuRegisterHigh to differentiate between the
two cases.

Note that this also applies to floating-point registers on x86.

Change-Id: I15092323e56a661673e77bee1f0fca4261374732

8 years agoMerge "Revert "Fix deoptimization with pending exception""
Sebastien Hertz [Tue, 25 Aug 2015 15:05:54 +0000 (15:05 +0000)]
Merge "Revert "Fix deoptimization with pending exception""

8 years agoRevert "Fix deoptimization with pending exception"
Sebastien Hertz [Tue, 25 Aug 2015 15:05:17 +0000 (15:05 +0000)]
Revert "Fix deoptimization with pending exception"

This reverts commit 54b62480636ae846d705fc180c7bd6cd08ec1e42.

This is causing test failures with Optimizing compiler.

Bug: 23371176
Bug: 19944235
Change-Id: Ie3ffbcf2b6d2ca8bc93cb008a4e29a7567d04a7c

8 years agoMerge "Fix deoptimization with pending exception"
Sebastien Hertz [Tue, 25 Aug 2015 14:04:14 +0000 (14:04 +0000)]
Merge "Fix deoptimization with pending exception"

8 years agoFix deoptimization with pending exception
Sebastien Hertz [Thu, 20 Aug 2015 10:07:57 +0000 (12:07 +0200)]
Fix deoptimization with pending exception

When deoptimizing the stack, we set a fake exception in the current
Thread* (see method Thread::GetDeoptimizationException). On the next
exception check, the QuickExceptionHandler will deoptimize the stack.

The issue is when we deoptimize while an exception is already pending
in the current Thread*: setting the fake exception will clobber the
pending exception which is not correct. This happens in the
artQuickToInterpreterBridge when returning from the interpreter and
we want to deoptimize the stack for debugging (like single-stepping).

This CL saves the pending exception before asking for deoptimization.
Then the exception is restored just before executing the deoptimized
frames with the interpreter.

Also cleans up the way we save deoptimization context (return value
and pending exception).

Bug: 23371176
Bug: 19944235
Change-Id: I7f4c8347b328817c452beda3399e210eba3a88a4

8 years agoMerge "Revert "Move annotations to native.""
Roland Levillain [Tue, 25 Aug 2015 12:07:47 +0000 (12:07 +0000)]
Merge "Revert "Move annotations to native.""

8 years agoRevert "Move annotations to native."
Roland Levillain [Tue, 25 Aug 2015 10:53:19 +0000 (10:53 +0000)]
Revert "Move annotations to native."

This reverts commit 0042c6d49b8488c78f0b937063e316e8d6244439.

Reverting this change (as well as the companion CL
https://android-review.googlesource.com/#/c/167510/ in
platform/libcore) as they make libcore test
libcore.java.lang.reflect.ProxyTest#test24846 fail.

Change-Id: Ie0676cabb128277c7df5dab7bde17aefd3b2c09c

8 years agoMerge "ART: Add VLOG printing of SetStatus(Error)"
Andreas Gampe [Tue, 25 Aug 2015 05:02:46 +0000 (05:02 +0000)]
Merge "ART: Add VLOG printing of SetStatus(Error)"

8 years agoART: Add VLOG printing of SetStatus(Error)
Andreas Gampe [Tue, 25 Aug 2015 04:09:05 +0000 (21:09 -0700)]
ART: Add VLOG printing of SetStatus(Error)

In verbose:class mode, print a message when a class is set to
erroneous, and dump any pending exception.

Change-Id: I2ebfe4fcd8495c3ff42675bd3c0f80125b23c019

8 years agoMerge "Revert "Do a second check for testing intrinsic types.""
Andreas Gampe [Mon, 24 Aug 2015 22:50:51 +0000 (22:50 +0000)]
Merge "Revert "Do a second check for testing intrinsic types.""

8 years agoRevert "Do a second check for testing intrinsic types."
Andreas Gampe [Mon, 24 Aug 2015 22:49:59 +0000 (22:49 +0000)]
Revert "Do a second check for testing intrinsic types."

This reverts commit 4daa0b4c21eee46362b5114fb2c3800c0c7e7a36.

If the intrinsic has a slow-path, like charAt, the slow-path logic will complain as it only understands direct slow-paths, not virtual calls.

We should either override that decision in the slow-path, or replace the HInvokeVirtual when we're overriding the intrinsic choice.

Bug: 23475673
Change-Id: If55fbc8c82d52e0e7a7aec2674ae2bd2b74b5c77

8 years agoMerge "Move annotations to native."
Jeff Hao [Sat, 22 Aug 2015 00:17:57 +0000 (00:17 +0000)]
Merge "Move annotations to native."

8 years agoMove annotations to native.
Jeff Hao [Thu, 30 Jul 2015 03:14:10 +0000 (20:14 -0700)]
Move annotations to native.

Art side of this change. There is also a corresponding Libcore change.

Seeing ~2-3x speedup over dalvik KK MR1 in AnnotatedElementBenchmark.
Benchmark  Speedup of Art AOSP to Dalvik KK MR1
GetAllReturnsLargeAnnotation  2.99
GetAllReturnsMarkerAnnotation  2.20
GetAllReturnsNoAnnotation  2.43
GetAllReturnsSmallAnnotation  2.52
GetAllReturnsThreeAnnotations  2.87
GetAnnotationsOnSubclass  2.42
GetDeclaredAnnotationsOnSubclass 2.49
GetFieldAnnotation  2.68
GetFieldAnnotations  2.60
GetMethodAnnotation  2.66
GetMethodAnnotations  2.61
GetParameterAnnotations  2.52
GetTypeAnnotation  2.56
GetTypeAnnotations  2.17
IsFieldAnnotationPresent  3.26
IsMethodAnnotationPresent  4.99
IsTypeAnnotationPresent  1.34

Change-Id: Ibdbb6d23b17eaab6e83c8774b1bb9401e8227941

8 years agoMerge "Correct for signal, native bridge test hard-coded signal handling values"
Andreas Gampe [Fri, 21 Aug 2015 23:26:39 +0000 (23:26 +0000)]
Merge "Correct for signal, native bridge test hard-coded signal handling values"

8 years agoCorrect for signal, native bridge test hard-coded signal handling values
Agi Csaki [Fri, 21 Aug 2015 19:56:30 +0000 (12:56 -0700)]
Correct for signal, native bridge test hard-coded signal handling values

Added inline assembly to ensure that the instruction causing a segfault
in x86/x86_64 for the 004-SignalTest and 115-native-bridge test always
has a size of 3 bytes, in response to a bug that caused the test to fail
when this instruction had variable sizes.

Bug: 22876261
Change-Id: I474a04782a446439956c22360c71cea2655f8a1b

8 years agoMerge "Add class flags to class to help GC scanning"
Mathieu Chartier [Fri, 21 Aug 2015 20:50:14 +0000 (20:50 +0000)]
Merge "Add class flags to class to help GC scanning"

8 years agoMerge "Revert "[MIPS] Use hard float calling convention for managed code""
Vladimir Marko [Fri, 21 Aug 2015 18:39:54 +0000 (18:39 +0000)]
Merge "Revert "[MIPS] Use hard float calling convention for managed code""

8 years agoRevert "[MIPS] Use hard float calling convention for managed code"
Vladimir Marko [Fri, 21 Aug 2015 18:39:26 +0000 (18:39 +0000)]
Revert "[MIPS] Use hard float calling convention for managed code"

MipsMir2Lir::LockCallTemps() is broken for secondary architecture on aosp_mips64-eng.

This reverts commit a29449dcf57c57fe0876f51367985477317cc557.

Change-Id: I480ea7569d73aea7894fc0a6dd804b1135286a37

8 years agoAdd class flags to class to help GC scanning
Mathieu Chartier [Wed, 19 Aug 2015 01:35:52 +0000 (18:35 -0700)]
Add class flags to class to help GC scanning

Reduces GC time and pauses by reducing the number of loads required
to scan an object.

Average total GC time before on EvaluateAndApplyChanges (EAAC): 7.452s
After: 7.144s

Average GC pause times before on EAAC: 860.67us
After: 722.75us

Adding the class flags field cause a memory increase of ~24k system
wide on low memory devices.

Change-Id: I3f04212d5787bfbf5e55026584d149f55476105e

8 years agoMerge "ART: Special form of lock aliasing"
Andreas Gampe [Fri, 21 Aug 2015 17:24:14 +0000 (17:24 +0000)]
Merge "ART: Special form of lock aliasing"

8 years agoMerge "Made CheckJNI check varargs when possible"
Alex Light [Fri, 21 Aug 2015 15:43:37 +0000 (15:43 +0000)]
Merge "Made CheckJNI check varargs when possible"

8 years agoMerge "Stop framework on buildbot devices to avoid lowmemorykiller."
Nicolas Geoffray [Fri, 21 Aug 2015 14:40:47 +0000 (14:40 +0000)]
Merge "Stop framework on buildbot devices to avoid lowmemorykiller."

8 years agoStop framework on buildbot devices to avoid lowmemorykiller.
Nicolas Geoffray [Fri, 21 Aug 2015 14:32:35 +0000 (15:32 +0100)]
Stop framework on buildbot devices to avoid lowmemorykiller.

Change-Id: If7fa58f9bcb67b90cc2473daa280c3c7d0f0f513

8 years agoMerge "Fix TrySplitNonPairOrUnalignedPairIntervalAt."
Nicolas Geoffray [Fri, 21 Aug 2015 14:25:23 +0000 (14:25 +0000)]
Merge "Fix TrySplitNonPairOrUnalignedPairIntervalAt."

8 years agoFix TrySplitNonPairOrUnalignedPairIntervalAt.
Nicolas Geoffray [Thu, 20 Aug 2015 18:52:26 +0000 (19:52 +0100)]
Fix TrySplitNonPairOrUnalignedPairIntervalAt.

We need to both:
1) Look at pair that don't start at an even register.
2) Also remove the other half from the list of actives.

Change-Id: Ia99fa9852c67b8633e8d17a258fe302add54b14a

8 years agoMerge "[MIPS] Use hard float calling convention for managed code"
Vladimir Marko [Fri, 21 Aug 2015 13:31:49 +0000 (13:31 +0000)]
Merge "[MIPS] Use hard float calling convention for managed code"

8 years ago[MIPS] Use hard float calling convention for managed code
Goran Jakovljevic [Wed, 22 Jul 2015 09:08:57 +0000 (11:08 +0200)]
[MIPS] Use hard float calling convention for managed code

Note that this isn't o32 ABI. Same set of registers is used for
arguments ($a0-$a3 and $f12-$f15), but we don't skip registers
and fp arguments are never passed via core registers.

Change-Id: Ifb883ff6e15758b539137898b49ac2f8ee075f49

8 years agoMerge "Do a second check for testing intrinsic types."
Nicolas Geoffray [Fri, 21 Aug 2015 10:06:20 +0000 (10:06 +0000)]
Merge "Do a second check for testing intrinsic types."

8 years agoDo a second check for testing intrinsic types.
Nicolas Geoffray [Thu, 20 Aug 2015 13:05:14 +0000 (14:05 +0100)]
Do a second check for testing intrinsic types.

This allows to intrinsify calls made in a different dex file.

Can't easily write a test because it depends on having inlined
a method from boot classpath that calls an intrinsic. Once
String.equals is implemented with the hybrid approach we can write one.

Change-Id: I591d9496e236429943d6bfa7f8b20f576b1cfb9a

8 years agoART: Special form of lock aliasing
Andreas Gampe [Tue, 18 Aug 2015 15:57:44 +0000 (08:57 -0700)]
ART: Special form of lock aliasing

Check whether the instruction immediately before a monitor-enter
is a move-object, establishing previously untracked lock aliasing
in a low-overhead manner.

Bug: 20102779
Bug: 21169615
Bug: 21988678
Bug: 23300986
Change-Id: Ia10d6219357e7bce29f58134637b07d3f4857b2f

8 years agoMerge "ART: (Partially) fix lock aliasing"
Andreas Gampe [Thu, 20 Aug 2015 22:52:44 +0000 (22:52 +0000)]
Merge "ART: (Partially) fix lock aliasing"

8 years agoMade CheckJNI check varargs when possible
Alex Light [Wed, 19 Aug 2015 22:23:23 +0000 (15:23 -0700)]
Made CheckJNI check varargs when possible

Several JNI functions such as NewObject and Call*Method take a variable
number of arguments. This patch will make CheckJNI do (limited) dynamic
validation of these arguments. Currently it is limited to checking that
objects are valid and that no value types have illegal values.

Bug: 20344596
Change-Id: I1f81d2bdd80215e0007fc636bac27d5bcc2dba96

8 years agoMerge "Add a `--showcommands` option to ART's buildbot-build.sh."
Roland Levillain [Thu, 20 Aug 2015 16:57:28 +0000 (16:57 +0000)]
Merge "Add a `--showcommands` option to ART's buildbot-build.sh."

8 years agoAdd a `--showcommands` option to ART's buildbot-build.sh.
Roland Levillain [Thu, 20 Aug 2015 16:49:56 +0000 (17:49 +0100)]
Add a `--showcommands` option to ART's buildbot-build.sh.

Change-Id: Ib562a02b2f96dd5abd580ae751d5d86749144bf3

8 years agoMerge "Fix indentation in reference type propagation"
David Brazdil [Thu, 20 Aug 2015 16:16:52 +0000 (16:16 +0000)]
Merge "Fix indentation in reference type propagation"

8 years agoMerge "ARM64: Minor optimization for conversions from long to int."
Roland Levillain [Thu, 20 Aug 2015 16:11:31 +0000 (16:11 +0000)]
Merge "ARM64: Minor optimization for conversions from long to int."

8 years agoFix indentation in reference type propagation
David Brazdil [Thu, 20 Aug 2015 16:05:49 +0000 (17:05 +0100)]
Fix indentation in reference type propagation

Change-Id: I5860c4fef55326ac2b510e3e34c4541b691794e0

8 years agoMerge "Fix formatting comment in Checker"
David Brazdil [Thu, 20 Aug 2015 16:05:17 +0000 (16:05 +0000)]
Merge "Fix formatting comment in Checker"

8 years agoFix formatting comment in Checker
David Brazdil [Thu, 20 Aug 2015 15:59:24 +0000 (16:59 +0100)]
Fix formatting comment in Checker

Change-Id: Idf5cf2d4be12a56777039aca3aa1c8563bcb9089

8 years agoMerge "Optimizing String.Equals as an intrinsic (ARM)"
Andreas Gampe [Thu, 20 Aug 2015 15:08:54 +0000 (15:08 +0000)]
Merge "Optimizing String.Equals as an intrinsic (ARM)"

8 years agoMerge "Fix extra parantheses"
Calin Juravle [Thu, 20 Aug 2015 14:02:09 +0000 (14:02 +0000)]
Merge "Fix extra parantheses"

8 years agoFix extra parantheses
Calin Juravle [Thu, 20 Aug 2015 14:01:27 +0000 (15:01 +0100)]
Fix extra parantheses

:(

Change-Id: Ie48a54de1276fb9e478cb5927d714b2ff14ae6c6

8 years agoMerge "Fix BuildInvoke"
Calin Juravle [Thu, 20 Aug 2015 13:52:16 +0000 (13:52 +0000)]
Merge "Fix BuildInvoke"

8 years agoFix BuildInvoke
Calin Juravle [Thu, 20 Aug 2015 13:48:00 +0000 (14:48 +0100)]
Fix BuildInvoke

The invoke should be added to the graph before
PotentiallySimplifyFakeString.

Change-Id: I2afc1d16e6dae60957e7d1386fd028e4f3a5b27a

8 years agoARM64: Minor optimization for conversions from long to int.
Alexandre Rames [Thu, 20 Aug 2015 12:36:35 +0000 (13:36 +0100)]
ARM64: Minor optimization for conversions from long to int.

Change-Id: Ice7febba8dd09a4548ab235fc8aee76d7e7676a1

8 years agoMerge "Refactor BuildInvoke."
Calin Juravle [Thu, 20 Aug 2015 12:27:14 +0000 (12:27 +0000)]
Merge "Refactor BuildInvoke."

8 years agoRefactor BuildInvoke.
Calin Juravle [Tue, 18 Aug 2015 16:08:12 +0000 (17:08 +0100)]
Refactor BuildInvoke.

BuildInvoke got to be too complex an unreadble. This breaks it down in
smaller pieces.

Change-Id: Ibda63f69f5a1be537ae13e18a5f67c361173f4a6

8 years agoMerge "ART: Expression evaluation in Checker"
David Brazdil [Thu, 20 Aug 2015 11:55:01 +0000 (11:55 +0000)]
Merge "ART: Expression evaluation in Checker"

8 years agoART: Expression evaluation in Checker
David Brazdil [Thu, 20 Aug 2015 10:46:04 +0000 (11:46 +0100)]
ART: Expression evaluation in Checker

It can be useful for tests to evaluate small `assert`-like expressions.
This patch adds such support to Checker, with a new CHECK-EVAL line.
See README file for more details.

Change-Id: I184f7c8e8b53f7e93cfb08fcf9630b4724fa5412

8 years agoMerge "Be more flexible on the code unit size when inlining."
Nicolas Geoffray [Thu, 20 Aug 2015 10:06:31 +0000 (10:06 +0000)]
Merge "Be more flexible on the code unit size when inlining."

8 years agoBe more flexible on the code unit size when inlining.
Nicolas Geoffray [Wed, 12 Aug 2015 03:03:09 +0000 (20:03 -0700)]
Be more flexible on the code unit size when inlining.

This change increases the maximum code unit size, and fold
parameters in the inlinee in the hope to reduce the overall
size of the graph. We then make sure we don't inline methods
that have more than N HInstructions.

Also, remove the kAccDontInline flag on ArtMethod. The compiler
does not need it anymore.

Change-Id: I4cd3da40e551f30ba83b8b274728b87e67f6812e

8 years agoMerge "Add support to indicate whether intrinsics require a dex cache"
Andreas Gampe [Thu, 20 Aug 2015 03:09:32 +0000 (03:09 +0000)]
Merge "Add support to indicate whether intrinsics require a dex cache"

8 years agoAdd support to indicate whether intrinsics require a dex cache
Agi Csaki [Wed, 19 Aug 2015 21:58:14 +0000 (14:58 -0700)]
Add support to indicate whether intrinsics require a dex cache

A structural change to indicate whether a given intrinsic requires access
to a dex cache.  I updated the needs_environment_ field to indicate
whether an HInvoke needs an environment or a dex cache, and if an HInvoke
represents an intrisified method, we utilize this field to determine if
the HInvoke needs a dex cache.

Bug: 21481923
Change-Id: I9dd25a385e1a1397603da6c4c43f6c1aea511b32

8 years agoOptimizing String.Equals as an intrinsic (ARM)
Agi Csaki [Wed, 19 Aug 2015 00:10:38 +0000 (17:10 -0700)]
Optimizing String.Equals as an intrinsic (ARM)

The second implementation of String.Equals. I added an intrinsic
in ARM which is similar to the original java implementation
of String.equals: an instanceof check, null check, length check, and
reference equality check followed by a loop comparing strings two
characters at a time. After extensive benchmarking, it seems that
comparing strings forward is faster and is worth the additional temp
register required. Additionally, moving the add and sub instructions
that are anyways necessary between branches in the comparison loop
improved benchmarking results.

Interesting benchmarking values:

Optimizing Compiler on Nexus 7
    Intrinsic 1-5 Character Strings = 91.6 ns
    Original 1-5 Character Strings = 285.84 ns
    Intrinsic 15-30 Character Strings = 176 ns
    Original 15-30 Character Strings = 367.67 ns
    Intrinsic 100-1000 Character Strings = 2992.1 ns
    Original 100-1000 Character Strings = 9098.5 ns
    Intrinsic Null Argument = 70.9 ns
    Original Null Argument = 189 ns

Code Expansion:

    Average size of 116 apps without intrinsic = 6880521.11 bytes
    Average size of 116 apps with intrinsic = 6901107.97 bytes
    Overall 0.299% increase in code size

Bug: 21481923
Change-Id: I48df2a74f2a92b56fb9479fbf14276d44e880aed

8 years agoMerge "Use thread-local is_gc_marking flags for the CC collector."
Hiroshi Yamauchi [Wed, 19 Aug 2015 20:19:15 +0000 (20:19 +0000)]
Merge "Use thread-local is_gc_marking flags for the CC collector."

8 years agoUse thread-local is_gc_marking flags for the CC collector.
Hiroshi Yamauchi [Tue, 18 Aug 2015 21:47:25 +0000 (14:47 -0700)]
Use thread-local is_gc_marking flags for the CC collector.

The currently global is_marking flag is used to check if the read
barrier slow path needs to be taken for GC roots access. Changing it
to a thread-local flag simplifies the fast path check and makes it
easier to do it in assembly code. It also solves the issue that we
need to avoid accessing the global flag during startup before the heap
or the collector object isn't allocated and initialized.

Bug: 12687968
Change-Id: Ibf0dca12f400bf3490188b12dfe96c7de30583e0

8 years agoMerge "ART: Enable basic optimizations for try/catch"
David Brazdil [Wed, 19 Aug 2015 19:02:45 +0000 (19:02 +0000)]
Merge "ART: Enable basic optimizations for try/catch"

8 years agoART: Enable basic optimizations for try/catch
David Brazdil [Tue, 18 Aug 2015 16:48:17 +0000 (17:48 +0100)]
ART: Enable basic optimizations for try/catch

Generating code for try/catch methods requires having run at least the
instruction simplifier to remove redundant suspend checks. This patch
enables the first group of optimizations when try/catch is present.

Enabled optimizations:
1) IntrinsicsRecognizer
Does not modify the graph, only sets HInvoke::intrinsic_.

2) ConstantFolding
Does not deal with throwing instructions.

3) InstructionSimplifier
May remove a throwing instruction (e.g. LoadClass in VisitCheckCast),
or may turn a throwing instruction into a non-throwing one (ArraySet).
Their corresponding catch phi inputs are not removed but correctness
is preserved.

4) ReferenceTypePropagation
Does not modify the graph, only sets type properties. Typing of
LoadException from catch handler information was added.

5) DeadCodeElimination
Removing individual instructions is fine (same as 3). Removal of dead
blocks was disabled for try/catch.

Change-Id: I2722c3229eb8aaf326391e07f522dbf5186774b8

8 years agoMerge "Revert "Revert "Optimizing: Better invoke-static/-direct dispatch."""
Vladimir Marko [Wed, 19 Aug 2015 18:05:46 +0000 (18:05 +0000)]
Merge "Revert "Revert "Optimizing: Better invoke-static/-direct dispatch."""

8 years agoRevert "Revert "Optimizing: Better invoke-static/-direct dispatch.""
Vladimir Marko [Wed, 19 Aug 2015 12:49:41 +0000 (12:49 +0000)]
Revert "Revert "Optimizing: Better invoke-static/-direct dispatch.""

Fixed kCallArtMethod to use correct callee location for
kRecursive. This combination is used when compiling with
debuggable flag set.

This reverts commit b2c431e80e92eb6437788cc544cee6c88c3156df.

Change-Id: Idee0f2a794199ebdf24892c60f8a5dcf057db01c

8 years agoMerge "ART: Refactor try/catch block info, store exception type"
David Brazdil [Wed, 19 Aug 2015 17:12:48 +0000 (17:12 +0000)]
Merge "ART: Refactor try/catch block info, store exception type"

8 years agoART: Refactor try/catch block info, store exception type
David Brazdil [Wed, 19 Aug 2015 14:04:01 +0000 (15:04 +0100)]
ART: Refactor try/catch block info, store exception type

This patch replaces HBasicBlock fields storing try/catch info with a
single TryCatchInformation data structure, saving memory for the
majority of non-try/catch blocks. It also changes builder to store
the exception type for catch blocks.

Change-Id: Ib3e43f7db247e6915d67c267fc62410420e230c9

8 years agoART: (Partially) fix lock aliasing
Andreas Gampe [Tue, 18 Aug 2015 15:57:44 +0000 (08:57 -0700)]
ART: (Partially) fix lock aliasing

On monitor-exit, we must unlock all the registers which purport to
be locked at the current lock depth. These are lock aliases.

Bug: 20102779
Bug: 21169615
Bug: 21988678
Bug: 23300986
Change-Id: I6604871fc778d8f0ca9a99f6aad16a99ab62c599

8 years agoMerge "Put in place the ARM64 instruction simplification framework."
Calin Juravle [Wed, 19 Aug 2015 15:56:11 +0000 (15:56 +0000)]
Merge "Put in place the ARM64 instruction simplification framework."

8 years agoMerge "Manually unrelocate odex files generated for test."
Richard Uhler [Wed, 19 Aug 2015 15:19:31 +0000 (15:19 +0000)]
Merge "Manually unrelocate odex files generated for test."

8 years agoPut in place the ARM64 instruction simplification framework.
Alexandre Rames [Wed, 19 Aug 2015 14:39:06 +0000 (15:39 +0100)]
Put in place the ARM64 instruction simplification framework.

This commit introduces and runs the empty InstructionSimplifierArm64
pass. Further commits will introduce arm64-specific transformations in
that pass.

Change-Id: I458f8a2b15470297b87fc1f7ff85bd52155d93ef

8 years agoMerge "ART: Revisit users in phi elimination"
David Brazdil [Wed, 19 Aug 2015 13:38:28 +0000 (13:38 +0000)]
Merge "ART: Revisit users in phi elimination"

8 years agoART: Revisit users in phi elimination
David Brazdil [Wed, 19 Aug 2015 13:17:31 +0000 (14:17 +0100)]
ART: Revisit users in phi elimination

SSA phi elimination visits phis in post order so that loop phis are
visited after their inputs. This prevents elimination of phis with
other phi inputs, exacerbated by the fact that the SSA builder does
create catch phis even if all inputs are the same (unlike with normal
phis). This patch revisits phi users of eliminated phis until no more
phis can be removed.

Change-Id: I403614dd46a8e6f0a5b9dd9e8ddc8832617521eb

8 years agoMerge "JDWP: remove suspend count check on invoke"
Sebastien Hertz [Wed, 19 Aug 2015 12:53:38 +0000 (12:53 +0000)]
Merge "JDWP: remove suspend count check on invoke"

8 years agoMerge "Revert "Optimizing: Better invoke-static/-direct dispatch.""
Vladimir Marko [Wed, 19 Aug 2015 12:46:09 +0000 (12:46 +0000)]
Merge "Revert "Optimizing: Better invoke-static/-direct dispatch.""

8 years agoRevert "Optimizing: Better invoke-static/-direct dispatch."
Vladimir Marko [Wed, 19 Aug 2015 12:45:42 +0000 (12:45 +0000)]
Revert "Optimizing: Better invoke-static/-direct dispatch."

Reverting due to failing ndebug tests.

This reverts commit 9b688a095afbae21112df5d495487ac5231b12d0.

Change-Id: Ie4f69da6609df3b7c8443412b6cf7f5c43c2c5d9

8 years agoMerge "Optimizing: Better invoke-static/-direct dispatch."
Vladimir Marko [Wed, 19 Aug 2015 11:27:57 +0000 (11:27 +0000)]
Merge "Optimizing: Better invoke-static/-direct dispatch."

8 years agoOptimizing: Better invoke-static/-direct dispatch.
Vladimir Marko [Wed, 6 May 2015 13:12:42 +0000 (14:12 +0100)]
Optimizing: Better invoke-static/-direct dispatch.

Add framework for different types of loading ArtMethod*
and code pointer retrieval. Implement invoke-static and
invoke-direct calls the same way as Quick. Document the
dispatch kinds in HInvokeStaticOrDirect's new enumerations
MethodLoadKind and CodePtrLocation.

PC-relative loads from dex cache arrays are used only for
x86-64 and arm64. The implementation for other architectures
will be done in separate CLs.

Change-Id: I468ca4d422dbd14748e1ba6b45289f0d31734d94

8 years agoMerge "Remove extra calls to `RecordPcInfo()`."
Nicolas Geoffray [Wed, 19 Aug 2015 10:52:30 +0000 (10:52 +0000)]
Merge "Remove extra calls to `RecordPcInfo()`."

8 years agoRemove extra calls to `RecordPcInfo()`.
Alexandre Rames [Wed, 19 Aug 2015 10:33:36 +0000 (11:33 +0100)]
Remove extra calls to `RecordPcInfo()`.

Some calls to `RecordPcInfo()` were mistakingly left in the x86/x86_64
code after we started using the `InvokeRuntime()` helper.

Change-Id: I8a902fee9db2dfb85020167289a786f965cb3fe9

8 years agoMerge "ART: Revert storing of exceptional predecessors"
David Brazdil [Wed, 19 Aug 2015 10:08:36 +0000 (10:08 +0000)]
Merge "ART: Revert storing of exceptional predecessors"

8 years agoMerge "Implement CountLeadingZeros for x86"
Roland Levillain [Wed, 19 Aug 2015 08:50:42 +0000 (08:50 +0000)]
Merge "Implement CountLeadingZeros for x86"

8 years agoMerge "Always visit object class from VisitReferences"
Mathieu Chartier [Tue, 18 Aug 2015 23:58:07 +0000 (23:58 +0000)]
Merge "Always visit object class from VisitReferences"

8 years agoMerge "Revert "Introduce support for hardware simulators, starting with ARM64""
Alex Light [Tue, 18 Aug 2015 23:27:43 +0000 (23:27 +0000)]
Merge "Revert "Introduce support for hardware simulators, starting with ARM64""

8 years agoRevert "Introduce support for hardware simulators, starting with ARM64"
Alex Light [Tue, 18 Aug 2015 23:03:42 +0000 (23:03 +0000)]
Revert "Introduce support for hardware simulators, starting with ARM64"

This reverts commit c2e1a5edc438274159c6ef8e65455ac73723a8f1.

This breaks the build for x86_64 targets. This is because on target the libvixl is not included as a
library for the libart.so target build. The build of non-x86_64 targets only works because the
compilers removes the dead-code that contains the libvixl symbols.

Bug: 23321940
Change-Id: I39e93ff05b887665c47fb0986867f1d13ca65b9b

8 years agoAlways visit object class from VisitReferences
Mathieu Chartier [Tue, 18 Aug 2015 20:54:21 +0000 (13:54 -0700)]
Always visit object class from VisitReferences

We don't want to unload classes which have instances.

Slight increase in CMS GC time from ~6.5s to ~7.3s on
EvaluateAndApplyChanges.

Bug: 22720414
Change-Id: I467ff9c9d55163d2a90b999aef3bdd7b3f648bac

8 years agoMerge "Svelter libart-compiler"
Alex Light [Tue, 18 Aug 2015 21:43:44 +0000 (21:43 +0000)]
Merge "Svelter libart-compiler"

8 years agoMerge "Guard thread exited message by try-catch in ThreadStress"
Mathieu Chartier [Tue, 18 Aug 2015 20:48:30 +0000 (20:48 +0000)]
Merge "Guard thread exited message by try-catch in ThreadStress"

8 years agoGuard thread exited message by try-catch in ThreadStress
Mathieu Chartier [Tue, 18 Aug 2015 18:42:03 +0000 (11:42 -0700)]
Guard thread exited message by try-catch in ThreadStress

Bug: 18577101
Change-Id: I1c3cbbfad09b88f4d913dc86bb6a89bf5b5269a8

8 years agoSvelter libart-compiler
Alex Light [Mon, 10 Aug 2015 22:30:07 +0000 (15:30 -0700)]
Svelter libart-compiler

Added new environment variable ART_{TARGET,HOST}_CODEGEN_ARCHS which
may be set to 'all', 'svelte' or a space separated list of architectures.

When compiled with ART_{TARGET,HOST}_CODEGEN_ARCHS='all' (the default
value) dex2oat will be able to generate output for all supported
architectures.

When compiled with ART_TARGET_CODEGEN_ARCHS='svelte'
only the architectures of the TARGET will be included. When
ART_HOST_CODEGEN_ARCHS='svelte' all architectures the target includes
and the host architectures will be included on the host dex2oat.

If a list of architectures is given only those will be included.

Change-Id: I87f4ad0131ab1b37544d8799e947ce4733b6daec

8 years agoMerge "Fix some global constructors and destructors"
Mathieu Chartier [Tue, 18 Aug 2015 18:14:12 +0000 (18:14 +0000)]
Merge "Fix some global constructors and destructors"

8 years agoFix some global constructors and destructors
Mathieu Chartier [Tue, 18 Aug 2015 17:41:39 +0000 (10:41 -0700)]
Fix some global constructors and destructors

Bug: 17994073

Change-Id: Ib4da5ac25812460b3dcee26024d1a3415a21257b

8 years agoMerge "Fix codegen_test."
Roland Levillain [Tue, 18 Aug 2015 17:43:29 +0000 (17:43 +0000)]
Merge "Fix codegen_test."

8 years agoFix codegen_test.
Roland Levillain [Tue, 18 Aug 2015 17:36:20 +0000 (18:36 +0100)]
Fix codegen_test.

Allow the execution of Thumb-2 code on ARM32 hardware.

Change-Id: I2fec71e39d538249569ffa88435f3198e8c28c01

8 years agoManually unrelocate odex files generated for test.
Richard Uhler [Mon, 10 Aug 2015 21:47:41 +0000 (14:47 -0700)]
Manually unrelocate odex files generated for test.

With this change, the oat file assistant test will work properly in
the case where the image happens to be randomly relocated by a delta
of 0.

Bug: 22599792
Change-Id: Id17bf7ef7644e7bc7980c120c0aa9b6e57673ec6

8 years agoART: Revert storing of exceptional predecessors
David Brazdil [Tue, 18 Aug 2015 16:17:38 +0000 (17:17 +0100)]
ART: Revert storing of exceptional predecessors

After change of the approach for try/catch register allocation, it is
no longer necessary to record instructions which might throw into a
catch block.

Change-Id: I7ef12ed06c49a35280029810975fa2a50fe4a424

8 years agoMerge "Introduce support for hardware simulators, starting with ARM64"
Roland Levillain [Tue, 18 Aug 2015 13:28:20 +0000 (13:28 +0000)]
Merge "Introduce support for hardware simulators, starting with ARM64"

8 years agoIntroduce support for hardware simulators, starting with ARM64
Phil Wang [Wed, 29 Jul 2015 07:14:09 +0000 (15:14 +0800)]
Introduce support for hardware simulators, starting with ARM64

Simulator support for ARM64 is implemented with VIXL.
Now codegen_test will also run on all supported hardware simulators.

Change-Id: Idc740f566175d1a23c373ea9292b8fc5ba526d00

8 years agoMerge "Fix and improve reference cache mod-union table"
Mathieu Chartier [Tue, 18 Aug 2015 00:40:27 +0000 (00:40 +0000)]
Merge "Fix and improve reference cache mod-union table"

8 years agoFix and improve reference cache mod-union table
Mathieu Chartier [Sun, 16 Aug 2015 21:37:04 +0000 (14:37 -0700)]
Fix and improve reference cache mod-union table

Improvements:
Remove cards that only contain null references, this can save memory
in some cases.

Fixes:
Fix a bug where the mod-union table didn't properly handle class
loaders in the boot image. This was cause by not adding the new
classes as references. The fix is to leave these cards dirty.

Bug: 23203999
Change-Id: Ib1f1f74154df976dd8abaf2430c6dabd4cae2dbe

8 years agoMerge "ART: Some header cleaning around bit-utils"
Andreas Gampe [Mon, 17 Aug 2015 22:59:27 +0000 (22:59 +0000)]
Merge "ART: Some header cleaning around bit-utils"

8 years agoART: Some header cleaning around bit-utils
Andreas Gampe [Fri, 14 Aug 2015 15:22:54 +0000 (08:22 -0700)]
ART: Some header cleaning around bit-utils

Try to remove dependencies where they are not necessary.

Change-Id: I5ff35cb17aea369bed3725b1610b50d7eb05b81e

8 years agoMerge "Correct for 115-native-bridge hard-coded x86/x86_64 signal handling values"
Andreas Gampe [Mon, 17 Aug 2015 22:24:30 +0000 (22:24 +0000)]
Merge "Correct for 115-native-bridge hard-coded x86/x86_64 signal handling values"

8 years agoMerge "ART: Follow-up fixes"
Andreas Gampe [Mon, 17 Aug 2015 21:19:23 +0000 (21:19 +0000)]
Merge "ART: Follow-up fixes"

8 years agoMerge "ART: Dex2oat lint fix"
Andreas Gampe [Mon, 17 Aug 2015 21:15:15 +0000 (21:15 +0000)]
Merge "ART: Dex2oat lint fix"