OSDN Git Service

android-x86/art.git
8 years agoMerge "MIPS32: Fix MipsInstructionSetFeatures::FromVariant()"
Treehugger Robot [Tue, 5 Jul 2016 10:10:25 +0000 (10:10 +0000)]
Merge "MIPS32: Fix MipsInstructionSetFeatures::FromVariant()"

8 years agoMerge "Simplification for associative and commutative operations on constants"
Nicolas Geoffray [Tue, 5 Jul 2016 08:24:46 +0000 (08:24 +0000)]
Merge "Simplification for associative and commutative operations on constants"

8 years agoMerge "Never go to resolution while inspecting inlined frames."
Nicolas Geoffray [Tue, 5 Jul 2016 08:07:44 +0000 (08:07 +0000)]
Merge "Never go to resolution while inspecting inlined frames."

8 years agoNever go to resolution while inspecting inlined frames.
Nicolas Geoffray [Mon, 4 Jul 2016 09:15:47 +0000 (10:15 +0100)]
Never go to resolution while inspecting inlined frames.

Instead, do a manual inspection and decoding of the invoke
with the dex cache.

Also update oatdump to dump types in the dex cache.

bug:27858645
Change-Id: I7c0b612ee96e6865fa438c3a1d253686231337bd
test:run-test

8 years agoMerge "MIPS32: Improve method invocation"
Treehugger Robot [Mon, 4 Jul 2016 12:10:53 +0000 (12:10 +0000)]
Merge "MIPS32: Improve method invocation"

8 years agoMIPS32: Improve method invocation
Alexey Frunze [Tue, 10 May 2016 23:08:05 +0000 (16:08 -0700)]
MIPS32: Improve method invocation

Improvements include:
- CodeGeneratorMIPS::GenerateStaticOrDirectCall() supports:
  - MethodLoadKind::kDirectAddressWithFixup (via literals)
  - CodePtrLocation::kCallDirectWithFixup (via literals)
  - MethodLoadKind::kDexCachePcRelative
- 32-bit literals to support the above (not ready for general-
  purpose applications yet because RA is not saved in leaf
  methods, but is clobbered on MIPS32R2 when simulating
  PC-relative addressing (MIPS32R6 is OK because it has
  PC-relative addressing with the lwpc instruction))
- shorter instruction sequences for recursive static/direct
  calls

Tested:
- test-art-host-gtest
- test-art-target-gtest and test-art-target-run-test-optimizing on:
  - MIPS32R2 QEMU
  - CI20 board
  - MIPS32R6 (2nd arch) QEMU

Change-Id: Id5b137ad32d5590487fd154c9a01d3b3e7e044ff

8 years agoSimplification for associative and commutative operations on constants
Anton Kirilov [Fri, 13 May 2016 16:56:15 +0000 (17:56 +0100)]
Simplification for associative and commutative operations on constants

The purpose of this change is to enable the instruction simplifier
to recognize patterns such as

OP y, x, const1
OP z, y, const2

where OP is both an associative and a commutative operation on integral
types, and replace them with

OP z, x, const3

Since subtraction on integral types is equivalent to addition with a
negated operand, it receives a similar treatment, even though it is
not commutative.

Change-Id: I278cac39bd39bc843d250a976931cb000876ea88

8 years agoMerge "Create a typedef for HInstruction::GetInputs() return type."
Treehugger Robot [Fri, 1 Jul 2016 13:32:35 +0000 (13:32 +0000)]
Merge "Create a typedef for HInstruction::GetInputs() return type."

8 years agoMerge "Make the Compute() method of all HIRs static."
Treehugger Robot [Fri, 1 Jul 2016 13:21:00 +0000 (13:21 +0000)]
Merge "Make the Compute() method of all HIRs static."

8 years agoCreate a typedef for HInstruction::GetInputs() return type.
Vladimir Marko [Thu, 16 Jun 2016 15:50:52 +0000 (16:50 +0100)]
Create a typedef for HInstruction::GetInputs() return type.

And some other cleanup after
    https://android-review.googlesource.com/230742

Test: No new tests. ART test suite passed (tested on host).
Change-Id: I4743bf17544d0234c6ccb46dd0c1b9aae5c93e17

8 years agoMake the Compute() method of all HIRs static.
Anton Kirilov [Wed, 29 Jun 2016 16:03:40 +0000 (17:03 +0100)]
Make the Compute() method of all HIRs static.

Change-Id: Ibd7687dac907150c8e100791ed7d20d1ae18c9be

8 years agoMerge "MIPS: Use $a0 instead $zero for passing faulting address"
Treehugger Robot [Fri, 1 Jul 2016 09:42:16 +0000 (09:42 +0000)]
Merge "MIPS: Use $a0 instead $zero for passing faulting address"

8 years agoMerge "Do not use popen, it uses a hardcoded path for "sh"."
Nicolas Geoffray [Fri, 1 Jul 2016 08:47:49 +0000 (08:47 +0000)]
Merge "Do not use popen, it uses a hardcoded path for "sh"."

