OSDN Git Service

android-x86/art.git
8 years agoRevert "Revert "Revert "Revert "ART: Enable Jit Profiling in Mterp for arm/arm64""""
Bill Buzbee [Thu, 11 Feb 2016 22:37:42 +0000 (22:37 +0000)]
Revert "Revert "Revert "Revert "ART: Enable Jit Profiling in Mterp for arm/arm64""""

This reverts commit 5d03317a834efdf3b5240c401f1bc2ceac7a2f25.

We need to catch all possible cases in which new instrumentation appears
or the debugger is attached, and then switch to the reference interpreter
if necessary.  We may, in a future CL, use the alt-mterp mechanism to accompish
this (as did Dalvik).

Only enables Arm64 for now.  Once it survives extended testing, will enable
arm and update x86.

Updated OSR handling to match other interpreters.

Change-Id: I076f1d752d6f59899876bab26b18e2221cd92f69

8 years agoMerge "Set bias on != comparison for isNaN."
Aart Bik [Thu, 18 Feb 2016 00:06:17 +0000 (00:06 +0000)]
Merge "Set bias on != comparison for isNaN."

8 years agoSet bias on != comparison for isNaN.
Aart Bik [Wed, 17 Feb 2016 23:13:56 +0000 (15:13 -0800)]
Set bias on != comparison for isNaN.

Change-Id: I83969ecf7252b5e001bdd501c4ca31e7d0608854

8 years agoMerge "Clean up register line"
Mathieu Chartier [Wed, 17 Feb 2016 22:13:46 +0000 (22:13 +0000)]
Merge "Clean up register line"

8 years agoMerge "Implement isNaN intrinsic through HIR equivalent."
Aart Bik [Wed, 17 Feb 2016 22:03:15 +0000 (22:03 +0000)]
Merge "Implement isNaN intrinsic through HIR equivalent."

8 years agoImplement isNaN intrinsic through HIR equivalent.
Aart Bik [Wed, 17 Feb 2016 18:41:50 +0000 (10:41 -0800)]
Implement isNaN intrinsic through HIR equivalent.

Rationale:
Efficient implementation on all platforms.
Subject to better compiler optimizations.

Change-Id: Ie8876bf5943cbe1138491a25d32ee9fee554043c

8 years agoClean up register line
Mathieu Chartier [Wed, 17 Feb 2016 19:04:20 +0000 (11:04 -0800)]
Clean up register line

Fixed formatting and style. Also added proper null handling for arena
deleter.

Change-Id: I6a44cb29ca6ad17b35e18dc6be1d12416f211631

8 years agoMerge "Only visit pointer arrays once during image relocation"
Mathieu Chartier [Wed, 17 Feb 2016 18:45:26 +0000 (18:45 +0000)]
Merge "Only visit pointer arrays once during image relocation"

8 years agoOnly visit pointer arrays once during image relocation
Mathieu Chartier [Wed, 17 Feb 2016 01:16:01 +0000 (17:16 -0800)]
Only visit pointer arrays once during image relocation

Previously they could get visited twice, this caused corruption of
the app image if a pointer was updated twice.

Bug: 22858531
Change-Id: I1f1ba1ba5dc205be07dba51bc6ce7a825c82b33a

8 years agoMerge "Revert "Allow method references across oat files for multi-image.""
Vladimir Marko [Wed, 17 Feb 2016 17:46:30 +0000 (17:46 +0000)]
Merge "Revert "Allow method references across oat files for multi-image.""

8 years agoRevert "Allow method references across oat files for multi-image."
Vladimir Marko [Wed, 17 Feb 2016 17:46:10 +0000 (17:46 +0000)]
Revert "Allow method references across oat files for multi-image."

Breaks Quick tests.

This reverts commit 6065402316da2b51eed5fc34cffbd991766bd408.

Change-Id: I8a5469ba7cea5f46b85cb489b3e0ef06ed548f03

8 years agoMerge "Fix uses of art::HCompare::IsGtBias on MIPS32 and MIPS64."
Roland Levillain [Wed, 17 Feb 2016 16:56:49 +0000 (16:56 +0000)]
Merge "Fix uses of art::HCompare::IsGtBias on MIPS32 and MIPS64."

8 years agoFix uses of art::HCompare::IsGtBias on MIPS32 and MIPS64.
Roland Levillain [Wed, 17 Feb 2016 16:49:37 +0000 (16:49 +0000)]
Fix uses of art::HCompare::IsGtBias on MIPS32 and MIPS64.

