OSDN Git Service

android-x86/art.git
9 years agoMerge "ART: Add pic flag to oat header store"
Andreas Gampe [Tue, 28 Oct 2014 02:08:03 +0000 (02:08 +0000)]
Merge "ART: Add pic flag to oat header store"

9 years agoART: Add pic flag to oat header store
Andreas Gampe [Thu, 23 Oct 2014 18:37:40 +0000 (11:37 -0700)]
ART: Add pic flag to oat header store

Add the compile-time PIC flag to the oat-header key-value store.
Ignore image offset and patch delta when loading PIC oat files.

Change-Id: Ie1f1ef37125386a968228033d1e2bec565315510

9 years agoMerge "Fix 64 bit build"
Mathieu Chartier [Tue, 28 Oct 2014 00:50:45 +0000 (00:50 +0000)]
Merge "Fix 64 bit build"

9 years agoFix 64 bit build
Mathieu Chartier [Tue, 28 Oct 2014 00:30:20 +0000 (17:30 -0700)]
Fix 64 bit build

Buggy compiler.

(cherry picked from commit 7989d22642415e1e4d608e210284834951bd0a39)

Change-Id: Id16c83fc7963ca89fd7fae32dd15ae342cc7f064

9 years agoMerge "ART: Typo fix"
Andreas Gampe [Tue, 28 Oct 2014 00:06:49 +0000 (00:06 +0000)]
Merge "ART: Typo fix"

9 years agoART: Typo fix
Andreas Gampe [Tue, 28 Oct 2014 00:06:29 +0000 (17:06 -0700)]
ART: Typo fix

Change-Id: If544f02117b6f1bbc1279444c70cb9f2a0534c6f

9 years agoMerge "ART: Fix test 089"
Andreas Gampe [Tue, 28 Oct 2014 00:05:45 +0000 (00:05 +0000)]
Merge "ART: Fix test 089"

9 years agoART: Fix test 089
Andreas Gampe [Tue, 28 Oct 2014 00:03:58 +0000 (17:03 -0700)]
ART: Fix test 089

Another two lines of build failure output that need to be stripped.

Change-Id: I85c2a3b3e8553b2f5da8e043dd561ada380ef2fe

9 years agoMerge "Optimize method linking"
Mathieu Chartier [Mon, 27 Oct 2014 23:50:08 +0000 (23:50 +0000)]
Merge "Optimize method linking"

9 years agoOptimize method linking
Mathieu Chartier [Thu, 23 Oct 2014 23:48:06 +0000 (16:48 -0700)]
Optimize method linking

Added more inlining, removed imt array allocation and replaced it
with a handle scope. Removed some un-necessary handle scopes.

Added logic to base interface method tables from the superclass so
that we dont need to reconstruct for every interface (large win).

Facebook launch Dalvik KK MR2:
TotalTime: 3165
TotalTime: 3652
TotalTime: 3143
TotalTime: 3298
TotalTime: 3212
TotalTime: 3211

Facebook launch TOT before:
WaitTime: 3702
WaitTime: 3616
WaitTime: 3616
WaitTime: 3687
WaitTime: 3742
WaitTime: 3767

After optimizations:
WaitTime: 2903
WaitTime: 2953
WaitTime: 2918
WaitTime: 2940
WaitTime: 2879
WaitTime: 2792

LinkInterfaceMethods no longer one of the hottest methods, new list:
4.73% art::ClassLinker::LinkVirtualMethods(art::Thread*, art::Handle<art::mirror::Class>)
3.07% art::DexFile::FindClassDef(char const*) const
2.94% art::mirror::Class::FindDeclaredStaticField(art::mirror::DexCache const*, unsigned int)
2.90% art::DexFile::FindStringId(char const*) const

Bug: 18054905
Bug: 16828525

(cherry picked from commit 1fb463e42cf1d67595cff66d19c0f99e3046f4c4)

Change-Id: I27cc70178fd3655fbe5a3178887fcba189d21321

9 years agoMerge "Add gp initialization to the art_quick_imt_conflict_trampoline() function."
Ian Rogers [Mon, 27 Oct 2014 23:19:03 +0000 (23:19 +0000)]
Merge "Add gp initialization to the art_quick_imt_conflict_trampoline() function."

9 years agoMerge "Extra debug output in run-test."
Ian Rogers [Mon, 27 Oct 2014 23:07:23 +0000 (23:07 +0000)]
Merge "Extra debug output in run-test."