8 years agoDo not use popen, it uses a hardcoded path for "sh".
Nicolas Geoffray [Thu, 30 Jun 2016 14:07:46 +0000 (15:07 +0100)]
Do not use popen, it uses a hardcoded path for "sh".

Instead, do the fork/exec/pipe ourselves.

Bug: 29557002
Change-Id: Iee81b0a7e8818706fd97890f97c1e86f37e42995
Test: test-art-host-gtest-dex2oat_test

8 years agoMIPS: Use $a0 instead $zero for passing faulting address
Goran Jakovljevic [Thu, 30 Jun 2016 14:40:20 +0000 (16:40 +0200)]
MIPS: Use $a0 instead $zero for passing faulting address

Also replaced register numbers with register names to prevent
future similar errors.

This fixes following tests for MIPS32 and MIPS64:
  * 034-call-null
  * 038-inner-null
  * 046-reflect
  * 083-compiler-regressions
  * 123-compiler-regressions-mt
  * 800-smali

Change-Id: I6e49cec60a9c2b0553d7e94c24553e307b70c603

8 years agoMerge "Reformat files using Android-style imports."
Treehugger Robot [Thu, 30 Jun 2016 22:31:59 +0000 (22:31 +0000)]
Merge "Reformat files using Android-style imports."

8 years agoMIPS32: Fix MipsInstructionSetFeatures::FromVariant()
Alexey Frunze [Tue, 28 Jun 2016 23:55:04 +0000 (16:55 -0700)]
MIPS32: Fix MipsInstructionSetFeatures::FromVariant()

Make it possible to completely override build-time instruction
set features with the provided variant string. Add sanity checks.
Comment on the "default" variant behavior.

Tested:
- test-art-host-gtest
- test-art-target-gtest and test-art-target-run-test-optimizing on:
  - MIPS32R6 (2nd arch) QEMU
  - CI20 board

Change-Id: I2470b7115a5b5e333e2e7a156e68c39945fb02e9

8 years agoMerge "Improvements in induction range analysis."
Aart Bik [Thu, 30 Jun 2016 19:44:20 +0000 (19:44 +0000)]
Merge "Improvements in induction range analysis."

8 years agoReformat files using Android-style imports.
Gus Smith [Thu, 9 Jun 2016 23:50:44 +0000 (16:50 -0700)]
Reformat files using Android-style imports.

Test: m ahat-test
Change-Id: Ib0eee0b7c414d85c245c7ef3163485cfa6ff34a4

8 years agoMerge "Revert "Revert "Gray only immune objects mutators access."""
Treehugger Robot [Thu, 30 Jun 2016 18:54:23 +0000 (18:54 +0000)]
Merge "Revert "Revert "Gray only immune objects mutators access."""

8 years agoMerge "Fix divergence between interpreter and compiler."
Treehugger Robot [Thu, 30 Jun 2016 17:32:17 +0000 (17:32 +0000)]
Merge "Fix divergence between interpreter and compiler."

8 years agoMerge "MIPS32: Disassemble and test movf.fmt and movt.fmt (missed earlier)"
Treehugger Robot [Thu, 30 Jun 2016 13:41:55 +0000 (13:41 +0000)]
Merge "MIPS32: Disassemble and test movf.fmt and movt.fmt (missed earlier)"

8 years agoMIPS32: Disassemble and test movf.fmt and movt.fmt (missed earlier)
Alexey Frunze [Mon, 27 Jun 2016 21:48:20 +0000 (14:48 -0700)]
MIPS32: Disassemble and test movf.fmt and movt.fmt (missed earlier)

Test: ART gtest assembler_mips_test
Change-Id: Iafedfafe6ccd76127461d66dfa7984f196be6bd2

8 years agoMerge "Special case the suspend to runnable transition when locking."
Nicolas Geoffray [Thu, 30 Jun 2016 09:52:28 +0000 (09:52 +0000)]
Merge "Special case the suspend to runnable transition when locking."

8 years agoMerge "Revert "Integer.bitCount and Long.bitCount intrinsics for ARM""
Nicolas Geoffray [Thu, 30 Jun 2016 08:36:58 +0000 (08:36 +0000)]
Merge "Revert "Integer.bitCount and Long.bitCount intrinsics for ARM""

8 years agoRevert "Integer.bitCount and Long.bitCount intrinsics for ARM"
Nicolas Geoffray [Thu, 30 Jun 2016 08:36:33 +0000 (08:36 +0000)]
Revert "Integer.bitCount and Long.bitCount intrinsics for ARM"

Fails 564:

[ 80% 771/967] build test-art-target-run-test-debug-prebuild-optimizing-relocate-ntrace-cms-checkjni-image-npictest-ndebuggable-564-checker-bitcount32
checker exit status: 1
/b/build/slave/hammerhead-debug/build/art/test/564-checker-bitcount: FAILED!

