OSDN Git Service

android-x86/art.git
9 years agoTweak one hint and one split in the linear scan.
Nicolas Geoffray [Mon, 1 Jun 2015 12:51:57 +0000 (13:51 +0100)]
Tweak one hint and one split in the linear scan.

- Return a hinted register if it is available. Otherwise
  another move will be necessary.
- Use SplitBetween instead of raw split when a register
  is not fully available. This will find the best split
  position.

Change-Id: Ie464e536204ab556eb09345fe6426621eb86e5ac

9 years agoMerge "Fix some ArtMethod related bugs"
Mathieu Chartier [Mon, 1 Jun 2015 05:22:48 +0000 (05:22 +0000)]
Merge "Fix some ArtMethod related bugs"

9 years agoFix some ArtMethod related bugs
Mathieu Chartier [Sun, 31 May 2015 21:29:23 +0000 (14:29 -0700)]
Fix some ArtMethod related bugs

Added root visiting for runtime methods, not currently required
since the GcRoots in these methods are null.

Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes
--trace run-tests 005, 044.

Fixed optimizing compiler bug where we used a normal stack location
instead of double on ARM64, this fixes the debuggable tests.

TODO: Fix JDWP tests.

Bug: 19264997

Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3

9 years agoMerge "Fix test 115-native-bridge for Mips."
Andreas Gampe [Sun, 31 May 2015 23:50:26 +0000 (23:50 +0000)]
Merge "Fix test 115-native-bridge for Mips."

9 years agoFix test 115-native-bridge for Mips.
Douglas Leung [Sat, 30 May 2015 02:50:02 +0000 (19:50 -0700)]
Fix test 115-native-bridge for Mips.

Change-Id: I3eee8df39e774d233f11c43a5578f407bfdebca1

9 years agoMerge "Move mirror::ArtMethod to native"
Mathieu Chartier [Sat, 30 May 2015 01:54:15 +0000 (01:54 +0000)]
Merge "Move mirror::ArtMethod to native"

9 years agoMove mirror::ArtMethod to native
Mathieu Chartier [Wed, 22 Apr 2015 20:56:20 +0000 (13:56 -0700)]
Move mirror::ArtMethod to native

Optimizing + quick tests are passing, devices boot.

TODO: Test and fix bugs in mips64.

Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS.
Some of the savings are from removal of virtual methods and direct
methods object arrays.

Bug: 19264997
Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d

9 years agoMerge "Add unstarted runtime test for String.<init>."
Jeff Hao [Fri, 29 May 2015 22:40:31 +0000 (22:40 +0000)]
Merge "Add unstarted runtime test for String.<init>."

9 years agoAdd unstarted runtime test for String.<init>.
Jeff Hao [Fri, 29 May 2015 17:53:17 +0000 (10:53 -0700)]
Add unstarted runtime test for String.<init>.

Bug: 21173514

(cherry picked from commit 73a937740841154eb32a0aa15f938f1c06f26091)

Change-Id: If7bd360c396e2594f34efe3a6237f77c7129112b

9 years agoMerge "Make some parts of ELF more (pointer) aligned."
David Srbecky [Fri, 29 May 2015 19:48:19 +0000 (19:48 +0000)]
Merge "Make some parts of ELF more (pointer) aligned."

9 years agoMake some parts of ELF more (pointer) aligned.
David Srbecky [Fri, 29 May 2015 17:09:05 +0000 (18:09 +0100)]
Make some parts of ELF more (pointer) aligned.

I am not aware of any problem at the moment, but better
be safe than sorry.  I have noticed that we align less
when comparing our output with output of other tools.

Bug: 20556771
Change-Id: I904e66f5b7776f64cc90ec2802ddb2c630b64d08

9 years agoMerge "Fix double-exception in super-class method validation."
Vladimir Marko [Fri, 29 May 2015 16:44:07 +0000 (16:44 +0000)]
Merge "Fix double-exception in super-class method validation."

9 years agoMerge "Link .dynamic to .dynstr"
David Srbecky [Fri, 29 May 2015 16:18:06 +0000 (16:18 +0000)]
Merge "Link .dynamic to .dynstr"