Do not call this method on non floating-point HCompare
instructions.

Change-Id: I262ab23f48d32295641063f897dca02cb92eb2e2

8 years agoMerge "Allow method references across oat files for multi-image."
Vladimir Marko [Wed, 17 Feb 2016 16:50:13 +0000 (16:50 +0000)]
Merge "Allow method references across oat files for multi-image."

8 years agoAllow method references across oat files for multi-image.
Vladimir Marko [Tue, 16 Feb 2016 12:50:23 +0000 (12:50 +0000)]
Allow method references across oat files for multi-image.

These were disabled because we didn't have sufficient
information about the multi-image layout when processing
link-time patches in OatWriter. This CL refactors the
ELF file creation so that the information is available.

Change-Id: I6f2e8dc8572d143c72cc2693bb0ba4fd76f889ab

8 years agoMerge "Build jdwp tests with Jack in vogar"
Sebastien Hertz [Wed, 17 Feb 2016 16:24:52 +0000 (16:24 +0000)]
Merge "Build jdwp tests with Jack in vogar"

8 years agoBuild jdwp tests with Jack in vogar
Sebastien Hertz [Wed, 17 Feb 2016 16:05:52 +0000 (17:05 +0100)]
Build jdwp tests with Jack in vogar

These tests are compiled with Jack in the CTS so we do the same
with vogar now.

Bug: 27218415
Change-Id: I69b86e02a6532c1885c4d40f0768bf2b353c9569

8 years agoMerge "Extend constant folding to float and double operations."
Roland Levillain [Wed, 17 Feb 2016 15:44:04 +0000 (15:44 +0000)]
Merge "Extend constant folding to float and double operations."

8 years agoMerge "Add simple deduplication for .debug_ranges."
David Srbecky [Wed, 17 Feb 2016 15:34:16 +0000 (15:34 +0000)]
Merge "Add simple deduplication for .debug_ranges."

8 years agoMerge "MIPS32: peek*/poke*, and String.charAt intrinsics."
Roland Levillain [Wed, 17 Feb 2016 14:47:03 +0000 (14:47 +0000)]
Merge "MIPS32: peek*/poke*, and String.charAt intrinsics."

8 years agoExtend constant folding to float and double operations.
Roland Levillain [Tue, 16 Feb 2016 12:21:02 +0000 (12:21 +0000)]
Extend constant folding to float and double operations.

Change-Id: I2837064b2ceea587bc171fc520507f13355292c6

8 years agoMerge "Be a bit smarter with JIT code triggering deoptimization."
Nicolas Geoffray [Wed, 17 Feb 2016 12:09:53 +0000 (12:09 +0000)]
Merge "Be a bit smarter with JIT code triggering deoptimization."

8 years agoBe a bit smarter with JIT code triggering deoptimization.
Nicolas Geoffray [Wed, 17 Feb 2016 11:31:49 +0000 (11:31 +0000)]
Be a bit smarter with JIT code triggering deoptimization.

Do not re-use an OSR method that triggered deoptimization.
Also add a stack overflow check before doing OSR.

bug:27094810
Change-Id: I6ff6a7fb9b3df9b7c0ff37e3610595efa70ad067

8 years agoMerge "Support CMOV for x86 Select"
David Brazdil [Wed, 17 Feb 2016 11:06:40 +0000 (11:06 +0000)]
Merge "Support CMOV for x86 Select"

8 years agoMerge "We also need to delete osr entries when deleting ArtMethod."
Nicolas Geoffray [Wed, 17 Feb 2016 10:17:18 +0000 (10:17 +0000)]
Merge "We also need to delete osr entries when deleting ArtMethod."

8 years agoMerge "dex2oat: Show memory usage values in bytes"
Vladimir Marko [Wed, 17 Feb 2016 10:09:00 +0000 (10:09 +0000)]
Merge "dex2oat: Show memory usage values in bytes"

8 years agoWe also need to delete osr entries when deleting ArtMethod.
Nicolas Geoffray [Wed, 17 Feb 2016 09:49:19 +0000 (09:49 +0000)]
We also need to delete osr entries when deleting ArtMethod.