#################### info
# Unit test for 32-bit and 64-bit bit count operation.
#################### diffs
--- expected.txt 2016-06-08 02:57:45.570840797 -0700
+++ output.txt 2016-06-29 09:45:45.813173505 -0700
@@ -1 +1,3 @@
 passed
+error: Test case not found in the CFG file
+Main.java:32: int Main.$noinline$BitCountByte(byte) intrinsics_recognition (after)
####################

564-checker-bitcount files deleted from host
and from target
test-art-target-run-test-debug-prebuild-optimizing-relocate-ntrace-cms-checkjni-image-npictest-ndebuggable-564-checker-bitcount32 FAILED

This reverts commit 2a17419c2e54f8ada0df56daa379c78f8ae8a9e8.

Change-Id: I263cfc09ebf78956cd1e86a0bb59ba1b36ffeafe

8 years agoMerge "ART: Add very-large threshold to dex2oat"
Treehugger Robot [Thu, 30 Jun 2016 05:28:56 +0000 (05:28 +0000)]
Merge "ART: Add very-large threshold to dex2oat"

8 years agoART: Add very-large threshold to dex2oat
Andreas Gampe [Sat, 25 Jun 2016 04:05:23 +0000 (21:05 -0700)]
ART: Add very-large threshold to dex2oat

Add a variable threshold to dex2oat. If the total dex file size for
an app reaches this threshold, dex2oat will punt all compilation and
compile the app with verify-at-runtime. This ensures smaller compile
time and memory thrashing, while still extracting the dex files and
thus helping with dirty memory later.

Added tests.

Bug: 29557002
Bug: 29790079
Test: m test-art-host-gtest-dex2oat_test
Change-Id: I78870e4a80ccaafcbbe56839e61ced0acd2ca05e
(cherry picked from commit 338a1d206c16427cf61bd42171fa0c8b9cea8165)

8 years agoRevert "Revert "Gray only immune objects mutators access.""
Hiroshi Yamauchi [Tue, 28 Jun 2016 21:07:41 +0000 (14:07 -0700)]
Revert "Revert "Gray only immune objects mutators access.""

To reduce image/zygote dirty pages.

GC doesn't gray immune space objects except when visiting the thread
GC roots of suspended threads during the thread flip and in
FillWithDummyObject(). GC updates the fields of immune space objects
without pushing/popping them through the mark stack. GC sets a bool
flag after updating the fields of immune space objects. After this
point, mutators don't need gray to immune space objects. Removed the
mark bitmaps for immune spaces.

This reverts commit ddeb172eeedb58ab96e074a55a0d1578b5df4110.

Bug: 29516465
Bug: 12687968
Test: art tests, libartd device boot, ritzperf, jdwp test.
Change-Id: If272373aea3d41b2719e40a6a41f44d9299ba309

8 years agoMerge "ART: Add dex2oat swap-usage parameters"
Treehugger Robot [Thu, 30 Jun 2016 00:57:28 +0000 (00:57 +0000)]
Merge "ART: Add dex2oat swap-usage parameters"

8 years agoART: Add dex2oat swap-usage parameters
Andreas Gampe [Wed, 29 Jun 2016 16:36:30 +0000 (09:36 -0700)]
ART: Add dex2oat swap-usage parameters

Make the dex2oat swap usage decision dependent on parameters that
can be changed on the command line. Both the dex file size and dex
file count can be modified through the following to new parameters:

  --swap-dex-size-threshold
  --swap-dex-count-threshold

The defaults remain the same (20MB and 2).

Factor out some dex2oat setup code from oat_file_assistant_test
and use it in a new dex2oat test.

Bug: 29557002
Change-Id: I8863224f0304c98afe251572ffda8c5b3ead735b
Test: m test-art-host-gtest-dex2oat_test
Test: m test-art-host-gtest-oat_file_assistant_test
Test: m test-art-host

8 years agoFix divergence between interpreter and compiler.
Aart Bik [Wed, 29 Jun 2016 21:54:26 +0000 (14:54 -0700)]
Fix divergence between interpreter and compiler.

Rationale:
Access checks on a method invocation should be performed
prior to checking null pointer for non-static method calls.

Test: 600-verifier-fails

BUG=29068831

Change-Id: I21874d96ff83e7e6c6cf7c239e65ce1b515b9729

8 years agoMerge "Also add the monitor offset as a potential implicit NPE."
Nicolas Geoffray [Wed, 29 Jun 2016 21:06:57 +0000 (21:06 +0000)]
Merge "Also add the monitor offset as a potential implicit NPE."

8 years agoAlso add the monitor offset as a potential implicit NPE.
Nicolas Geoffray [Wed, 29 Jun 2016 20:45:10 +0000 (21:45 +0100)]
Also add the monitor offset as a potential implicit NPE.

We access the monitor in read barrier configurations.

Change-Id: Ifbdf8ec7734a10cd7d1e965875d72a59960d13ca