9 years agoAdd gp initialization to the art_quick_imt_conflict_trampoline() function.
Douglas Leung [Mon, 27 Oct 2014 21:44:47 +0000 (14:44 -0700)]
Add gp initialization to the art_quick_imt_conflict_trampoline() function.

The gp register is needed by the "la" instruction.

Change-Id: I4f2dcddba503f403dd6532d0db65ddd7df1f9626

9 years agoExtra debug output in run-test.
Ian Rogers [Mon, 27 Oct 2014 20:48:21 +0000 (13:48 -0700)]
Extra debug output in run-test.

Dump PATH_MAX and NAME_MAX on failure.
Also fix typo in dumping args.

Change-Id: I3df0dbc45db0659c975ac86a12f338df2a7291dc

9 years agoMerge "Rewrite class initialization check elimination."
Vladimir Marko [Mon, 27 Oct 2014 18:10:02 +0000 (18:10 +0000)]
Merge "Rewrite class initialization check elimination."

9 years agoMerge "Support hard float on arm in optimizing compiler."
Nicolas Geoffray [Mon, 27 Oct 2014 17:23:51 +0000 (17:23 +0000)]
Merge "Support hard float on arm in optimizing compiler."

9 years agoSupport hard float on arm in optimizing compiler.
Nicolas Geoffray [Mon, 27 Oct 2014 15:14:55 +0000 (15:14 +0000)]
Support hard float on arm in optimizing compiler.

Also bump oat version, needed after latest hard float switch.

Change-Id: Idf5acfb36c07e74acff00edab998419a3c6b2965

9 years agoMerge "ART: Fix ImageSpace error message."
Andreas Gampe [Mon, 27 Oct 2014 15:34:44 +0000 (15:34 +0000)]
Merge "ART: Fix ImageSpace error message."

9 years agoMerge "ART: Fix leak in bit_vector"
Andreas Gampe [Mon, 27 Oct 2014 15:32:46 +0000 (15:32 +0000)]
Merge "ART: Fix leak in bit_vector"

9 years agoMerge "[native bridge] Add test to verify code_cache existance."
Calin Juravle [Mon, 27 Oct 2014 15:15:50 +0000 (15:15 +0000)]
Merge "[native bridge] Add test to verify code_cache existance."

9 years agoRewrite class initialization check elimination.
Vladimir Marko [Thu, 16 Oct 2014 14:41:48 +0000 (15:41 +0100)]
Rewrite class initialization check elimination.

Split the notion of type being in dex cache away from the
class being initialized. Include static invokes in the class
initialization elimination pass.

Change-Id: Ie3760d8fd55b987f9507f32ef51456a57d79e3fb

9 years agoMerge "Quick: Fix wide Phi detection in GVN, clean up INVOKEs."
Vladimir Marko [Mon, 27 Oct 2014 09:44:31 +0000 (09:44 +0000)]
Merge "Quick: Fix wide Phi detection in GVN, clean up INVOKEs."

9 years agoMerge "Fix the DW_OP_breg* constants."
Elliott Hughes [Sun, 26 Oct 2014 21:31:13 +0000 (21:31 +0000)]
Merge "Fix the DW_OP_breg* constants."

9 years agoFix the DW_OP_breg* constants.
Elliott Hughes [Sun, 26 Oct 2014 04:05:01 +0000 (21:05 -0700)]
Fix the DW_OP_breg* constants.

Change-Id: I33225090a9355cf96796574bee473e2acd2a54d8

9 years agoMerge "Do not use ld instruction for Mips32."
Ian Rogers [Sat, 25 Oct 2014 22:59:09 +0000 (22:59 +0000)]
Merge "Do not use ld instruction for Mips32."

9 years agoART: Fix ImageSpace error message.
Andreas Gampe [Sat, 25 Oct 2014 04:55:52 +0000 (21:55 -0700)]
ART: Fix ImageSpace error message.

Use *error_msg instead of error_msg.

Change-Id: Idabee3e4a66effd9f6346a2640a3038c5448889e

9 years agoART: Fix leak in bit_vector
Andreas Gampe [Sat, 25 Oct 2014 04:32:07 +0000 (21:32 -0700)]
ART: Fix leak in bit_vector

Resizing leaks the original storage. Let the allocator know it's
free.

Bug: 18120044
Change-Id: Ib95a87c3036f36377d64351173f8c04f28855663

9 years agoDo not use ld instruction for Mips32.
Douglas Leung [Wed, 22 Oct 2014 23:32:28 +0000 (16:32 -0700)]
Do not use ld instruction for Mips32.

Change-Id: If577b8011edb583779360934f4e50ff1779e1b70