In the unfortunate event an ArtMethod gets allocated at the
same location as an old (deleted) ArtMethod, the osr_code_map_
lookup will succeed and return garbage. So we need to delete
entries in the osr_code_map_ when an ArtMethod gets deleted.

This should finally fix:
dalvik.system.DexClassLoaderTest#test_twoJar_diff_getResourceAsStream

Change-Id: I7c8b775c3376a6cfcb907f09b783e393967ad82d

8 years agoMerge "Add custom arena deleter for RegisterLine"
Mathieu Chartier [Tue, 16 Feb 2016 23:12:02 +0000 (23:12 +0000)]
Merge "Add custom arena deleter for RegisterLine"

8 years agoAdd custom arena deleter for RegisterLine
Mathieu Chartier [Tue, 16 Feb 2016 22:06:35 +0000 (14:06 -0800)]
Add custom arena deleter for RegisterLine

Previously it protected by using sizeof(RegisterLine) but this was
not accurate due to register lines being variable sized.

Bug: 27156726
Change-Id: Ia4b134b85a2e61993d17bd4f0eff60c89c164dc3

8 years agoMerge "ahat: annotate char[] objects with their string values."
Richard Uhler [Tue, 16 Feb 2016 16:56:10 +0000 (16:56 +0000)]
Merge "ahat: annotate char[] objects with their string values."

8 years agoMerge "Refactor the inliner."
Nicolas Geoffray [Tue, 16 Feb 2016 16:54:19 +0000 (16:54 +0000)]
Merge "Refactor the inliner."

8 years agoMerge "X86: Allow long compares to stack operands"
Nicolas Geoffray [Tue, 16 Feb 2016 16:54:00 +0000 (16:54 +0000)]
Merge "X86: Allow long compares to stack operands"

8 years agoahat: annotate char[] objects with their string values.
Richard Uhler [Thu, 11 Feb 2016 16:48:24 +0000 (08:48 -0800)]
ahat: annotate char[] objects with their string values.

Bug: 26987597
Change-Id: I1b0bf711c642f4b8a7fe56f0cd27496761db4147

8 years agoRefactor the inliner.
Nicolas Geoffray [Tue, 16 Feb 2016 15:37:12 +0000 (15:37 +0000)]
Refactor the inliner.

In preparation for more polymorphic inlining, refactor the inliner
a bit.

Change-Id: Ie3fd6c1ef205f1089989c67a527e6f57ff3c8b5d

8 years agoMerge "HInvokeStaticOrDirect may not have a special input."
Nicolas Geoffray [Tue, 16 Feb 2016 15:43:27 +0000 (15:43 +0000)]
Merge "HInvokeStaticOrDirect may not have a special input."

8 years agoX86: Allow long compares to stack operands
Mark Mendell [Tue, 16 Feb 2016 15:41:46 +0000 (10:41 -0500)]
X86: Allow long compares to stack operands

There is no need to force the RHS stack operand into a register for a
long comparison.

Change-Id: Ie86851a54ec2dc9a9f61443e59219a8994dc01bb
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
8 years agoMerge "Remove some outdated comments in art tests"
Yohann Roussel [Tue, 16 Feb 2016 15:37:09 +0000 (15:37 +0000)]
Merge "Remove some outdated comments in art tests"

8 years agoHInvokeStaticOrDirect may not have a special input.
Nicolas Geoffray [Tue, 16 Feb 2016 15:33:54 +0000 (15:33 +0000)]
HInvokeStaticOrDirect may not have a special input.

For irreducible loops, we disable the generation of
HX86ComputeBaseMethodAddress, so intrinsics code should not assume
it's there.

bug:27149923

Change-Id: I78ba0ca7aefa4033227c77ba438b6eaca53dadd9

8 years agoRemove some outdated comments in art tests
Yohann Roussel [Tue, 16 Feb 2016 15:25:09 +0000 (16:25 +0100)]
Remove some outdated comments in art tests

Change-Id: I5604bd8d9a433eb513a516b1839b55c88c329329

8 years agoSupport CMOV for x86 Select
Mark Mendell [Sat, 6 Feb 2016 18:58:35 +0000 (13:58 -0500)]
Support CMOV for x86 Select

If possible, generate CMOV to implement HSelect.  Tricky cases are a
long or FP condition (no single CC generated), FP inputs (no FP CMOV)
and when the condition is a boolean or not emitted at the use site.
In these cases, keep using the existing HSelect code.