8 years agoMerge "Fix merging HLoadClass with HNewInstance."
Vladimir Marko [Wed, 29 Jun 2016 17:20:53 +0000 (17:20 +0000)]
Merge "Fix merging HLoadClass with HNewInstance."

8 years agoImprovements in induction range analysis.
Aart Bik [Thu, 23 Jun 2016 18:20:41 +0000 (11:20 -0700)]
Improvements in induction range analysis.

Rationale:
Uses range analysis while determining whether trip-counts
are "safe", which improves analysis of triangular loops.
Also implements more effective triangular loop analysis
by evaluating induction information only once and using
a top level hint (instead of the "iterative refinement"
that was used earlier). Also fixes analysis of triangular
trip counts that may wrap-around. All with tests.

Test: see induction_var_range_test/530-checker-loops*

BUG=27151190

Change-Id: I1877c8ce0c9a52005900eb9dfdbb1918df100278

8 years agoSpecial case the suspend to runnable transition when locking.
Nicolas Geoffray [Wed, 29 Jun 2016 13:39:59 +0000 (14:39 +0100)]
Special case the suspend to runnable transition when locking.

The runtime may be shutting down in parallel, and for daemons that
could lead to failed locking assertions.

bug:27378067
Change-Id: I53785cad537a3d4846661a7b0780543226ea3928

8 years agoFix merging HLoadClass with HNewInstance.
Vladimir Marko [Wed, 29 Jun 2016 13:59:07 +0000 (14:59 +0100)]
Fix merging HLoadClass with HNewInstance.

Do not merge HLoadClass with HNewInstance if they do not
come from the same dex instruction. This is the same check
as for moving the clinit check responsibility around.

Test: Added a regression test, run standard ART test suite
plus gcstress and ndebug modes on host and Nexus 9.

Bug: 29570861
Bug: 29321958
Change-Id: Id8b67492ec1f58326ca0509af3f5a57257e7aea3

8 years agoMerge "Clean up profiler options"
Treehugger Robot [Wed, 29 Jun 2016 15:28:51 +0000 (15:28 +0000)]
Merge "Clean up profiler options"

8 years agoMerge "Fix interpreter tests."
Nicolas Geoffray [Wed, 29 Jun 2016 13:57:20 +0000 (13:57 +0000)]
Merge "Fix interpreter tests."

8 years agoFix interpreter tests.
Nicolas Geoffray [Wed, 29 Jun 2016 13:54:35 +0000 (14:54 +0100)]
Fix interpreter tests.

Monitor operations can throw NPEs.

bug:29321958
Change-Id: If7a2e35a2073a7984a5126a826e722c918ba8d3a

8 years agoMerge "Fix mac build."
Nicolas Geoffray [Wed, 29 Jun 2016 13:37:03 +0000 (13:37 +0000)]
Merge "Fix mac build."

8 years agoFix mac build.
Nicolas Geoffray [Wed, 29 Jun 2016 13:34:21 +0000 (14:34 +0100)]
Fix mac build.

bug:29321958
Change-Id: Ibd51d408dd97876eb3237df5606dbe9290ca7254

8 years agoClean up profiler options
Calin Juravle [Tue, 28 Jun 2016 18:36:58 +0000 (19:36 +0100)]
Clean up profiler options

- remove obsolete options
- using ProfileSaverOptions instead of hard-coded values in the profile
saver

Bug: 24698874
Change-Id: I4ff535d29a644d1bd5509844f89615b70a723749
Test: cmdline_parser_test, gtest and run-tests pass.

8 years agoMerge "Integer.bitCount and Long.bitCount intrinsics for ARM"
Treehugger Robot [Wed, 29 Jun 2016 12:45:44 +0000 (12:45 +0000)]
Merge "Integer.bitCount and Long.bitCount intrinsics for ARM"

8 years agoInteger.bitCount and Long.bitCount intrinsics for ARM
xueliang.zhong [Tue, 24 May 2016 14:37:28 +0000 (15:37 +0100)]
Integer.bitCount and Long.bitCount intrinsics for ARM

Change-Id: Ia535865721313e72925fdec851a759470173cf89

8 years agoMerge "Remove the old obsolete profiler"
Treehugger Robot [Wed, 29 Jun 2016 12:34:35 +0000 (12:34 +0000)]
Merge "Remove the old obsolete profiler"

8 years agoMerge "Do checks on the fault address when we think it's an NPE."
Treehugger Robot [Wed, 29 Jun 2016 12:33:23 +0000 (12:33 +0000)]
Merge "Do checks on the fault address when we think it's an NPE."

8 years agoMerge "ARM64: Ensure stricter alignment when loading and storing register pairs"
Treehugger Robot [Wed, 29 Jun 2016 11:34:00 +0000 (11:34 +0000)]
Merge "ARM64: Ensure stricter alignment when loading and storing register pairs"

8 years agoDo checks on the fault address when we think it's an NPE.
Nicolas Geoffray [Tue, 28 Jun 2016 17:08:46 +0000 (18:08 +0100)]
Do checks on the fault address when we think it's an NPE.