9 years agoMerge "Set correct size of PT_PHDR ELF segment."
David Srbecky [Fri, 29 May 2015 16:16:55 +0000 (16:16 +0000)]
Merge "Set correct size of PT_PHDR ELF segment."

9 years agoLink .dynamic to .dynstr
David Srbecky [Fri, 29 May 2015 15:33:11 +0000 (16:33 +0100)]
Link .dynamic to .dynstr

This is what the ELF specification says we should do.
(see Figure 1-13: sh_link and sh_info Interpretation)

Also make the entity size of string sections 0 (i.e. not a table).
Size 1 makes some sense as well but it is not what other tools do.

Bug: 20556771
Change-Id: I780ba2e13c09c33c143fca70b38a35f3b8528fb2

9 years agoSet correct size of PT_PHDR ELF segment.
David Srbecky [Fri, 29 May 2015 14:21:20 +0000 (15:21 +0100)]
Set correct size of PT_PHDR ELF segment.

This is just a nit pick, I do not believe that having it too
long could have caused any trouble since the correct number of
elements is stored in ELF header and extra space was zero padded.

Bug: 20556771
Change-Id: Ide56e6aa40f9b7175b55a830caf34c47e48213af

9 years agoMerge "ART: Add support for special handlers in sigchainlib"
Andreas Gampe [Fri, 29 May 2015 15:26:21 +0000 (15:26 +0000)]
Merge "ART: Add support for special handlers in sigchainlib"

9 years agoMerge "Support for inlining methods that call/throw."
Nicolas Geoffray [Fri, 29 May 2015 14:03:10 +0000 (14:03 +0000)]
Merge "Support for inlining methods that call/throw."

9 years agoMerge "Bring Reference Type Propagation to Instance/StaticInstanceField"
Roland Levillain [Fri, 29 May 2015 13:57:36 +0000 (13:57 +0000)]
Merge "Bring Reference Type Propagation to Instance/StaticInstanceField"

9 years agoSupport for inlining methods that call/throw.
Nicolas Geoffray [Mon, 18 May 2015 21:31:29 +0000 (22:31 +0100)]
Support for inlining methods that call/throw.

Mostly fixes here and there to make it working.

Change-Id: I1b535e895105d78b65634636d675b818551f783e

9 years agoMerge "Also add run-test dependencies to build-art-*-tests."
Nicolas Geoffray [Fri, 29 May 2015 12:55:54 +0000 (12:55 +0000)]
Merge "Also add run-test dependencies to build-art-*-tests."

9 years agoMerge "Use the new HCurrentMethod in HLoadString."
Nicolas Geoffray [Fri, 29 May 2015 12:43:13 +0000 (12:43 +0000)]
Merge "Use the new HCurrentMethod in HLoadString."

9 years agoAlso add run-test dependencies to build-art-*-tests.
Nicolas Geoffray [Fri, 29 May 2015 12:40:25 +0000 (13:40 +0100)]
Also add run-test dependencies to build-art-*-tests.

Change-Id: If02c1a9426c2d04f4fad8892e387b2fb6c48ee2f

9 years agoMerge "Fix typo in script."
Nicolas Geoffray [Fri, 29 May 2015 11:20:12 +0000 (11:20 +0000)]
Merge "Fix typo in script."

9 years agoFix typo in script.
Nicolas Geoffray [Fri, 29 May 2015 11:17:06 +0000 (12:17 +0100)]
Fix typo in script.

Change-Id: I853bb5758005f9f7c4940f815c3d72a1d48acd21

9 years agoUse the new HCurrentMethod in HLoadString.
Nicolas Geoffray [Fri, 29 May 2015 11:06:56 +0000 (12:06 +0100)]
Use the new HCurrentMethod in HLoadString.

Change-Id: I23d27e5e10736d127519eb3238ff8f25df3843a2

9 years agoMerge "Update libcore failures"
Nicolas Geoffray [Fri, 29 May 2015 11:03:52 +0000 (11:03 +0000)]
Merge "Update libcore failures"

9 years agoUpdate libcore failures
Wojciech Staszkiewicz [Fri, 29 May 2015 10:12:59 +0000 (11:12 +0100)]
Update libcore failures