Change-Id: I4ff1e152b8ef126fbbabeb3316e9e2b6a6b74aeb
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
8 years agoMerge "Remove usages of jill.jar, use jack instead"
Yohann Roussel [Tue, 16 Feb 2016 15:10:35 +0000 (15:10 +0000)]
Merge "Remove usages of jill.jar, use jack instead"

8 years agoRemove usages of jill.jar, use jack instead
Yohann Roussel [Tue, 19 Jan 2016 16:07:18 +0000 (17:07 +0100)]
Remove usages of jill.jar, use jack instead

Change-Id: Icb403ee6fb5bf287d2b72bb253b683b1d95f4e07

8 years agoMerge "Follow-up to OSR change."
Nicolas Geoffray [Tue, 16 Feb 2016 13:53:53 +0000 (13:53 +0000)]
Merge "Follow-up to OSR change."

8 years agoFollow-up to OSR change.
Nicolas Geoffray [Tue, 16 Feb 2016 12:06:05 +0000 (12:06 +0000)]
Follow-up to OSR change.

Change-Id: I99677697178273490201a22aba21dfe5b8e2c8ba

8 years agoMerge "Remove code cache check from native bridge run-test"
Calin Juravle [Tue, 16 Feb 2016 11:54:11 +0000 (11:54 +0000)]
Merge "Remove code cache check from native bridge run-test"

8 years agoRemove code cache check from native bridge run-test
Calin Juravle [Mon, 15 Feb 2016 18:35:22 +0000 (18:35 +0000)]
Remove code cache check from native bridge run-test

Every now and them the native bridge run-test failed because the code
cache cannot be found. I suspect a temporary I/O issue when stat-ing the
directory. However I could not verify yet that's actually the cause.

Native bridge can work without a code_cache so we can relax the test
until we figure out the flakiness.

Bug: 27189715
Change-Id: I2ad3f93e80c0e2df89adf1d9d2afe1087c10af08

8 years agoMerge "Change how DWARF detects end of prologue."
David Srbecky [Tue, 16 Feb 2016 11:37:37 +0000 (11:37 +0000)]
Merge "Change how DWARF detects end of prologue."

8 years agoMerge "Fix test by checking if we're using JIT."
Nicolas Geoffray [Tue, 16 Feb 2016 11:31:24 +0000 (11:31 +0000)]
Merge "Fix test by checking if we're using JIT."

8 years agoFix test by checking if we're using JIT.
Nicolas Geoffray [Tue, 16 Feb 2016 11:30:48 +0000 (11:30 +0000)]
Fix test by checking if we're using JIT.

Change-Id: Ifa98815ee2f8af4f338c9469f5afd74fc01022eb

8 years agoChange how DWARF detects end of prologue.
David Srbecky [Tue, 9 Feb 2016 18:16:35 +0000 (18:16 +0000)]
Change how DWARF detects end of prologue.

Instead of ignoring stack map without dex register maps altogether,
explicitly calculate end of prologue as first stack map which has
dex register maps. This gives us more line number mappings.

Change-Id: I643cf0f9daf9762d894fbc94f5ff981ef6c0583b

8 years agoAdd simple deduplication for .debug_ranges.
David Srbecky [Wed, 10 Feb 2016 14:35:34 +0000 (14:35 +0000)]
Add simple deduplication for .debug_ranges.

Variables with same scope can usually share .debug_ranges entries.

Change-Id: I855f456782afdcc8ac5f622365d62ba8950a5c95

8 years agoMerge "Revert "Revert "Make it possible to enable native debugging through debug...
Tamas Berghammer [Tue, 16 Feb 2016 11:04:37 +0000 (11:04 +0000)]
Merge "Revert "Revert "Make it possible to enable native debugging through debug flags"""

8 years agoMerge "Fill some gaps in .debug_loc."
David Srbecky [Tue, 16 Feb 2016 11:00:39 +0000 (11:00 +0000)]
Merge "Fill some gaps in .debug_loc."

8 years agoMerge "Temporarily disable compressed CFI tests."
David Srbecky [Tue, 16 Feb 2016 10:59:16 +0000 (10:59 +0000)]
Merge "Temporarily disable compressed CFI tests."

8 years agoMerge "Re-enable OSR."
Nicolas Geoffray [Tue, 16 Feb 2016 10:53:02 +0000 (10:53 +0000)]
Merge "Re-enable OSR."