bug:29321958
Change-Id: I28f4da56eb3e0b48721d3ac41114858bc80daadb

8 years agoMerge "Revert "Optimize IMT""
Nicolas Geoffray [Wed, 29 Jun 2016 08:41:44 +0000 (08:41 +0000)]
Merge "Revert "Optimize IMT""

8 years agoRevert "Optimize IMT"
Nicolas Geoffray [Wed, 29 Jun 2016 08:17:52 +0000 (08:17 +0000)]
Revert "Optimize IMT"

Bug: 29188168 (for initial CL)
Bug: 29778499 (reason for revert)

This reverts commit badee9820fcf5dca5f8c46c3215ae1779ee7736e.

Change-Id: I32b8463122c3521e233c34ca95c96a5078e88848

8 years agoMerge "Revert "Refactor GetIMTIndex""
Nicolas Geoffray [Wed, 29 Jun 2016 08:40:14 +0000 (08:40 +0000)]
Merge "Revert "Refactor GetIMTIndex""

8 years agoRevert "Refactor GetIMTIndex"
Nicolas Geoffray [Wed, 29 Jun 2016 08:39:47 +0000 (08:39 +0000)]
Revert "Refactor GetIMTIndex"

I need to revert this to get https://android-review.googlesource.com/#/c/244190/ to cleanly revert. Matthew, do you mind rewriting it?

This reverts commit 50706437d8216e41f0fea1e413cda7891324d397.

Change-Id: I5c1435f5dffb46dbb5b613b22adb88c7770304f2

8 years agoMerge "Revert "Propagate flags to ShouldHaveEmbeddedVTable""
Nicolas Geoffray [Wed, 29 Jun 2016 08:20:29 +0000 (08:20 +0000)]
Merge "Revert "Propagate flags to ShouldHaveEmbeddedVTable""

8 years agoRevert "Propagate flags to ShouldHaveEmbeddedVTable"
Nicolas Geoffray [Wed, 29 Jun 2016 08:19:04 +0000 (08:19 +0000)]
Revert "Propagate flags to ShouldHaveEmbeddedVTable"

Bug: 29188168 (for initial CL)
Bug: 29778499 (reason for revert)

This reverts commit efeb9f01308c5c4b723ff905cf5bea1636f7a549.

Change-Id: I21bc32fa07014bbce2eedba3686f09d3d45aec65

8 years agoMerge "Add ability to generate a random test profile"
Treehugger Robot [Tue, 28 Jun 2016 17:18:07 +0000 (17:18 +0000)]
Merge "Add ability to generate a random test profile"

8 years agoMerge "ARM assembler support for VCNT and VPADDL."
Treehugger Robot [Tue, 28 Jun 2016 14:25:37 +0000 (14:25 +0000)]
Merge "ARM assembler support for VCNT and VPADDL."

8 years agoARM assembler support for VCNT and VPADDL.
xueliang.zhong [Mon, 13 Jun 2016 13:42:27 +0000 (14:42 +0100)]
ARM assembler support for VCNT and VPADDL.

Test: Gtest assembler_thumb2_test.
Change-Id: I8a0e47da746e1c67650cb68196a9f661deed7383

8 years agoMerge "Add debug option to ignore checksum checks in profiles."
Treehugger Robot [Tue, 28 Jun 2016 13:25:56 +0000 (13:25 +0000)]
Merge "Add debug option to ignore checksum checks in profiles."

8 years agoRemove the old obsolete profiler
Calin Juravle [Thu, 23 Jun 2016 16:09:13 +0000 (17:09 +0100)]
Remove the old obsolete profiler

Bug: 24698874
Test: all the existing run-tests pass.
Change-Id: I56d25c75541275512a64ae5708569461b875df9c

8 years agoAdd ability to generate a random test profile
Calin Juravle [Tue, 7 Jun 2016 15:14:47 +0000 (16:14 +0100)]
Add ability to generate a random test profile

This is usefull to drive automated profile guided compilations.

Test: added TestProfileGeneration in profile_assistant_test.

bug: 29066961
Change-Id: Ib7ce7de898abefae1c2cf1b8ff16c4f0fc9b0d0e

8 years agoAdd debug option to ignore checksum checks in profiles.
Calin Juravle [Wed, 8 Jun 2016 13:24:13 +0000 (14:24 +0100)]
Add debug option to ignore checksum checks in profiles.

Test: existing tests passing, profile_compilation_info_test.

Bug: 29066961
Change-Id: I6084f50d6a6ada7407e1c7ad92fea9af3351715e

8 years agoMerge "Optimize away useless masking operations on shift amounts."
Treehugger Robot [Tue, 28 Jun 2016 10:33:35 +0000 (10:33 +0000)]
Merge "Optimize away useless masking operations on shift amounts."