9 years agoMerge "Tidy logging code not using UNIMPLEMENTED."
Ian Rogers [Sat, 25 Oct 2014 00:14:26 +0000 (00:14 +0000)]
Merge "Tidy logging code not using UNIMPLEMENTED."

9 years agoMerge "ARM: Use hardfp calling convention between java to java call."
Ian Rogers [Fri, 24 Oct 2014 23:28:08 +0000 (23:28 +0000)]
Merge "ARM: Use hardfp calling convention between java to java call."

9 years agoARM: Use hardfp calling convention between java to java call.
Zheng Xu [Thu, 23 Oct 2014 10:29:55 +0000 (18:29 +0800)]
ARM: Use hardfp calling convention between java to java call.

This patch default to use hardfp calling convention. Softfp can be enabled
by setting kArm32QuickCodeUseSoftFloat to true.

We get about -1 ~ +5% performance improvement with different benchmark
tests. Hopefully, we should be able to get more performance by address the left
TODOs, as some part of the code takes the original assumption which is not
optimal.

DONE:
1. Interpreter to quick code
2. Quick code to interpreter
3. Transition assembly and callee-saves
4. Trampoline(generic jni, resolution, invoke with access check and etc.)
5. Pass fp arg reg following aapcs(gpr and stack do not follow aapcs)
6. Quick helper assembly routines to handle ABI differences
7. Quick code method entry
8. Quick code method invocation
9. JNI compiler

TODO:
10. Rework ArgMap, FlushIn, GenDalvikArgs and affected common code.
11. Rework CallRuntimeHelperXXX().

Change-Id: I9965d8a007f4829f2560b63bcbbde271bdcf6ec2

9 years agoMerge "ART: Add div/rem zero check elimination flag"
Ian Rogers [Fri, 24 Oct 2014 22:26:23 +0000 (22:26 +0000)]
Merge "ART: Add div/rem zero check elimination flag"

9 years agoMerge "ART: Prevent float inference back to SSA in-regs."
Ian Rogers [Fri, 24 Oct 2014 21:57:36 +0000 (21:57 +0000)]
Merge "ART: Prevent float inference back to SSA in-regs."

9 years agoART: Prevent float inference back to SSA in-regs.
Stephen Kyle [Thu, 16 Oct 2014 14:02:42 +0000 (15:02 +0100)]
ART: Prevent float inference back to SSA in-regs.

.method public static getInt(I)I
    .registers 2
    const/4 v0, 0x0
    if-ne v0, v0, :after
    float-to-int v0, v0
    :exit
    add-int/2addr v0, v1
    return v0
    :after
    move v1, v0
    goto :exit
.end method

In this code sample, v1 is the single parameter to this method. In one
of the phi-nodes inserted between :exit and add-int/2addr, v1's two
incoming SSA regs are:
  - the initial def of v1 as a parameter
  - the v1 def'd at move v1, v0.
During type inference, because the 2nd def is a float (because of the
earlier float-to-int v0, v0) this will change the type of the 1st def to a
float as well, which is incorrect since the first parameter is known to be
non-float.

This fix checks during phi-node type-inference if an SSA reg that is the
initial def of a parameter vreg is about to be set as float when it was
not previously, and skips the inference if so.

In this case, when using a hard-float ABI, having the in-reg v1 set as
float causes FlushIns() to read the argument to the method from an FP reg,
when the argument will be passed in a core reg by any caller.

Also included is a smali test for this bug: compare difference between
./run-test --64 800
./run-test --64 --interpreter 800
when the vreg_analysis patch has not been applied.
(Requires 64-bit because 32-bit ARM currently does not use hard-float.)

getInt(I)I should return its argument, but it returns an incorrect
value.

Change-Id: I1d4b5be6a931fe853279e89dd820820f29823da1
Signed-off-by: Stephen Kyle <stephen.kyle@arm.com>
9 years agoTidy logging code not using UNIMPLEMENTED.
Ian Rogers [Fri, 24 Oct 2014 21:20:06 +0000 (14:20 -0700)]
Tidy logging code not using UNIMPLEMENTED.

Change-Id: I7a79c1671a6ff8b2040887133b3e0925ef9a3cfe

9 years agoMerge "Code cleanup."
Ian Rogers [Fri, 24 Oct 2014 20:43:21 +0000 (20:43 +0000)]
Merge "Code cleanup."

9 years agoMerge "Add more environment variable to control test granularity."
Nicolas Geoffray [Fri, 24 Oct 2014 15:53:15 +0000 (15:53 +0000)]
Merge "Add more environment variable to control test granularity."