Default device date (1970) is causing some tests to fail. This
change updates libcore failures to reflect this knowledge.

Change-Id: Ia8151cfa1600fba4b45c203d468de9244b322d61

9 years agoBring Reference Type Propagation to Instance/StaticInstanceField
Guillaume "Vermeille" Sanchez [Wed, 20 May 2015 16:52:13 +0000 (17:52 +0100)]
Bring Reference Type Propagation to Instance/StaticInstanceField

For this, we need the field index in FieldInfo, hence the add of the field.

Change-Id: Id219bd826d8496acf3981307a8c42e2eb6ddb712

9 years agoMerge "Add a script to build exactly like the chrome buildbot."
Nicolas Geoffray [Fri, 29 May 2015 10:41:40 +0000 (10:41 +0000)]
Merge "Add a script to build exactly like the chrome buildbot."

9 years agoAdd a script to build exactly like the chrome buildbot.
Nicolas Geoffray [Fri, 29 May 2015 09:54:12 +0000 (10:54 +0100)]
Add a script to build exactly like the chrome buildbot.

The buildbot will use that script directly.

Change-Id: I837432f1e1e9b9d238d91de9af51ad955f7cd76d

9 years agoFix double-exception in super-class method validation.
Vladimir Marko [Fri, 8 May 2015 11:26:59 +0000 (12:26 +0100)]
Fix double-exception in super-class method validation.

Bug: 19333589
Change-Id: I2399c4058d488bbdbf6709c63e367f1b7c251b1d

9 years agoMerge "ART: Fix valgrind Makefile"
Andreas Gampe [Fri, 29 May 2015 03:18:25 +0000 (03:18 +0000)]
Merge "ART: Fix valgrind Makefile"

9 years agoART: Fix valgrind Makefile
Andreas Gampe [Fri, 29 May 2015 03:17:09 +0000 (20:17 -0700)]
ART: Fix valgrind Makefile

Add a missing dependency that lead to runtime errors.

Change-Id: Idbaed6bcc56a644713f10847f8600dc0f962202f

9 years agoMerge "ART: Add Mips o32 callee-save registers to SaveAll frame"
Andreas Gampe [Fri, 29 May 2015 00:47:42 +0000 (00:47 +0000)]
Merge "ART: Add Mips o32 callee-save registers to SaveAll frame"

9 years agoMerge "Add JNI String.<init> test for global and weak global refs."
Jeff Hao [Thu, 28 May 2015 22:50:19 +0000 (22:50 +0000)]
Merge "Add JNI String.<init> test for global and weak global refs."

9 years agoAdd JNI String.<init> test for global and weak global refs.
Jeff Hao [Thu, 28 May 2015 21:32:07 +0000 (14:32 -0700)]
Add JNI String.<init> test for global and weak global refs.

Test for change:
https://android-review.googlesource.com/#/c/152265/

(cherry picked from commit 7be83025b62ab499ed8b2b59521f8fbe8e2b13ab)

Change-Id: If10a5fcf7a554d798d2bb21d493e5a7266ed0079

9 years agoMerge "Fix updating of JNI references for String.<init>."
Jeff Hao [Thu, 28 May 2015 22:47:58 +0000 (22:47 +0000)]
Merge "Fix updating of JNI references for String.<init>."

9 years agoART: Add support for special handlers in sigchainlib
Andreas Gampe [Sat, 23 May 2015 01:31:50 +0000 (18:31 -0700)]
ART: Add support for special handlers in sigchainlib

Add support for a special managed handler in sigchainlib that
will be called as the first user handler.

Use this support for native bridge v2. Extend test 115-native-bridge
to test the functionality.

Bug: 20217701
Change-Id: I78cc01fbdabe169154ff6b94c9f3ddb95b5c7448

9 years agoMerge "Add --generate-debug-info flag and remove the other two flags."
David Srbecky [Thu, 28 May 2015 18:37:35 +0000 (18:37 +0000)]
Merge "Add --generate-debug-info flag and remove the other two flags."