8 years agoRe-enable OSR.
Nicolas Geoffray [Tue, 16 Feb 2016 10:03:44 +0000 (10:03 +0000)]
Re-enable OSR.

1) Fix flaky test by doing explicit ProfilingInfo allocation,
   and OSR compilation instead of relying on the system. Also
   make sure the method $noinline$inlineCache always starts
   with the interpreter, as otherwise we would infinite loop.

2) Ensure the thread doing the OSR cannot be suspended once it
   holds an OSR method, as otherwise the jit code cache could
   delete the method before the thread had a chance to jump to it.

Change-Id: Ic0dee181a7b23260419a94a7d7405f150433d31a

8 years agoTemporarily disable compressed CFI tests.
David Srbecky [Tue, 16 Feb 2016 09:56:41 +0000 (09:56 +0000)]
Temporarily disable compressed CFI tests.

Since the support in libunwind has been temporarily disabled.

The non-compressed CFI test still works.

Bug: 27172087
Change-Id: Ic0e088827122014f13ae2086c766fc7c01b21ea1

8 years agoMerge "Optimizing: Use range-based loops in BCE."
Vladimir Marko [Tue, 16 Feb 2016 09:42:31 +0000 (09:42 +0000)]
Merge "Optimizing: Use range-based loops in BCE."

8 years agoMerge "Let the CFI test communicate via stdout rather than arbitrary sleep."
David Srbecky [Tue, 16 Feb 2016 09:34:44 +0000 (09:34 +0000)]
Merge "Let the CFI test communicate via stdout rather than arbitrary sleep."

8 years agoOptimizing: Use range-based loops in BCE.
Vladimir Marko [Mon, 15 Feb 2016 17:54:56 +0000 (17:54 +0000)]
Optimizing: Use range-based loops in BCE.

Change-Id: Ib7cbc6dcbdf61d0b115e6b872914cff3687ad6e4

8 years agoMerge "Optimizing: Remove unnecessary And before TypeConversion."
Vladimir Marko [Mon, 15 Feb 2016 18:39:47 +0000 (18:39 +0000)]
Merge "Optimizing: Remove unnecessary And before TypeConversion."

8 years agoRevert "Revert "Make it possible to enable native debugging through debug flags""
Tamas Berghammer [Fri, 12 Feb 2016 16:29:00 +0000 (16:29 +0000)]
Revert "Revert "Make it possible to enable native debugging through debug flags""

This reverts commit 3a98aae1b9b20bc78dc5e05d2e60cb1d0072db02.

* Add support for a new debug flag disabling the optimizations in
  the compiler and enable the generation of some additional debug
  info (--native-debuggable).
* Ignore the content of the oat files if force JIT is enabled so
  the runtime ignores the AOT-ed code what doesn't contain any
  debug info.

Time measurements on a Nexus 5 with running:
am start -n com.facebook.katana/com.facebook.katana.LoginActivity -W

Before change:             | AVG | DEV
--------------------------------------
ThisTime:  549 492 512 511 | 516 | 24
TotalTime: 549 492 512 511 | 516 | 24
WaitTime:  662 511 528 526 | 557 | 71

After change:              | AVG | DEV
--------------------------------------
ThisTime:  530 467 503 544 | 511 | 34
TotalTime: 530 467 503 544 | 511 | 34
WaitTime:  551 497 536 583 | 541 | 36

Based on the numbers the speed impact of the change is less then the
accuracy of the measurement and it is also negligible.

The minor speed improvement displayed in the measurements are just
the cause of the variance of the measurement and not caused by this
change.

Change-Id: Ibf7294bfd14f8632a0fdeb27a5b90bfe5037d085

8 years agoMerge "Fix broken tests"
David Brazdil [Mon, 15 Feb 2016 18:24:16 +0000 (18:24 +0000)]
Merge "Fix broken tests"

8 years agoFix broken tests
David Brazdil [Mon, 15 Feb 2016 18:20:01 +0000 (18:20 +0000)]
Fix broken tests

Change-Id: I9d0f1064e8cd63045283445946c46594a50d4b84

8 years agoMerge "ART: Fix ArenaStack::AllocWithMemoryTool()."
Vladimir Marko [Mon, 15 Feb 2016 17:33:36 +0000 (17:33 +0000)]
Merge "ART: Fix ArenaStack::AllocWithMemoryTool()."