9 years agoAdd more environment variable to control test granularity.
Nicolas Geoffray [Fri, 24 Oct 2014 12:49:08 +0000 (13:49 +0100)]
Add more environment variable to control test granularity.

Change-Id: I7d96b6841db097c51262aa26dba8f331ca7891ff

9 years agoMerge "Fix encoding of imul in x86_64 assembler."
Nicolas Geoffray [Fri, 24 Oct 2014 15:13:16 +0000 (15:13 +0000)]
Merge "Fix encoding of imul in x86_64 assembler."

9 years agoFix encoding of imul in x86_64 assembler.
Nicolas Geoffray [Fri, 24 Oct 2014 14:43:49 +0000 (15:43 +0100)]
Fix encoding of imul in x86_64 assembler.

Change-Id: I5b97f5698ed8ec9d0759d0e1eba8be29119c16c5

9 years ago[native bridge] Add test to verify code_cache existance.
Calin Juravle [Wed, 22 Oct 2014 19:17:58 +0000 (20:17 +0100)]
[native bridge] Add test to verify code_cache existance.

Bug: 18027433
Change-Id: I760acfdc3d109344a0d4fb25ae5d3f067997c547

9 years agoMerge "Make ObjectRegistry::InternalAdd GC safe"
Sebastien Hertz [Fri, 24 Oct 2014 14:22:05 +0000 (14:22 +0000)]
Merge "Make ObjectRegistry::InternalAdd GC safe"

9 years agoMerge "Revert "Revert "Implement long negate instruction in the optimizing compiler."""
Roland Levillain [Fri, 24 Oct 2014 10:48:38 +0000 (10:48 +0000)]
Merge "Revert "Revert "Implement long negate instruction in the optimizing compiler."""

9 years agoMerge "Use test's `-d' option when checking for a directory."
Roland Levillain [Fri, 24 Oct 2014 10:45:47 +0000 (10:45 +0000)]
Merge "Use test's `-d' option when checking for a directory."

9 years agoMerge "Fix wrong unsigned to signed conversions."
Nicolas Geoffray [Fri, 24 Oct 2014 10:44:50 +0000 (10:44 +0000)]
Merge "Fix wrong unsigned to signed conversions."

9 years agoRevert "Revert "Implement long negate instruction in the optimizing compiler.""
Roland Levillain [Thu, 23 Oct 2014 17:12:09 +0000 (18:12 +0100)]
Revert "Revert "Implement long negate instruction in the optimizing compiler.""

This reverts commit 30ca3d847fe72cfa33e1b2473100ea2d8bea4517.

Change-Id: I188ca8d460d55d3a9966bcf31e0588575afa77d2

9 years agoMerge "Fix JDWP Virtualmachine.Resume command"
Sebastien Hertz [Fri, 24 Oct 2014 07:49:38 +0000 (07:49 +0000)]
Merge "Fix JDWP Virtualmachine.Resume command"

9 years agoMerge "More use of WellKnownClasses for debugger"
Sebastien Hertz [Fri, 24 Oct 2014 07:49:17 +0000 (07:49 +0000)]
Merge "More use of WellKnownClasses for debugger"

9 years agoMerge "ART: Remove old LOG(INFO)"
Andreas Gampe [Fri, 24 Oct 2014 01:09:58 +0000 (01:09 +0000)]
Merge "ART: Remove old LOG(INFO)"

9 years agoMerge "Use the passed-in 'name' param to create a MemMap."
Mathieu Chartier [Fri, 24 Oct 2014 01:03:32 +0000 (01:03 +0000)]
Merge "Use the passed-in 'name' param to create a MemMap."

9 years agoART: Remove old LOG(INFO)
Andreas Gampe [Fri, 24 Oct 2014 00:59:19 +0000 (17:59 -0700)]
ART: Remove old LOG(INFO)

Clean up output, it's annoying.

Change-Id: Ifc1972dd3e988f36f781dc989d23cdb93e6f828e

9 years agoMerge "Make out-of-line mutex contention dependent on ART_USE_FUTEXES."
Ian Rogers [Fri, 24 Oct 2014 00:55:27 +0000 (00:55 +0000)]
Merge "Make out-of-line mutex contention dependent on ART_USE_FUTEXES."

9 years agoMake out-of-line mutex contention dependent on ART_USE_FUTEXES.
Ian Rogers [Fri, 24 Oct 2014 00:48:20 +0000 (17:48 -0700)]
Make out-of-line mutex contention dependent on ART_USE_FUTEXES.

Fix Mac build. Also fix Linux compilation if ART_USE_FUTEXES is disabled.