9 years agoAdd --generate-debug-info flag and remove the other two flags.
David Srbecky [Thu, 28 May 2015 15:12:43 +0000 (16:12 +0100)]
Add --generate-debug-info flag and remove the other two flags.

Replace the flags --include-debug-symbols and --include-cfi
with single flag called --generate-debug-info (with alias -g).

The name "symbol" was not ideal, since depending on context it
may be interpreted as "ELF symbols", or "debugging information".

This CL also means that we have only the options to include
either all debugging information or none.  This should be fine,
since we can use standard tools to strip anything we do not want.

Change-Id: I721fded56d755d7eed0ef36aa84e841a1f5747f8

9 years agoMerge "ART: Distinguish Checker lines from comments"
David Brazdil [Thu, 28 May 2015 14:47:03 +0000 (14:47 +0000)]
Merge "ART: Distinguish Checker lines from comments"

9 years agoART: Add Mips o32 callee-save registers to SaveAll frame
Andreas Gampe [Thu, 28 May 2015 01:31:42 +0000 (18:31 -0700)]
ART: Add Mips o32 callee-save registers to SaveAll frame

The floating point registers f20-f31 are callee-save in the Mips
ABI. While the managed code does not touch them, they need to be
saved when throwing an exception, so that they will be correctly
restored and not smashed.

Bug: 21266656
Change-Id: Ia96d52ce7fb41bf604da1797ce4d7a703e292415

9 years agoART: Distinguish Checker lines from comments
David Brazdil [Thu, 28 May 2015 10:14:54 +0000 (11:14 +0100)]
ART: Distinguish Checker lines from comments

In order to prevent tests passing due to lines with hard-to-spot
formatting errors begin ignored, e.g. by forgetting the colon after
"//CHECK", Checker will now require its assertions to start with "///"
or "##", respectivelly for Java and Smali. Such lines will never be
ignored and will fail the test unless successfully parsed.

Change-Id: I0da9a8f13eb96d950af8c85df17d1899a853a299

9 years agoMerge "Add a HCurrentMethod node."
Nicolas Geoffray [Thu, 28 May 2015 10:10:24 +0000 (10:10 +0000)]
Merge "Add a HCurrentMethod node."

9 years agoMerge "Fix single-step in native thread"
Sebastien Hertz [Thu, 28 May 2015 09:56:32 +0000 (09:56 +0000)]
Merge "Fix single-step in native thread"

9 years agoAdd a HCurrentMethod node.
Nicolas Geoffray [Wed, 27 May 2015 16:18:33 +0000 (17:18 +0100)]
Add a HCurrentMethod node.

This enables register allocation for the current method, so
that users of it don't always load it from the stack.

Currently only used by HLoadClass. Will make follow-up
CLs for the other users.

Change-Id: If73324d85643102faba47fabbbd2755eb258c59c

9 years agoFix single-step in native thread
Sebastien Hertz [Thu, 28 May 2015 09:00:57 +0000 (11:00 +0200)]
Fix single-step in native thread

If we attempt to single-step in a thread that is not running Java
code, there is no current method on the stack. So we need to check
for null before trying to decode debug info.

Bug: 21320157
Change-Id: Idef9954d14e1eb7185f25d2a6e238135ac52d35f

9 years agoMerge "Fix rule: the exe must be first dependency."
Nicolas Geoffray [Thu, 28 May 2015 09:27:40 +0000 (09:27 +0000)]
Merge "Fix rule: the exe must be first dependency."

9 years agoFix rule: the exe must be first dependency.
Nicolas Geoffray [Thu, 28 May 2015 09:21:03 +0000 (10:21 +0100)]
Fix rule: the exe must be first dependency.

Change-Id: Ic59a0c38ae8d7d1efc439014e694a95063a7589d

9 years agoMerge "Refactor makefiles to allow just building tests."
Nicolas Geoffray [Thu, 28 May 2015 08:37:21 +0000 (08:37 +0000)]
Merge "Refactor makefiles to allow just building tests."

9 years agoRefactor makefiles to allow just building tests.
Nicolas Geoffray [Wed, 27 May 2015 18:10:27 +0000 (19:10 +0100)]
Refactor makefiles to allow just building tests.