8 years agoART: Fix ArenaStack::AllocWithMemoryTool().
Vladimir Marko [Mon, 15 Feb 2016 10:13:11 +0000 (10:13 +0000)]
ART: Fix ArenaStack::AllocWithMemoryTool().

MEMORY_TOOL_MAKE_NOACCESS() takes the size of the address
range as the second argument, not the end the range.

Bug: 27156726
Change-Id: I05c8224a1d3c619919b203f407fb770c7c49cc9f

8 years agoMerge "Fix lint error"
David Brazdil [Mon, 15 Feb 2016 17:15:21 +0000 (17:15 +0000)]
Merge "Fix lint error"

8 years agoLet the CFI test communicate via stdout rather than arbitrary sleep.
David Srbecky [Mon, 15 Feb 2016 16:54:34 +0000 (16:54 +0000)]
Let the CFI test communicate via stdout rather than arbitrary sleep.

I suspect the gcstress test might have been flaky due to the sleep not
being long enough and I would like to avoid just arbitrarily increasing it.

Change-Id: I5d4e0be35aa9f48b66167df04b8a539b21787053

8 years agoFix lint error
David Brazdil [Mon, 15 Feb 2016 17:14:31 +0000 (17:14 +0000)]
Fix lint error

Change-Id: I6f7785abece7ead31b4737fc6b54712c26582e2b

8 years agoMerge "Expect less in the presence of a string init call."
Nicolas Geoffray [Mon, 15 Feb 2016 16:32:16 +0000 (16:32 +0000)]
Merge "Expect less in the presence of a string init call."

8 years agoMerge "Add an option to disable native stack dumping on SIGQUIT."
Nicolas Geoffray [Mon, 15 Feb 2016 16:29:37 +0000 (16:29 +0000)]
Merge "Add an option to disable native stack dumping on SIGQUIT."

8 years agoAdd an option to disable native stack dumping on SIGQUIT.
Nicolas Geoffray [Mon, 15 Feb 2016 13:05:16 +0000 (13:05 +0000)]
Add an option to disable native stack dumping on SIGQUIT.

Some of our (stress) run-tests do ANR dumping, which end up
stressing libunwind, that has known problems. To avoid getting
flakes due to libunwind, disable native stack dumping on SIGQUIT
for our run-tests.

bug:27185632
bug:24664297
Change-Id: I69085e48db903d6240448d71666ae2dcd091922e

8 years agoExpect less in the presence of a string init call.
Nicolas Geoffray [Mon, 15 Feb 2016 15:56:11 +0000 (15:56 +0000)]
Expect less in the presence of a string init call.

The compiler currently relies on the dex cache being populated
for doing proper type propagation. If it hasn't, we may end up in the
situation where the DexMethodInliner has recognized a String.<init> call
(because DexMethodInliner only looks at signatures, and does not resolve
types), but the graph builder doesn't see a type and assume it needs
to do access checks and clinit checks on it.

Change-Id: Id79313b0610b127909e3e057305b6632b0b172f7

8 years agoMerge "ART: Run SsaBuilder from HGraphBuilder"
David Brazdil [Mon, 15 Feb 2016 16:12:32 +0000 (16:12 +0000)]
Merge "ART: Run SsaBuilder from HGraphBuilder"

8 years agoMerge "ART: Implement HSelect with CSEL/FCSEL on arm64"
David Brazdil [Mon, 15 Feb 2016 15:53:55 +0000 (15:53 +0000)]
Merge "ART: Implement HSelect with CSEL/FCSEL on arm64"

8 years agoMerge "Optimizing: Simplify consecutive type conversions."
Vladimir Marko [Mon, 15 Feb 2016 15:39:47 +0000 (15:39 +0000)]
Merge "Optimizing: Simplify consecutive type conversions."

8 years agoOptimizing: Remove unnecessary And before TypeConversion.
Vladimir Marko [Fri, 12 Feb 2016 16:53:57 +0000 (16:53 +0000)]
Optimizing: Remove unnecessary And before TypeConversion.

For example `(byte) (x & 0xff)` doesn't need the `& 0xff`.

Bug: 23965701
Change-Id: I5fc8419491aff2cdc7074451e74e873b5f582d41

8 years agoOptimizing: Simplify consecutive type conversions.
Vladimir Marko [Fri, 12 Feb 2016 12:06:05 +0000 (12:06 +0000)]
Optimizing: Simplify consecutive type conversions.