Change-Id: I51cb1d70b5548ea6121ff7567b9546bad0894e01

9 years agoMerge "ART: Use static_assert in down_cast"
Andreas Gampe [Thu, 23 Oct 2014 18:32:06 +0000 (18:32 +0000)]
Merge "ART: Use static_assert in down_cast"

9 years agoART: Use static_assert in down_cast
Andreas Gampe [Thu, 23 Oct 2014 18:24:08 +0000 (11:24 -0700)]
ART: Use static_assert in down_cast

Use C++11 to write an actual compile-time assert.

Change-Id: I36bd94adbf6c732e103720308e1e6bf11065f474

9 years agoMerge "Add missing SHARED_LOCKS_REQUIRED attibute."
Chih-Hung Hsieh [Thu, 23 Oct 2014 18:21:02 +0000 (18:21 +0000)]
Merge "Add missing SHARED_LOCKS_REQUIRED attibute."

9 years agoAdd missing SHARED_LOCKS_REQUIRED attibute.
Chih-Hung Hsieh [Thu, 23 Oct 2014 18:07:52 +0000 (11:07 -0700)]
Add missing SHARED_LOCKS_REQUIRED attibute.

BUG: 18093707
Change-Id: I66e5c7650c67bb308472ff0da7faed6dff4ead53

9 years agoFix wrong unsigned to signed conversions.
Nicolas Geoffray [Thu, 23 Oct 2014 17:32:13 +0000 (18:32 +0100)]
Fix wrong unsigned to signed conversions.

The HIntConstant node takes an int32_t, so we have to keep things signed.

Change-Id: Ib3fa50e87f99118d320cbb381f619d5be9287530

9 years agoMerge "ART: Add basic tests for materialized conditions."
Nicolas Geoffray [Thu, 23 Oct 2014 17:28:50 +0000 (17:28 +0000)]
Merge "ART: Add basic tests for materialized conditions."

9 years agoMerge "Fix concurrent start bytes race"
Mathieu Chartier [Thu, 23 Oct 2014 17:11:44 +0000 (17:11 +0000)]
Merge "Fix concurrent start bytes race"

9 years agoMerge "Revert "Implement long negate instruction in the optimizing compiler.""
Roland Levillain [Thu, 23 Oct 2014 17:11:21 +0000 (17:11 +0000)]
Merge "Revert "Implement long negate instruction in the optimizing compiler.""

9 years agoRevert "Implement long negate instruction in the optimizing compiler."
Roland Levillain [Thu, 23 Oct 2014 17:07:44 +0000 (18:07 +0100)]
Revert "Implement long negate instruction in the optimizing compiler."

This reverts commit 66ce173a40eff4392e9949ede169ccf3108be2db.

9 years agoFix concurrent start bytes race
Mathieu Chartier [Thu, 23 Oct 2014 00:18:34 +0000 (17:18 -0700)]
Fix concurrent start bytes race

Previously, we set concurrent start bytes to max int when we
requested a concurrent GC, but there was a race if another thread
was doing another GC and had already completed GrowForUtilization
but had not yet finished the GC. This meant that the thread doing
the GC would update the concurrent start bytes properly, but the
allocating thread would re-update it to max int. Then when the
concurrent GC thread woke up, it would call WaitForGcToComplete
and see that there was a collector running and avoid doing the
concurrent GC, leaving the concurrent start bytes set to max int.

This meant that there would be no more concurrent GC until either
the next explicit GC or the next GC for alloc.

The fix is to only set concurrent start bytes to max int inside of
the CollectGarbageInternal code such that there isn't any way for
two threads to race.

Bug: 17942071

(cherry picked from commit 0133ec454d8dd3fa5ffe35649b5704aa18f15a49)

Change-Id: Ibc23dd2f937a2b5fda51ed064634c034dbb6e668

9 years agoART: Add basic tests for materialized conditions.
Alexandre Rames [Wed, 1 Oct 2014 11:55:56 +0000 (12:55 +0100)]
ART: Add basic tests for materialized conditions.

Change-Id: I4acef30cc6a48b5fe07d55db6b9cf0d093b326ee

9 years agoQuick: Fix wide Phi detection in GVN, clean up INVOKEs.
Vladimir Marko [Wed, 22 Oct 2014 16:15:53 +0000 (17:15 +0100)]
Quick: Fix wide Phi detection in GVN, clean up INVOKEs.

The detection of a wide Phi has been incorrectly looking at
the current LVN's wide sreg value map but we only intersect
live values and thus very often lose the information. This
results in failure to identify identical values, i.e.
potential missed optimizations. It also caused the bloating
of the global value map with values we would not use.