Also add a way to avoid syncing to the device, in case
a previous sync did it.

Change-Id: I38673cad712f8ddff641589cea50ca0d0dc04850

9 years agoFix updating of JNI references for String.<init>.
Jeff Hao [Thu, 28 May 2015 02:29:29 +0000 (19:29 -0700)]
Fix updating of JNI references for String.<init>.

Was missing updates to globals and weak globals.

Bug: 21288130
Bug: 21440428

(cherry picked from commit 1a302fb4f84525289c1cf7a437f5be1999a75251)

Change-Id: I41b64e8aae906f5986de483db096d8191e45f260

9 years agoMerge "Fix build - large frame size of ElfWriterQuick<ElfTypes>::Write (again)."
David Srbecky [Thu, 28 May 2015 01:04:02 +0000 (01:04 +0000)]
Merge "Fix build - large frame size of ElfWriterQuick<ElfTypes>::Write (again)."

9 years agoFix build - large frame size of ElfWriterQuick<ElfTypes>::Write (again).
David Srbecky [Wed, 27 May 2015 23:59:08 +0000 (00:59 +0100)]
Fix build - large frame size of ElfWriterQuick<ElfTypes>::Write (again).

Change-Id: I8a3277835f22a23c31063eda9b7f1fdc9423a5b0

9 years agoMerge "Fix valgrind includes"
Dmitriy Ivanov [Wed, 27 May 2015 23:29:03 +0000 (23:29 +0000)]
Merge "Fix valgrind includes"

9 years agoMerge "Reset libc targetSdkVersion"
Dmitriy Ivanov [Wed, 27 May 2015 22:44:25 +0000 (22:44 +0000)]
Merge "Reset libc targetSdkVersion"

9 years agoMerge "ART: Fix VerifyObject runtime verification"
Andreas Gampe [Wed, 27 May 2015 22:41:30 +0000 (22:41 +0000)]
Merge "ART: Fix VerifyObject runtime verification"

9 years agoFix valgrind includes
Dmitriy Ivanov [Wed, 27 May 2015 22:34:38 +0000 (15:34 -0700)]
Fix valgrind includes

 external/valgrind structure has been changed
 to reflect upstream projects struture.

 Making corresponding changes to art includes.

Change-Id: I2434a270f88502528df82c4820afedb002b65b8d

9 years agoMerge "Split .oat_patches to multiple sections."
David Srbecky [Wed, 27 May 2015 21:39:29 +0000 (21:39 +0000)]
Merge "Split .oat_patches to multiple sections."

9 years agoReset libc targetSdkVersion
Dmitriy Ivanov [Sat, 23 May 2015 01:03:34 +0000 (18:03 -0700)]
Reset libc targetSdkVersion

 This will let libc/linker know which sdk version
 is targeted by the app. This is needed to work around
 incorrect DT_NEEDED entries in old apps.

Bug: http://b/21364029
Change-Id: I2f2907104106aac6c8831381ca171dc0302e6a9d

9 years agoMerge "Bring Reference Type Propagation to NewArray"
Nicolas Geoffray [Wed, 27 May 2015 17:13:03 +0000 (17:13 +0000)]
Merge "Bring Reference Type Propagation to NewArray"

9 years agoBring Reference Type Propagation to NewArray
Guillaume "Vermeille" Sanchez [Wed, 20 May 2015 11:42:25 +0000 (12:42 +0100)]
Bring Reference Type Propagation to NewArray

Change-Id: Ieff4f38854e06b0ed4b5689ced94a4289053d80d

9 years agoMerge "Improve art::CodeInfo dumping."
Roland Levillain [Wed, 27 May 2015 16:01:50 +0000 (16:01 +0000)]
Merge "Improve art::CodeInfo dumping."

9 years agoMerge "Rename VisitCondition's argument in code generators."
Roland Levillain [Wed, 27 May 2015 16:01:13 +0000 (16:01 +0000)]
Merge "Rename VisitCondition's argument in code generators."

9 years agoRename VisitCondition's argument in code generators.
Roland Levillain [Wed, 27 May 2015 15:39:19 +0000 (16:39 +0100)]
Rename VisitCondition's argument in code generators.