8 years agoMerge "MIPS64: Remove the workaround in VisitInvokeStaticOrDirect"
Treehugger Robot [Tue, 28 Jun 2016 10:29:56 +0000 (10:29 +0000)]
Merge "MIPS64: Remove the workaround in VisitInvokeStaticOrDirect"

8 years agoMerge "Fix 004-ThreadStress."
Vladimir Marko [Tue, 28 Jun 2016 10:07:38 +0000 (10:07 +0000)]
Merge "Fix 004-ThreadStress."

8 years agoARM64: Ensure stricter alignment when loading and storing register pairs
Anton Kirilov [Fri, 10 Jun 2016 16:46:12 +0000 (17:46 +0100)]
ARM64: Ensure stricter alignment when loading and storing register pairs

The impetus for this change is the fact that loads that cross a 64 byte
boundary and stores that cross a 16 byte boundary are a performance issue
on Cortex-A57 and A72.

Change-Id: I81263dc72272192ad2d190b741a955f175880461

8 years agoMerge "Optimizing: Do not depend on sharpening in test 450"
Treehugger Robot [Tue, 28 Jun 2016 10:05:42 +0000 (10:05 +0000)]
Merge "Optimizing: Do not depend on sharpening in test 450"

8 years agoMerge "MIPS32: Drop redundant moves in integer conversions"
Treehugger Robot [Tue, 28 Jun 2016 09:49:33 +0000 (09:49 +0000)]
Merge "MIPS32: Drop redundant moves in integer conversions"

8 years agoMerge "Clean up StringReferenceValueComparator and DexFile."
Vladimir Marko [Tue, 28 Jun 2016 08:57:50 +0000 (08:57 +0000)]
Merge "Clean up StringReferenceValueComparator and DexFile."

8 years agoOptimize away useless masking operations on shift amounts.
Alexandre Rames [Mon, 27 Jun 2016 10:39:19 +0000 (11:39 +0100)]
Optimize away useless masking operations on shift amounts.

Change-Id: I90d69757cc45312eda3d57cc2d32bfb4e47963f5

8 years agoMerge "Revert "Gray only immune objects mutators access.""
Nicolas Geoffray [Tue, 28 Jun 2016 08:26:16 +0000 (08:26 +0000)]
Merge "Revert "Gray only immune objects mutators access.""

8 years agoRevert "Gray only immune objects mutators access."
Nicolas Geoffray [Tue, 28 Jun 2016 08:25:59 +0000 (08:25 +0000)]
Revert "Gray only immune objects mutators access."

Fails with:
    art F 11338 11338 art/runtime/gc/collector/concurrent_copying-inl.h:83] Check failed: !kGrayImmuneObject || updated_all_immune_objects_.LoadRelaxed() || gc_grays_immune_objects_

Bug: 29516465
Bug: 12687968

This reverts commit 16292fcc98f03690576d0739b2e5fb04b375933c.

Change-Id: I1d2d988b7707e03cc94f019cf8bef5b9a9099060

8 years agoMerge "Gray only immune objects mutators access."
Treehugger Robot [Tue, 28 Jun 2016 01:20:50 +0000 (01:20 +0000)]
Merge "Gray only immune objects mutators access."

8 years agoGray only immune objects mutators access.
Hiroshi Yamauchi [Tue, 21 Jun 2016 03:23:34 +0000 (20:23 -0700)]
Gray only immune objects mutators access.

To reduce image/zygote dirty pages.

GC doesn't gray immune space objects except when visiting the thread
GC roots of suspended threads during the thread flip. GC updates the
fields of immune space objects without pushing/popping them through
the mark stack. GC sets a bool flag after updating the fields of
immune space objects. After this point, mutators don't need gray to
immune space objects. Removed the mark bitmaps for immune spaces.

Bug: 29516465
Bug: 12687968
Test: art tests, libartd device boot, ritzperf.
Change-Id: Idfcffbdb94dfc8bfc89c30d6aff8888f04990a56

8 years agoMerge "ART: Disable no-prebuild test for run-test 608"
Andreas Gampe [Mon, 27 Jun 2016 22:52:38 +0000 (22:52 +0000)]
Merge "ART: Disable no-prebuild test for run-test 608"

8 years agoMIPS32: Drop redundant moves in integer conversions
Alexey Frunze [Mon, 27 Jun 2016 22:20:11 +0000 (15:20 -0700)]
MIPS32: Drop redundant moves in integer conversions

Change-Id: I0e3f393d87538eb9e35b3012ea36e81c8b7a225e

8 years agoART: Disable no-prebuild test for run-test 608
Andreas Gampe [Mon, 27 Jun 2016 21:55:02 +0000 (14:55 -0700)]
ART: Disable no-prebuild test for run-test 608

This test relies on unresolved types, which is not the case in a
no-prebuild setting (as all parts will be on the classpath).

Bug: 29433999
Change-Id: I11b1c6b446905aacd7a520796d0b2217319cefc7
Test: m ART_TEST_RUN_TEST_NO_PREBUILD=true test-art-host-run-test