Rewrite the wide Phi detection to use the first merged LVN's
notion of wide sreg. For this to work we also need to use
the method's shorty to mark wide arguments.

Also clean up INVOKEs' processing to avoid another source
of bloating the global value map.

Bug: 16398693
Change-Id: I76718af7d62a8c6883ef43e4f47058f7eaf479e1

9 years agoMerge "Implement long negate instruction in the optimizing compiler."
Roland Levillain [Thu, 23 Oct 2014 16:14:56 +0000 (16:14 +0000)]
Merge "Implement long negate instruction in the optimizing compiler."

9 years agoImplement long negate instruction in the optimizing compiler.
Roland Levillain [Thu, 23 Oct 2014 15:38:33 +0000 (16:38 +0100)]
Implement long negate instruction in the optimizing compiler.

- Add support for the neg-long (long integer two's
  complement negate) instruction in the optimizing compiler.
- Add a 64-bit NEG instruction (negq) to the x86-64
  assembler.
- Generate ARM, x86 and x86-64 code for integer HNeg nodes.
- Put neg-related tests into test/415-optimizing-arith-neg.

Change-Id: I1fbe9611e134408a6b8745d1df20ab6ffa5e50f2

9 years agoMerge "[optimizing compiler] Handle SUB_FLOAT/DOUBLE nodes"
Calin Juravle [Thu, 23 Oct 2014 16:04:25 +0000 (16:04 +0000)]
Merge "[optimizing compiler] Handle SUB_FLOAT/DOUBLE nodes"

9 years ago[optimizing compiler] Handle SUB_FLOAT/DOUBLE nodes
Calin Juravle [Thu, 23 Oct 2014 16:01:13 +0000 (17:01 +0100)]
[optimizing compiler] Handle SUB_FLOAT/DOUBLE nodes

Also add 414-optimizing-arith-sub to
TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS.

Change-Id: Ia1b7ff7857bc0e488b9b8ed8a36efb1a3a9bad36

9 years agoUse test's `-d' option when checking for a directory.
Roland Levillain [Thu, 23 Oct 2014 15:40:59 +0000 (16:40 +0100)]
Use test's `-d' option when checking for a directory.

Change-Id: I2d46ba01ec13daa7aa0b78e447eccbc4f1527a19

9 years agoMerge "Use the shared smali test infrastructure for 800-smali."
Nicolas Geoffray [Thu, 23 Oct 2014 15:34:12 +0000 (15:34 +0000)]
Merge "Use the shared smali test infrastructure for 800-smali."

9 years agoMerge "[optimizing compiler] Add float/double subtraction"
Calin Juravle [Thu, 23 Oct 2014 15:25:59 +0000 (15:25 +0000)]
Merge "[optimizing compiler] Add float/double subtraction"

9 years ago[optimizing compiler] Add float/double subtraction
Calin Juravle [Thu, 23 Oct 2014 14:38:15 +0000 (15:38 +0100)]
[optimizing compiler] Add float/double subtraction

- for arm, x86, x86_64
- add tests
- a bit of clean up

Change-Id: I3761b0d908aca3e3c5d60da481fafb423ff7c9b9

9 years agoMake ObjectRegistry::InternalAdd GC safe
Sebastien Hertz [Thu, 23 Oct 2014 13:39:33 +0000 (15:39 +0200)]
Make ObjectRegistry::InternalAdd GC safe

Because a call to IdentityHashCode may cause GC, the object pointer
may become invalid (if the object has been moved) on next uses. We
now access the object through a Handle to be GC safe.

Also remove unused methods.

Bug: 18098424
Change-Id: I38fb55c3a6be62c4d98d4c94272a9cfeba327598

9 years agoMerge "ART: optimizing compiler: initial support for ARM64."
Nicolas Geoffray [Thu, 23 Oct 2014 12:48:02 +0000 (12:48 +0000)]
Merge "ART: optimizing compiler: initial support for ARM64."

9 years agoART: optimizing compiler: initial support for ARM64.
Alexandre Rames [Thu, 23 Oct 2014 09:03:10 +0000 (10:03 +0100)]
ART: optimizing compiler: initial support for ARM64.

The ARM64 port uses VIXL for code generation, to which it defers work
like label binding and branch resolving, register type coherency
checking, and immediate values handling.