This argument is a condition instruction, not a comparison.

Change-Id: I026f799d2161df58b0c8a84600eb8fffd6f7b998

9 years agoART: Fix VerifyObject runtime verification
Andreas Gampe [Wed, 27 May 2015 04:34:09 +0000 (21:34 -0700)]
ART: Fix VerifyObject runtime verification

Update some bit-rotted code to work again. Most tests now work, for
some the verification overhead results in a timeout.

Change-Id: Ieab4f2de474a05e915e24abc93da3c2eeed996eb

9 years agoImprove art::CodeInfo dumping.
Roland Levillain [Wed, 27 May 2015 14:12:19 +0000 (15:12 +0100)]
Improve art::CodeInfo dumping.

- Refactor existing dumping code into a set of new routines.
- Use art::Indenter to properly indent in the output.
- Add an additional argument to art::CodeInfo::Dump to
  enable or disable the dumping of stack maps and Dex
  register maps.

Change-Id: I52814095ff465522302d5d69d416726369ca5258

9 years agoMerge "[optimizing] x86: Prefer add over lea if possible"
Nicolas Geoffray [Wed, 27 May 2015 14:17:08 +0000 (14:17 +0000)]
Merge "[optimizing] x86: Prefer add over lea if possible"

9 years ago[optimizing] x86: Prefer add over lea if possible
Mark Mendell [Wed, 27 May 2015 14:08:24 +0000 (10:08 -0400)]
[optimizing] x86: Prefer add over lea if possible

Looking at some generated code, I noticed an lea being used when an add
was sufficient.  Check for that case, and generate the add.

Fixed for x86 and x86_64.

Change-Id: I110304ff0fed8837ada96d34353a293d29022ce5
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
9 years agoMerge "ART: Use kBadFprBase on mips64 and arm64."
Vladimir Marko [Wed, 27 May 2015 13:32:57 +0000 (13:32 +0000)]
Merge "ART: Use kBadFprBase on mips64 and arm64."

9 years agoMerge "Fix another source of undeterministic inlining."
Nicolas Geoffray [Wed, 27 May 2015 13:14:27 +0000 (13:14 +0000)]
Merge "Fix another source of undeterministic inlining."

9 years agoART: Use kBadFprBase on mips64 and arm64.
Vladimir Marko [Wed, 27 May 2015 13:07:08 +0000 (14:07 +0100)]
ART: Use kBadFprBase on mips64 and arm64.

Fix incorrect usage of kBadGprBase to avoid misleading and
ambiguous data in crash investigations.

Bug: 21266656
Change-Id: I1de6cd621d770be586f8140e86833769865b42c6

9 years agoFix another source of undeterministic inlining.
Nicolas Geoffray [Wed, 27 May 2015 11:53:36 +0000 (12:53 +0100)]
Fix another source of undeterministic inlining.

bug:20037935

Change-Id: Ifad234a331ec616f065aabc65576c5636ad8ec21

9 years agoMerge "Pass the dex method index directly to interface trampoline."
Nicolas Geoffray [Wed, 27 May 2015 11:08:51 +0000 (11:08 +0000)]
Merge "Pass the dex method index directly to interface trampoline."

9 years agoPass the dex method index directly to interface trampoline.
Nicolas Geoffray [Tue, 26 May 2015 15:29:08 +0000 (16:29 +0100)]
Pass the dex method index directly to interface trampoline.

This avoids computing the dex pc and re-finding the method
index again. I have kept the code for kDebugBuild.

Change-Id: Icd60e0deade755e32b54021c0875b1af592b8c3e

9 years agoMerge "Add missing oatdump test dependency"
Mathieu Chartier [Wed, 27 May 2015 02:57:09 +0000 (02:57 +0000)]
Merge "Add missing oatdump test dependency"

9 years agoAdd missing oatdump test dependency
Mathieu Chartier [Wed, 27 May 2015 02:48:16 +0000 (19:48 -0700)]
Add missing oatdump test dependency

Bug: 18000316
Change-Id: Ic828e8be8e5d3ef7e112facd0db57013740d449a