Merge two consecutive type conversions to one if the result
of such merged conversion is guaranteed to be the same and
remove all implicit conversions, not just conversions to the
same type. Improve codegens to handle conversions from long
to integral types smaller than int.

This will make it easier to simplify `(byte) (x & 0xffL)` to
`(byte) x` where the conversion from long to byte is done by
two dex instructions, long-to-int and in int-to-byte.

Bug: 23965701
Change-Id: I833f193556671136ad2cd3f5b31cdfbc2d99c19d

8 years agoMerge "Switch the tests to using Jack for compilation"
Neil Fuller [Mon, 15 Feb 2016 13:17:04 +0000 (13:17 +0000)]
Merge "Switch the tests to using Jack for compilation"

8 years agoART: Implement HSelect with CSEL/FCSEL on arm64
David Brazdil [Mon, 8 Feb 2016 14:20:45 +0000 (14:20 +0000)]
ART: Implement HSelect with CSEL/FCSEL on arm64

Change-Id: I549af0cba3c5048066a2d1206b78a70b496d349e

8 years agoMerge "X86_64: Allow HSelect to generate CMOV from memory"
David Brazdil [Mon, 15 Feb 2016 12:53:59 +0000 (12:53 +0000)]
Merge "X86_64: Allow HSelect to generate CMOV from memory"

8 years agoX86_64: Allow HSelect to generate CMOV from memory
Mark Mendell [Fri, 12 Feb 2016 19:36:51 +0000 (14:36 -0500)]
X86_64: Allow HSelect to generate CMOV from memory

Use the cmov with Address operand to allow CMOV from stack location.

Change-Id: Ia2f856c7b5003c413f23adaabe19be06f38c78ab
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
8 years agodex2oat: Show memory usage values in bytes
Anton Kirilov [Thu, 28 Jan 2016 15:08:01 +0000 (15:08 +0000)]
dex2oat: Show memory usage values in bytes

Memory usage values are rounded down to an integer and shown in the
unit that would be most appropriate (refer to art::PrettySize());
e.g. if the value is at least 1 MB, but less than 1 GB, then it will
be shown in MB. However, that can introduce a very large error; for
example, a value that is close to, but less than 2 MB, will be
displayed as 1 MB.

This change forces dex2oat to print the raw value in bytes as well,
which may make memory usage analysis more accurate.

Change-Id: Id86a9fe21e8af0f02e77fac21cad51d35d941294

8 years agoMerge "Add X86/X86_64 support for CMOV from memory."
David Brazdil [Mon, 15 Feb 2016 11:47:57 +0000 (11:47 +0000)]
Merge "Add X86/X86_64 support for CMOV from memory."

8 years agoMerge "Add MODULE_LICENSE_GPL.. for art/runtime/openjdkjvm."
Narayan Kamath [Mon, 15 Feb 2016 10:35:45 +0000 (10:35 +0000)]
Merge "Add MODULE_LICENSE_GPL.. for art/runtime/openjdkjvm."

8 years agoAdd MODULE_LICENSE_GPL.. for art/runtime/openjdkjvm.
Narayan Kamath [Fri, 12 Feb 2016 16:09:58 +0000 (16:09 +0000)]
Add MODULE_LICENSE_GPL.. for art/runtime/openjdkjvm.

This needs a companion makefile that declares a no-op module
so that the build system can leach of its LOCAL_PATH to collect
all subdirectory sources.

bug: 27160386

(cherry picked from commit 9a3a10ac819f456f7bcc626046342a845902fe96)

Change-Id: Ib11845c2172aad272c45ec2a3b4b2f7d508c1596

8 years agoART: Run SsaBuilder from HGraphBuilder
David Brazdil [Tue, 2 Feb 2016 16:28:56 +0000 (16:28 +0000)]
ART: Run SsaBuilder from HGraphBuilder

First step towards merging the two passes, which will later result in
HGraphBuilder directly producing SSA form. This CL mostly just updates
tests broken by not being able to inspect the pre-SSA form.

Using HLocals outside the HGraphBuilder is now deprecated.

Bug: 27150508
Change-Id: I00fb6050580f409dcc5aa5b5aa3a536d6e8d759e

8 years agoMerge "Don't call IsNative if the declaring class can be null."
Nicolas Geoffray [Mon, 15 Feb 2016 10:17:38 +0000 (10:17 +0000)]
Merge "Don't call IsNative if the declaring class can be null."