Change-Id: I0a44508c0c991f472a63e67b3469cdd878fe1a68
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Signed-off-by: Alexandre Rames <alexandre.rames@arm.com>
9 years agoMerge "Remove obsolete TODOs from codegen tests"
Calin Juravle [Thu, 23 Oct 2014 11:48:28 +0000 (11:48 +0000)]
Merge "Remove obsolete TODOs from codegen tests"

9 years agoRemove obsolete TODOs from codegen tests
Calin Juravle [Thu, 23 Oct 2014 11:32:11 +0000 (12:32 +0100)]
Remove obsolete TODOs from codegen tests

The features are already exercised by the art test 411-optimizing-arith.

Change-Id: Id008931e0ed8206ced11ecc85a80a7e4aef3e68e

9 years agoMerge "[native bridge] Make sure we always unload the native bridge"
Calin Juravle [Thu, 23 Oct 2014 10:58:45 +0000 (10:58 +0000)]
Merge "[native bridge] Make sure we always unload the native bridge"

9 years ago[native bridge] Make sure we always unload the native bridge
Calin Juravle [Wed, 22 Oct 2014 20:02:23 +0000 (21:02 +0100)]
[native bridge] Make sure we always unload the native bridge

libnativebridge may allocate some resources during loading and
intialization and de-allocate them when unloading. This makes sure that
we don't leak anything.

Bug: 18097480
Change-Id: I901f2d3c2ab1efb2875388f99e8c5c111ce82d5a

9 years agoMore use of WellKnownClasses for debugger
Sebastien Hertz [Mon, 13 Oct 2014 09:27:13 +0000 (11:27 +0200)]
More use of WellKnownClasses for debugger

Uses WellKnownClasses cached fields for ThreadGroupReference-related
JDWP commands.
Adds fields of java.lang.ThreadGroup and java.util.ArrayList used by
the debugger.

Change-Id: I54f7ef7e44cb61bec95657a69177bba1fbb7dc75

9 years agoUse the shared smali test infrastructure for 800-smali.
Nicolas Geoffray [Thu, 23 Oct 2014 09:29:33 +0000 (10:29 +0100)]
Use the shared smali test infrastructure for 800-smali.

No need for a special build file now.

Change-Id: I7f6813553548b48fb5f54640506d1a361d9db3c1

9 years agoMerge "Implement int bit-wise not operation in the optimizing compiler."
Roland Levillain [Thu, 23 Oct 2014 09:17:41 +0000 (09:17 +0000)]
Merge "Implement int bit-wise not operation in the optimizing compiler."

9 years agoImplement int bit-wise not operation in the optimizing compiler.
Roland Levillain [Wed, 22 Oct 2014 17:06:21 +0000 (18:06 +0100)]
Implement int bit-wise not operation in the optimizing compiler.

- Add support for the not-int (integer one's complement
  negate) instruction in the optimizing compiler.
- Extend the HNot control-flow graph node type and make it
  inherit from HUnaryOperation.
- Generate ARM, x86 and x86-64 code for integer HNeg nodes.
- Exercise these additions in the codegen_test gtest, as there
  is not direct way to assess the support of not-int from a
  Java source.  Indeed, compiling a Java expression such as
  `~a' using javac and then dx generates an xor-int/lit8 Dex
  instruction instead of the expected not-int Dex instruction.
  This is probably because the Java bytecode has an `ixor'
  instruction, but there's not instruction directly
  corresponding to a bit-wise not operation.

Change-Id: I223aed75c4dac5785e04d99da0d22e8d699aee2b

9 years agoMerge "C++11 related clean-up of DISALLOW_.."
Ian Rogers [Thu, 23 Oct 2014 06:06:55 +0000 (06:06 +0000)]
Merge "C++11 related clean-up of DISALLOW_.."

9 years agoC++11 related clean-up of DISALLOW_..
Ian Rogers [Thu, 23 Oct 2014 05:06:39 +0000 (22:06 -0700)]
C++11 related clean-up of DISALLOW_..

Move DISALLOW_COPY_AND_ASSIGN to delete functions. By no having declarations
with no definitions this prompts better warning messages so deal with these
by correcting the code.
Add a DISALLOW_ALLOCATION and use for ValueObject and mirror::Object.
Make X86 assembly operand types ValueObjects to fix compilation errors.
Tidy the use of iostream and ostream.
Avoid making cutils a dependency via mutex-inl.h for tests that link against
libart. Push tracing dependencies into appropriate files and mutex.cc.
x86 32-bit host symbols size is increased for libarttest, avoid copying this
in run-test 115 by using symlinks and remove this test's higher than normal
ulimit.
Fix the RunningOnValgrind test in RosAllocSpace to not use GetHeap as it
returns NULL when the heap is under construction by Runtime.