8 years agoMerge "Do not remove loads/store with unresolved accesses."
Treehugger Robot [Mon, 27 Jun 2016 18:36:47 +0000 (18:36 +0000)]
Merge "Do not remove loads/store with unresolved accesses."

8 years agoDo not remove loads/store with unresolved accesses.
Nicolas Geoffray [Mon, 27 Jun 2016 09:03:29 +0000 (10:03 +0100)]
Do not remove loads/store with unresolved accesses.

Due to AOT and compiling classes that are not ready yet
(eg missing a super class), we need to be conservative when
accessing fields and can end up in a situation where the same
field can be resolved and unresolved within the same method
(because of inlining). Therefore, disable removing loads and
stores in a method when there are unresolved accesses.

bug:29433999

Change-Id: I8fcfb52c584222474a8220eb16c6581350b702e0

8 years agoClean up StringReferenceValueComparator and DexFile.
Vladimir Marko [Mon, 27 Jun 2016 12:50:16 +0000 (13:50 +0100)]
Clean up StringReferenceValueComparator and DexFile.

Add a helper function to StringReference, so that the
StringReferenceValueComparator doesn't need to repeatedly
reference the same StringReference variable which led to
the bug 29602109.

Also clean up the DexFile, moving definitions of functions
that depend on the dex_file-inl.h from dex_file.h also to
the dex_file-inl.h.

Test: Run standard ART test suite on host and Nexus 5.
Bug: 29602109
Change-Id: I83e2aa67173c62b3432c26478e528bbb53b6d09f

8 years agoOptimizing: Do not depend on sharpening in test 450
Goran Jakovljevic [Mon, 27 Jun 2016 12:12:48 +0000 (14:12 +0200)]
Optimizing: Do not depend on sharpening in test 450

The sharpening may or may not remove the ArtMethod*
parameter, so the test must not depend on its absence.
This fixes the test 450 checker test on mips/mips64.

Change-Id: Ie62c5a7da5994c3b0c6f0452c9abb37575216806

8 years agoMerge "Fixes and cleaning for test/458-checker-instruction-simplification."
Roland Levillain [Mon, 27 Jun 2016 12:29:37 +0000 (12:29 +0000)]
Merge "Fixes and cleaning for test/458-checker-instruction-simplification."

8 years agoFix 004-ThreadStress.
Vladimir Marko [Tue, 21 Jun 2016 17:21:53 +0000 (18:21 +0100)]
Fix 004-ThreadStress.

Synchronize the start of performing the tasks after all
threads have been created and runners reported their start.
This prevents a daemon thread from allocating all memory
before the main thread tries to allocate the next daemon
thread, which is the likely culprit of failing to print any
output whatsoever (the main thread exits due to an uncaught
OOME and printing the message also fails due to OOME).

Instead of repeating attempts to print "Finishing worker"
until it succeeds, print the message through JNI which does
not require any Java heap memory. Similarly, print caught
Throwables through JNI. Also make sure to preallocate
Strings that are used once we start running tasks to avoid
const-string throwing OOME. This also prevents a partial
success followed by a retry; we have seen a failure to
print the EOL, yielding "Finishing workerFinishing worker".

Change the "Thread exited..." message to be printed only in
DEBUG mode and compare the full output, ignoring different
numbers as the "Starting worker for <id>" may be reordered.

Test: "make -j 32 test-art-host-run-test-004-ThreadStress"
    (4 configs: with or without gcstress, 32-bit and 64-bit)
    100 times while also keeping the machine under load with
    "make -j 32" to repeatedly build another full AOSP tree.
Bug: 27371304
Change-Id: I28286d70a08be64c36d0e49dd5558686813ff264

8 years agoFixes and cleaning for test/458-checker-instruction-simplification.
Alexandre Rames [Mon, 27 Jun 2016 10:13:34 +0000 (11:13 +0100)]
Fixes and cleaning for test/458-checker-instruction-simplification.

- Use the `doThrow` trick to defeat inlining.
- Fix the order of `expected` and `found` arguments for a few tests.

Change-Id: Id8e5041993d72f61e75b4586b49180006cda4b5c

8 years agoMerge "ART: OneBit intrinsics should use 1ULL for 64-bit shift"
Treehugger Robot [Fri, 24 Jun 2016 18:58:53 +0000 (18:58 +0000)]
Merge "ART: OneBit intrinsics should use 1ULL for 64-bit shift"

8 years agoMerge "Adjust ART tests expectations after libcore changes."
Treehugger Robot [Fri, 24 Jun 2016 18:53:48 +0000 (18:53 +0000)]
Merge "Adjust ART tests expectations after libcore changes."

8 years agoAdjust ART tests expectations after libcore changes.
Roland Levillain [Fri, 24 Jun 2016 17:44:36 +0000 (18:44 +0100)]
Adjust ART tests expectations after libcore changes.

Test: test/100-reflect2, test/201-built-in-exception-detail-messages
Change-Id: I0c13e37973d0b954cbafa15b049cb8934b88ebe5