8 years agoMerge "Disable on stack replacement for now."
Nicolas Geoffray [Mon, 15 Feb 2016 10:01:24 +0000 (10:01 +0000)]
Merge "Disable on stack replacement for now."

8 years agoDisable on stack replacement for now.
Nicolas Geoffray [Mon, 15 Feb 2016 10:00:42 +0000 (10:00 +0000)]
Disable on stack replacement for now.

Change-Id: I7b57252d4872e8c280e95de4ad4ff55a3ca22685

8 years agoDon't call IsNative if the declaring class can be null.
Nicolas Geoffray [Sat, 13 Feb 2016 12:38:36 +0000 (12:38 +0000)]
Don't call IsNative if the declaring class can be null.

There's a check down below the IsNative call that makes
sure the declaring class is not null.

Change-Id: I744bf01105eadeea9893ae626970c4b6b2f64a8b

8 years agoMerge "ART: Simplify patchoat"
Andreas Gampe [Sat, 13 Feb 2016 00:27:00 +0000 (00:27 +0000)]
Merge "ART: Simplify patchoat"

8 years agoART: Simplify patchoat
Andreas Gampe [Thu, 11 Feb 2016 04:18:37 +0000 (20:18 -0800)]
ART: Simplify patchoat

Removed unused configurations. Cut out cruft that isn't used anymore
since multi-image. Make it smaller to not require new selinux
permissions for OTAs.

Split up the main function, to make the flow clearer for image vs
app/oat.

Bug: 25612095
Bug: 26317072

(cherry picked from commit 02bc0b70beedfe258c2147c2b4a205fbf3d6eebc)

Change-Id: Ieb55bd1a13cbb44fd0e2979a8a61a509df9c1e7e

8 years agoMerge "Fix bug with verification of constructors"
Alex Light [Fri, 12 Feb 2016 23:47:43 +0000 (23:47 +0000)]
Merge "Fix bug with verification of constructors"

8 years agoFix bug with verification of constructors
Alex Light [Fri, 12 Feb 2016 19:01:54 +0000 (11:01 -0800)]
Fix bug with verification of constructors

We would incorrectly allow the storing of values into superclass
fields before the superclass constructor was called.

Bug: 26965384

Change-Id: I45b824fbdbfc133663ed6d3306853595b5dc9262

8 years agoMerge "Generalized "dom-based" dynamic BCE to symbolic base + offset."
Aart Bik [Fri, 12 Feb 2016 22:11:59 +0000 (22:11 +0000)]
Merge "Generalized "dom-based" dynamic BCE to symbolic base + offset."

8 years agoGeneralized "dom-based" dynamic BCE to symbolic base + offset.
Aart Bik [Tue, 9 Feb 2016 22:26:34 +0000 (14:26 -0800)]
Generalized "dom-based" dynamic BCE to symbolic base + offset.

Rationale:
So far, if all others failed, BCE would use a dominator-based
dynamic deoptimization to eliminate bounds checks in e.g. a[0],
a[1], a[2], etc. This CL generalizes this to any symbolic base
with offset in e.g. a[base], a[base+1], etc. The runtime tests
(two for symbolic, one for constant) carefully account for
arithmetic wrap-around.

bug=26680114

Change-Id: I7432a200fd69791914ed776c77fa62567b5863c0

8 years agoAdd X86/X86_64 support for CMOV from memory.
Mark Mendell [Fri, 12 Feb 2016 18:49:03 +0000 (13:49 -0500)]
Add X86/X86_64 support for CMOV from memory.

Add support for the memory form of CMOV.  Add tests.

Change-Id: Ib9f5dbd3031c7e235ee3f2afdb7db75eed46277a
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
8 years agoMerge "Fix app image memory leak"
Mathieu Chartier [Fri, 12 Feb 2016 17:56:29 +0000 (17:56 +0000)]
Merge "Fix app image memory leak"

8 years agoFix app image memory leak
Mathieu Chartier [Fri, 12 Feb 2016 00:27:18 +0000 (16:27 -0800)]
Fix app image memory leak

There was a memory leak if we failed to add an image space, this
was caused by releasing ownership without adding it to the heap.

Bug: 22858531

Change-Id: Ia3c97ec822ca5362f52008e813fa434107198bc9