Change-Id: Ia246f7ac0c11f73072b30d70566a196e9b78472b

9 years agoMerge "Fix arm64 bug introduced by refactoring."
Ian Rogers [Thu, 23 Oct 2014 05:03:25 +0000 (05:03 +0000)]
Merge "Fix arm64 bug introduced by refactoring."

9 years agoUse the passed-in 'name' param to create a MemMap.
Kyungmin Lee [Thu, 23 Oct 2014 00:32:05 +0000 (09:32 +0900)]
Use the passed-in 'name' param to create a MemMap.

Change-Id: I15c33b23751f4c32cb40c9514b602845feb47f9f
Signed-off-by: Kyungmin Lee <snailee@gmail.com>
9 years agoMerge "Tidy up logging."
Ian Rogers [Wed, 22 Oct 2014 19:10:23 +0000 (19:10 +0000)]
Merge "Tidy up logging."

9 years agoTidy up logging.
Ian Rogers [Wed, 22 Oct 2014 06:31:19 +0000 (23:31 -0700)]
Tidy up logging.

Move gVerboseMethods to CompilerOptions. Now "--verbose-methods=" option to
dex2oat rather than runtime argument "-verbose-methods:".
Move ToStr and Dumpable out of logging.h, move LogMessageData into logging.cc
except for a forward declaration.
Remove ConstDumpable as Dump methods are all const (and make this so if not
currently true).
Make LogSeverity an enum and improve compile time assertions and type checking.
Remove log_severity.h that's only used in logging.h.
With system headers gone from logging.h, go add to .cc files missing system
header includes.
Also, make operator new in ValueObject private for compile time instantiation
checking.

Change-Id: I3228f614500ccc9b14b49c72b9821c8b0db3d641

9 years agoMerge "X86 Long Min/Max: Avoid calling SRegToVReg with -1"
Vladimir Marko [Wed, 22 Oct 2014 15:22:43 +0000 (15:22 +0000)]
Merge "X86 Long Min/Max: Avoid calling SRegToVReg with -1"

9 years agoMerge "Fix make file comment"
Calin Juravle [Wed, 22 Oct 2014 15:00:43 +0000 (15:00 +0000)]
Merge "Fix make file comment"

9 years agoFix make file comment
Calin Juravle [Wed, 22 Oct 2014 14:54:34 +0000 (15:54 +0100)]
Fix make file comment

Change-Id: I2b2261aea00b934411979dbca1e00d5a75030407

9 years agoMerge "Minor fix in codegen tests."
Calin Juravle [Wed, 22 Oct 2014 14:57:06 +0000 (14:57 +0000)]
Merge "Minor fix in codegen tests."

9 years agoMinor fix in codegen tests.
Calin Juravle [Wed, 22 Oct 2014 14:54:12 +0000 (15:54 +0100)]
Minor fix in codegen tests.

Change-Id: I9b843536353d4f820b969895d5f75ee9b679aff0

9 years agoFix arm64 bug introduced by refactoring.
Stephen Kyle [Wed, 22 Oct 2014 14:23:46 +0000 (15:23 +0100)]
Fix arm64 bug introduced by refactoring.

- Commit 1d8cdbc5202378 made changes to the parameters for
artSet64InstanceFromCode, but did not change THREE_ARG_DOWNCALL
to THREE_ARG_REF_DOWNCALL for arm64.

Change-Id: If256b0bd32dbd1c95f61e0afcb35975bb09a8b97
Signed-off-by: Stephen Kyle <stephen.kyle@arm.com>
9 years agoMerge "Add multiplication for floats/doubles in optimizing compiler"
Calin Juravle [Wed, 22 Oct 2014 14:21:21 +0000 (14:21 +0000)]
Merge "Add multiplication for floats/doubles in optimizing compiler"

9 years agoAdd multiplication for floats/doubles in optimizing compiler
Calin Juravle [Tue, 21 Oct 2014 17:02:24 +0000 (18:02 +0100)]
Add multiplication for floats/doubles in optimizing compiler

Change-Id: I61de8ce1d9e37e30db62e776979b3f22dc643894

9 years agoMerge "Fix typo in Makefile."
Nicolas Geoffray [Wed, 22 Oct 2014 14:12:42 +0000 (14:12 +0000)]
Merge "Fix typo in Makefile."

9 years agoFix typo in Makefile.
Nicolas Geoffray [Wed, 22 Oct 2014 14:08:03 +0000 (15:08 +0100)]
Fix typo in Makefile.

Change-Id: I9133804eff8ce8e785f8551488daee1f19036952