9 years agoMerge "Add oatdump test"
Mathieu Chartier [Wed, 27 May 2015 01:27:16 +0000 (01:27 +0000)]
Merge "Add oatdump test"

9 years agoAdd oatdump test
Mathieu Chartier [Tue, 26 May 2015 21:44:35 +0000 (14:44 -0700)]
Add oatdump test

Bug: 18000316

Change-Id: Ic22d63dc64a9b7a492b5e6bfbd4c75f30c35dfd5

9 years agoSplit .oat_patches to multiple sections.
David Srbecky [Fri, 22 May 2015 16:04:47 +0000 (17:04 +0100)]
Split .oat_patches to multiple sections.

.oat_patches section currently contains encoded patch locations for
several other sections. Split it to several sections - one for each
of the destination sections. For example, .text.oat_patches section
contains patch locations for the .text section.

This ensures that if we strip some the sections using standard
tools, we strip the corresponding .oat_patches section as well.

It also makes the overall design simpler.
I should have done it this way in the first place.

Since ApplyOatPatches has been simplified and uses unaligned memory
access, this also fixes bug 21403573.

Bug:20556771
Bug:21403573
Change-Id: Iae7c423911507b524eec500e8d61744046fcd3ba

9 years agoMerge "Fix alloc-dealloc-mismatch (new[] vs delete) in tests."
Evgenii Stepanov [Tue, 26 May 2015 21:49:25 +0000 (21:49 +0000)]
Merge "Fix alloc-dealloc-mismatch (new[] vs delete) in tests."

9 years agoMerge "Switch to using .debug_frame for CFI."
David Srbecky [Tue, 26 May 2015 21:46:40 +0000 (21:46 +0000)]
Merge "Switch to using .debug_frame for CFI."

9 years agoMerge "Generate just single ARM mapping symbol."
David Srbecky [Tue, 26 May 2015 21:45:59 +0000 (21:45 +0000)]
Merge "Generate just single ARM mapping symbol."

9 years agoFix alloc-dealloc-mismatch (new[] vs delete) in tests.
Evgenii Stepanov [Tue, 26 May 2015 21:44:23 +0000 (14:44 -0700)]
Fix alloc-dealloc-mismatch (new[] vs delete) in tests.

Change-Id: I680eaf819f7d7d3a4149c833b6739cba4b7e21be

9 years agoMerge "Fix mac build: cast fpr callee save addresses."
Vladimir Marko [Tue, 26 May 2015 19:51:30 +0000 (19:51 +0000)]
Merge "Fix mac build: cast fpr callee save addresses."

9 years agoFix mac build: cast fpr callee save addresses.
Vladimir Marko [Tue, 26 May 2015 19:42:30 +0000 (20:42 +0100)]
Fix mac build: cast fpr callee save addresses.

Bring back reinterpret_cast<>s removed by
    https://android-review.googlesource.com/151309 .
They are needed for mac builds.

Bug : 13925192

Change-Id: I7728c39a867a278000c84d75440b31e818c3bfcf

9 years agoMerge "Fix mac build: include <sys/time.h> in time_utils.cc ."
Vladimir Marko [Tue, 26 May 2015 19:19:44 +0000 (19:19 +0000)]
Merge "Fix mac build: include <sys/time.h> in time_utils.cc ."

9 years agoFix mac build: include <sys/time.h> in time_utils.cc .
Vladimir Marko [Tue, 26 May 2015 18:57:30 +0000 (19:57 +0100)]
Fix mac build: include <sys/time.h> in time_utils.cc .

Required for gettimeofday(). Not needed in utils.cc .

Bug: 13925192
Change-Id: If06840d8a47c9193ccc7bd4cee5c16fcf76d9729

9 years agoMerge "ART: Clean up arm64 kNumberOfXRegisters usage."
Vladimir Marko [Tue, 26 May 2015 17:42:31 +0000 (17:42 +0000)]
Merge "ART: Clean up arm64 kNumberOfXRegisters usage."

9 years agoMerge "Fix for potential moving GC bugs around proxy class."
Hiroshi Yamauchi [Tue, 26 May 2015 17:02:43 +0000 (17:02 +0000)]
Merge "Fix for potential moving GC bugs around proxy class."