8 years agoMerge "Fix StringReferenceValueComparator."
Vladimir Marko [Fri, 24 Jun 2016 15:48:31 +0000 (15:48 +0000)]
Merge "Fix StringReferenceValueComparator."

8 years agoFix StringReferenceValueComparator.
Vladimir Marko [Fri, 24 Jun 2016 10:56:59 +0000 (11:56 +0100)]
Fix StringReferenceValueComparator.

Test: Added a regression test in string_reference_test.cc,
run the standard ART test suite on host and Nexus 5.

Bug: 29602109
Change-Id: Idcc059a07df048a0e3ece257b16b6556f242243e

8 years agoMerge changes I4d8da7ce,I4da5be01,Idfbead82
Roland Levillain [Fri, 24 Jun 2016 13:04:36 +0000 (13:04 +0000)]
Merge changes I4d8da7ce,I4da5be01,Idfbead82

* changes:
  Re-enable most intrinsics with read barriers.
  Fix ARM & ARM64 UnsafeGetObject intrinsics with read barriers.
  Fix x86 & x86-64 UnsafeGetObject intrinsics with read barriers.

8 years agoMerge "Track libcore change 694e617f54a7bfbdad24913ce96f5d56f1a1960a"
Przemyslaw Szczepaniak [Fri, 24 Jun 2016 11:16:20 +0000 (11:16 +0000)]
Merge "Track libcore change 694e617f54a7bfbdad24913ce96f5d56f1a1960a"

8 years agoART: OneBit intrinsics should use 1ULL for 64-bit shift
Pavel Vyssotski [Wed, 22 Jun 2016 06:36:10 +0000 (12:36 +0600)]
ART: OneBit intrinsics should use 1ULL for 64-bit shift

Change-Id: I91cbe769081045e6a45a95154a8a8acf1ec352ef
Signed-off-by: Pavel Vyssotski <pavel.n.vyssotski@intel.com>
8 years agoMerge "ART: Run RTP if invoke inputs have more specific type"
David Brazdil [Thu, 23 Jun 2016 17:37:51 +0000 (17:37 +0000)]
Merge "ART: Run RTP if invoke inputs have more specific type"

8 years agoMerge "elf_builder: Fix Mips header flags"
Greg Kaiser [Thu, 23 Jun 2016 16:26:24 +0000 (16:26 +0000)]
Merge "elf_builder: Fix Mips header flags"

8 years agoMerge "OatFileAssistantTest: do not relocate image randomly."
Richard Uhler [Thu, 23 Jun 2016 16:14:58 +0000 (16:14 +0000)]
Merge "OatFileAssistantTest: do not relocate image randomly."

8 years agoMIPS64: Remove the workaround in VisitInvokeStaticOrDirect
Goran Jakovljevic [Thu, 23 Jun 2016 09:49:30 +0000 (11:49 +0200)]
MIPS64: Remove the workaround in VisitInvokeStaticOrDirect

This is not needed since $s2-$s8 are not blocked any more. This is
follow-up change for I325ab403752c6b9cd788147cb8b21d42aaff629e.

Change-Id: I934a21adb85581e137a6dcb3355605742b085d83

8 years agoART: Run RTP if invoke inputs have more specific type
David Brazdil [Tue, 21 Jun 2016 16:48:19 +0000 (17:48 +0100)]
ART: Run RTP if invoke inputs have more specific type

Moving RTP inside the graph builder introduced a regression where
replacing the inner parameters with the actual arguments of the
HInvoke would not build the inner graph with types more specific
than the method's signature.

This patch runs RTP on the inner graph again when it is detected
that RTP may improve typing precision.

Bug: 29595335
Change-Id: I351babc8497c83c2fba589aa51f46eaa0b7ab33c

8 years agoRe-enable most intrinsics with read barriers.
Roland Levillain [Thu, 23 Jun 2016 12:53:42 +0000 (13:53 +0100)]
Re-enable most intrinsics with read barriers.

Also extend sun.misc.Unsafe test coverage to exercise
sun.misc.Unsafe.{get,put}{Int,Long,Object}Volatile.

Bug: 26205973
Bug: 29516905
Change-Id: I4d8da7cee5c8a310c8825c1631f71e5cb2b80b30
Test: Covered by ART's run-tests.

8 years agoFix ARM & ARM64 UnsafeGetObject intrinsics with read barriers.
Roland Levillain [Thu, 23 Jun 2016 12:48:47 +0000 (13:48 +0100)]
Fix ARM & ARM64 UnsafeGetObject intrinsics with read barriers.

The implementation was incorrectly interpreting the 'offset'
input as an index in a (4-byte) object reference array,
whereas it is a (1-byte) offset to an object reference field
within the 'base' (object) input.

Bug: 29516905
Change-Id: I4da5be0193217965f25e5d141c242592dea6ffe8
Test: Covered by test/004-UnsafeTest.