9 years agoMerge "Log the process memory maps on host SIGSEGV."
Hiroshi Yamauchi [Tue, 26 May 2015 17:01:24 +0000 (17:01 +0000)]
Merge "Log the process memory maps on host SIGSEGV."

9 years agoFix for potential moving GC bugs around proxy class.
Hiroshi Yamauchi [Thu, 21 May 2015 19:05:27 +0000 (12:05 -0700)]
Fix for potential moving GC bugs around proxy class.

- Handlerize proxy_class which is live across multiple allocation
  points in ClassLinker::CreateProxyClass().

- In ClassLinker::CreateProxyClass(), insert a proxy class into the
  class table before creating ArtFields for it (and update it later in
  LinkClass()) because the field roots (ArtField::declaring_class_)
  won't be updated by GC unless the class is in the class table. If GC
  happens before they are updated by FixupTemporaryDeclaringClass()
  from LinkClass(), FixupTemporaryDeclaringClass() may not update the
  field roots correctly because the old class may already be moved but
  the fields roots may not. Reduce a window of time where the fields
  roots could be stale.

- In ClassLinker::LinkClass(), directly wrap a new class in a handle
  to avoid a window of time where new_class may be potentially stale.

- Print more diagnostic info about the holder of the field upon a mark
  sweep invalid ref crash.

- Add an additional sanity check in Field::GetArtField().

(cherry pick commit 08d1b5f2296c0f51507b8b443f4e39dfc161572c)

Bug: 20557050

Change-Id: I9ad32d304922da96b7e1fad262d97de21cbac776

9 years agoART: Clean up arm64 kNumberOfXRegisters usage.
Vladimir Marko [Tue, 19 May 2015 17:08:00 +0000 (18:08 +0100)]
ART: Clean up arm64 kNumberOfXRegisters usage.

Avoid undefined behavior for arm64 stemming from 1u << 32 in
loops with upper bound kNumberOfXRegisters.

Create iterators for enumerating bits in an integer either
from high to low or from low to high and use them for
<arch>Context::FillCalleeSaves() on all architectures.

Refactor runtime/utils.{h,cc} by moving all bit-fiddling
functions to runtime/base/bit_utils.{h,cc} (together with
the new bit iterators) and all time-related functions to
runtime/base/time_utils.{h,cc}. Improve test coverage and
fix some corner cases for the bit-fiddling functions.

Bug: 13925192
Change-Id: I704884dab15b41ecf7a1c47d397ab1c3fc7ee0f7

9 years agoMerge "Fix a few literals and assertions."
Roland Levillain [Tue, 26 May 2015 14:43:33 +0000 (14:43 +0000)]
Merge "Fix a few literals and assertions."

9 years agoMerge "Move the catalog after the stack maps."
Nicolas Geoffray [Tue, 26 May 2015 14:34:57 +0000 (14:34 +0000)]
Merge "Move the catalog after the stack maps."

9 years agoMove the catalog after the stack maps.
Nicolas Geoffray [Tue, 26 May 2015 14:22:58 +0000 (15:22 +0100)]
Move the catalog after the stack maps.

Fetching a stack map should be cheap, and therefore we should
not compute the size of the catalog.

Change-Id: Iff6accb7832bdfa6d209a0928d6088b8b57c1aa4

9 years agoMerge "Make inlining deterministic."
Nicolas Geoffray [Tue, 26 May 2015 14:12:51 +0000 (14:12 +0000)]
Merge "Make inlining deterministic."

9 years agoFix a few literals and assertions.
Roland Levillain [Tue, 26 May 2015 14:02:07 +0000 (15:02 +0100)]
Fix a few literals and assertions.

Change-Id: I0a1e9db607ec7325e17568b034ba90e68d2298f9

9 years agoMake inlining deterministic.
Nicolas Geoffray [Tue, 26 May 2015 13:35:06 +0000 (14:35 +0100)]
Make inlining deterministic.

Only the case where two methods are not in the same dex
file could lead to undeterministic behavior.

bug:20037935

Change-Id: I1a7642a979302b17e76d196894437c1aacbbbe9d