OSDN Git Service

android-x86/dalvik.git
13 years agoMerge "Remove gclog.py" into dalvik-dev
Andy McFadden [Mon, 14 Feb 2011 21:02:19 +0000 (13:02 -0800)]
Merge "Remove gclog.py" into dalvik-dev

13 years agoRemove gclog.py
Andy McFadden [Mon, 14 Feb 2011 20:29:38 +0000 (12:29 -0800)]
Remove gclog.py

The GC event log entries are no longer generated, so we no longer
need this.

Change-Id: I247bbc44d628ac5e54dfe031d09eb14edbff8d4d

13 years agoMerge "Add scheduling barrier at the end of IT blocks for FP comparisons." into dalvi...
Ben Cheng [Mon, 14 Feb 2011 18:02:04 +0000 (10:02 -0800)]
Merge "Add scheduling barrier at the end of IT blocks for FP comparisons." into dalvik-dev

13 years agoFix to allow SCCP to correctly propagate division and remainer ops.
jeffhao [Fri, 11 Feb 2011 23:43:07 +0000 (15:43 -0800)]
Fix to allow SCCP to correctly propagate division and remainer ops.

Also updated expected values for the const collector test.

Change-Id: Iedcf17d776c60cb6174f7a7c9f75be84d2c38020

13 years agoAdd scheduling barrier at the end of IT blocks for FP comparisons.
Ben Cheng [Sat, 12 Feb 2011 01:01:08 +0000 (17:01 -0800)]
Add scheduling barrier at the end of IT blocks for FP comparisons.

Bug: 3448446
Change-Id: I98e2bbc4886443ba3c27c2963d7540fcee5790bb

13 years agoMerge "Rename invoke-direct-empty to invoke-object-init" into dalvik-dev
Andy McFadden [Sat, 12 Feb 2011 00:00:54 +0000 (16:00 -0800)]
Merge "Rename invoke-direct-empty to invoke-object-init" into dalvik-dev

13 years agoRename invoke-direct-empty to invoke-object-init
Andy McFadden [Fri, 11 Feb 2011 23:26:10 +0000 (15:26 -0800)]
Rename invoke-direct-empty to invoke-object-init

The invoke-direct-empty instruction was introduced to remove the
overhead of calling the empty Object constructor.  We now need it
to do some extra work on behalf of object construction, so it's
appropriate to change the instruction name to match the role it
fills rather than the more general role it was hoped to fill.

No functional changes.

Bug 3342343

Change-Id: I65dd6a2c00c99581c9a19b16fe193b70642c8fbb

13 years agoFast fail impossible allocations.
Carl Shapiro [Fri, 11 Feb 2011 00:46:55 +0000 (16:46 -0800)]
Fast fail impossible allocations.

If the size_t type cannot be used to represent any component of an
array size the allocation is be rejected.  With this change, overflow
is checked for in the element size computation and total array size
computation.  More preconditions are checked by asserts.  Misleading
comments have been removed.

Change-Id: I067869c3404b9da591939555c6f9904f52ca7bd7

13 years agoEnsure a dalvik-cache directory exists before running dalvik.
Carl Shapiro [Fri, 11 Feb 2011 20:06:33 +0000 (12:06 -0800)]
Ensure a dalvik-cache directory exists before running dalvik.

The dalvik tests require a dalvik-cache directory otherwise dalvikvm
will fail with an unhelpful error message.  On the device it is safe
to assume a dalvik-cache directory exists but this is not a safe
assumption on the host.  With this change the script tries to create a
dalvik-cache directory on the host if it does not exist.

Change-Id: Ie0c69ff8dcd68b6b04a763f06861edd308406f69

13 years agoMerge "Fix an out-of-date comment." into dalvik-dev
Elliott Hughes [Thu, 10 Feb 2011 23:47:58 +0000 (15:47 -0800)]
Merge "Fix an out-of-date comment." into dalvik-dev

13 years agoMerge "Tweak the 64-bit load/store code" into dalvik-dev
Andy McFadden [Thu, 10 Feb 2011 23:47:57 +0000 (15:47 -0800)]
Merge "Tweak the 64-bit load/store code" into dalvik-dev

13 years agoTweak the 64-bit load/store code
Andy McFadden [Thu, 10 Feb 2011 23:32:16 +0000 (15:32 -0800)]
Tweak the 64-bit load/store code

The old version would either move data through a union, call memcpy(),
or just cast the pointer to a wider type and dereference it.  The
latter turns out to be an aliasing violation, and it recently started
causing test failures on the "host" build.

We now use memcpy() for x86 and unions for ARM.

Bug 3431820

Change-Id: I302a7f49f7ae88ac96b8f7fef3d9260ac64d631b

13 years agoFix an out-of-date comment.
Elliott Hughes [Thu, 10 Feb 2011 23:25:04 +0000 (15:25 -0800)]
Fix an out-of-date comment.

Change-Id: Ie3a93604533e9dab59e892506e2c0258d046837b

13 years agoMerge "Move more system propery handling into managed code." into dalvik-dev
Elliott Hughes [Thu, 10 Feb 2011 22:21:44 +0000 (14:21 -0800)]
Merge "Move more system propery handling into managed code." into dalvik-dev

13 years agoMove more system propery handling into managed code.
Elliott Hughes [Thu, 10 Feb 2011 20:03:34 +0000 (12:03 -0800)]
Move more system propery handling into managed code.

Bug: 3413364
Change-Id: I044ed1b11e919bb1c589c626b613faf85157fb64

13 years agoMerge "Reverting SCCP change to division because the system doesn't start." into...
jeffhao [Thu, 10 Feb 2011 21:02:51 +0000 (13:02 -0800)]
Merge "Reverting SCCP change to division because the system doesn't start." into dalvik-dev

13 years agoReverting SCCP change to division because the system doesn't start.
jeffhao [Thu, 10 Feb 2011 20:46:14 +0000 (12:46 -0800)]
Reverting SCCP change to division because the system doesn't start.

Temporarily reverting change to allow the system to boot while the
root cause is determined.

Change-Id: Ife1fb6fc99fead9eb72fff8415969fc4955ff7cd

13 years agoMerge "Added support for integer division to SCCP." into dalvik-dev
jeffhao [Thu, 10 Feb 2011 17:52:00 +0000 (09:52 -0800)]
Merge "Added support for integer division to SCCP." into dalvik-dev

13 years agoAdded support for integer division to SCCP.
jeffhao [Thu, 10 Feb 2011 02:29:00 +0000 (18:29 -0800)]
Added support for integer division to SCCP.

Division generates a result that must be fetched with a
move-result-pseudo instruction. SCCP originally had no way of tying the
division with the result it generates. This change should allow proper
constant propagation when division of integers is involved.

Change-Id: Ib7c5d2dd26eea3ab6545b613a540f0161a8e1642

13 years agoMerge "Move more system property handling into managed code." into dalvik-dev
Elliott Hughes [Thu, 10 Feb 2011 01:29:30 +0000 (17:29 -0800)]
Merge "Move more system property handling into managed code." into dalvik-dev

13 years agoMove more system property handling into managed code.
Elliott Hughes [Thu, 10 Feb 2011 00:52:36 +0000 (16:52 -0800)]
Move more system property handling into managed code.

Bug: 3413364
Change-Id: I0f22ea9ed5327e4fef9d4395025173a839ea9ce2

13 years agoMerge "Split addNewHeap into separate definitions." into dalvik-dev
Carl Shapiro [Thu, 10 Feb 2011 00:41:57 +0000 (16:41 -0800)]
Merge "Split addNewHeap into separate definitions." into dalvik-dev

13 years agoSplit addNewHeap into separate definitions.
Carl Shapiro [Thu, 10 Feb 2011 00:36:12 +0000 (16:36 -0800)]
Split addNewHeap into separate definitions.

Change-Id: I47c4edb8dddf1e8c256ff2def7045fa236b5b1fd

13 years agoMerge "Remove the unused argument to dvmCollectGarbage." into dalvik-dev
Carl Shapiro [Wed, 9 Feb 2011 23:35:43 +0000 (15:35 -0800)]
Merge "Remove the unused argument to dvmCollectGarbage." into dalvik-dev

13 years agoMerge "SCCP propagates more constants and prunes unexecuted paths from branches....
jeffhao [Wed, 9 Feb 2011 22:44:40 +0000 (14:44 -0800)]
Merge "SCCP propagates more constants and prunes unexecuted paths from branches." into dalvik-dev

13 years agoSCCP propagates more constants and prunes unexecuted paths from branches.
jeffhao [Tue, 8 Feb 2011 01:48:13 +0000 (17:48 -0800)]
SCCP propagates more constants and prunes unexecuted paths from branches.

The SCCP pass now more aggressively propagates constant values through
the code.  Combined with changes to the LiteralOpUpgrader, instructions
with known constant results will be replaced with a simple const
instruction.

In addition, the SCCP pass can now find branches with constant conditions
and remove the branch path that never ends up being executed. Because of
the way finally blocks end up being replicated, this tends to prune away
error handling when no exception occurs, and hard code error handling
when an exception happens.

Change-Id: I6f3330151ec387c8a1e7ce098ff6cdb8d0ce5606

13 years agoRemove the unused argument to dvmCollectGarbage.
Carl Shapiro [Wed, 9 Feb 2011 22:20:14 +0000 (14:20 -0800)]
Remove the unused argument to dvmCollectGarbage.

Change-Id: Id7bf60b99b33cb8f058f9a500dc63cfe01b8e3c2

13 years agoRemove the private CLZ implementation in the GC.
Carl Shapiro [Wed, 9 Feb 2011 03:54:55 +0000 (19:54 -0800)]
Remove the private CLZ implementation in the GC.

This was a hold over from a time when the compiler did not properly
support the CLZ intrinsic.

Change-Id: I224481868c8d6fd3e0382d9cde3a2ffd02cfd39c

13 years agoMerge "Move the duplicated alignment macros to a common location." into dalvik-dev
Carl Shapiro [Wed, 9 Feb 2011 21:30:40 +0000 (13:30 -0800)]
Merge "Move the duplicated alignment macros to a common location." into dalvik-dev

13 years agoMerge "Replace dvmValidateObject with ordinary null pointer checks." into dalvik-dev
Carl Shapiro [Wed, 9 Feb 2011 21:30:24 +0000 (13:30 -0800)]
Merge "Replace dvmValidateObject with ordinary null pointer checks." into dalvik-dev

13 years agoMerge "Let tryMalloc field over-sized allocation errors." into dalvik-dev
Carl Shapiro [Wed, 9 Feb 2011 21:28:42 +0000 (13:28 -0800)]
Merge "Let tryMalloc field over-sized allocation errors." into dalvik-dev

13 years agoMerge "Add huge-array OOM test" into dalvik-dev
Andy McFadden [Wed, 9 Feb 2011 21:21:26 +0000 (13:21 -0800)]
Merge "Add huge-array OOM test" into dalvik-dev

13 years agoAdd huge-array OOM test
Andy McFadden [Wed, 9 Feb 2011 21:12:36 +0000 (13:12 -0800)]
Add huge-array OOM test

Added a regression test for allocation of 4GB+ arrays.

Change-Id: Ibac82bbba9ef25b0850386a35e0f5b8554abbaa3

13 years agoMerge "Misc goodies in the JIT in preparation for more aggressive code motion." into...
Ben Cheng [Wed, 9 Feb 2011 18:04:12 +0000 (10:04 -0800)]
Merge "Misc goodies in the JIT in preparation for more aggressive code motion." into dalvik-dev

13 years agoam 6f562a3a: Merge "Make Release(JNI_COMMIT) faster"
Andy McFadden [Wed, 9 Feb 2011 16:24:13 +0000 (08:24 -0800)]
am 6f562a3a: Merge "Make Release(JNI_COMMIT) faster"

* commit '6f562a3aee2b866d1f8a8a5773d81e0593069b3e':
  Make Release(JNI_COMMIT) faster

13 years agoam 81abf28f: Remove JNI_FORCE_C
Andy McFadden [Wed, 9 Feb 2011 16:24:07 +0000 (08:24 -0800)]
am 81abf28f: Remove JNI_FORCE_C

* commit '81abf28f00ba97fdf6b085d1d91a5e73f9a1e799':
  Remove JNI_FORCE_C

13 years agoMerge "Make Release(JNI_COMMIT) faster"
Andy McFadden [Wed, 9 Feb 2011 16:10:49 +0000 (08:10 -0800)]
Merge "Make Release(JNI_COMMIT) faster"

13 years agoLet tryMalloc field over-sized allocation errors.
Carl Shapiro [Wed, 9 Feb 2011 04:41:28 +0000 (20:41 -0800)]
Let tryMalloc field over-sized allocation errors.

Change-Id: I691b8eeca74b7e018f86753b00b7f117d5872916

13 years agoReplace dvmValidateObject with ordinary null pointer checks.
Carl Shapiro [Wed, 9 Feb 2011 04:19:17 +0000 (20:19 -0800)]
Replace dvmValidateObject with ordinary null pointer checks.

Change-Id: I8eddca7fac83e014d591bdd06ce2df634672243f

13 years agoMove the duplicated alignment macros to a common location.
Carl Shapiro [Wed, 9 Feb 2011 04:10:56 +0000 (20:10 -0800)]
Move the duplicated alignment macros to a common location.

Change-Id: I11cb1c3034a3a4e7d8e8c0793f5c85fa623155b2

13 years agoMerge "Relocate the always in-lined functions from HeapBitmap.h." into dalvik-dev
Carl Shapiro [Wed, 9 Feb 2011 02:16:51 +0000 (18:16 -0800)]
Merge "Relocate the always in-lined functions from HeapBitmap.h." into dalvik-dev

13 years agoRelocate the always in-lined functions from HeapBitmap.h.
Carl Shapiro [Wed, 9 Feb 2011 01:43:43 +0000 (17:43 -0800)]
Relocate the always in-lined functions from HeapBitmap.h.

The three essential bitmap access methods have been moved to the new
HeapBitmapInlines.h header file.  All other bitmap methods have been
moved into HeapBitmap.c.  As an added bonus, source indexing and cross
reference tools should correctly locate all heap bitmap definitions.

Change-Id: I35703403f4f79d121c9c3f411b7d7110d92739d0

13 years agoMisc goodies in the JIT in preparation for more aggressive code motion.
Ben Cheng [Wed, 9 Feb 2011 01:09:25 +0000 (17:09 -0800)]
Misc goodies in the JIT in preparation for more aggressive code motion.

- Set up resource masks correctly for Thumb push/pop when LR/PC are involved.
- Preserve LR around simulated heap references under self-verification mode.
- Compact a few simple flags in ArmLIR into bit fields.
- Minor performance tuning in TEMPLATE_MEM_OP_DECODE

Change-Id: Id73edac837c5bb37dfd21f372d6fa21c238cf42a

13 years agoMake Release(JNI_COMMIT) faster
Andy McFadden [Wed, 9 Feb 2011 00:24:34 +0000 (16:24 -0800)]
Make Release(JNI_COMMIT) faster

The Release<primitive>ArrayElements and ReleasePrimitiveArrayCritical
calls take a "mode" argument.  If you pass in JNI_COMMIT, the storage
isn't actually released; instead, the buffer contents are flushed to
the backing storage.  If the VM has handed you a pointer to the raw
data rather than a copy, the call is a no-op.

In its present incarnation, it's a no-op that changes the thread state,
adding overhead and the possibility of suspension.  This change moves
the test for JNI_COMMIT outside the enter/exit macros.

Bug 3430203

Change-Id: I8426647ee02b2336c5c90146028fc207cfbacc3a

13 years agoRemove JNI_FORCE_C
Andy McFadden [Wed, 9 Feb 2011 00:12:33 +0000 (16:12 -0800)]
Remove JNI_FORCE_C

This hasn't been useful in a really long time.

Change-Id: Ieea01f5d051bc8fc671f7414af3bed626ece75f1

13 years agoam 1fbcc3ad: Merge "Added JNI hack to support JNI hack"
Andy McFadden [Wed, 9 Feb 2011 00:05:45 +0000 (16:05 -0800)]
am 1fbcc3ad: Merge "Added JNI hack to support JNI hack"

* commit '1fbcc3ad1344f6997f34db0ab8296b0867c84b71':
  Added JNI hack to support JNI hack

13 years agoMerge "Added JNI hack to support JNI hack"
Andy McFadden [Wed, 9 Feb 2011 00:03:05 +0000 (16:03 -0800)]
Merge "Added JNI hack to support JNI hack"

13 years agoAdded JNI hack to support JNI hack
Andy McFadden [Tue, 8 Feb 2011 20:07:32 +0000 (12:07 -0800)]
Added JNI hack to support JNI hack

Some of our graphics code wants to get a pointer, release it, and then
continue to use it.  The "forcecopy" mode of CheckJNI was designed
to find any code that does this.  It succeeded.

To support the behavior, we provide a JNI helper function that does
the dirty work.  It passes a magic value into the Get and Release calls
that causes "forcecopy" to skip the copy.  When forcecopy is not
enabled, the values are simply ignored.

To avoid any possibility of the function getting published in the NDK,
the function is not described in JNIHelp.h.

Bug 3409356

Change-Id: Ibd20d12ba6d3d3236ebf5760f7ccaa8c557e3774

13 years agoam e3f9c573: Free some strings in error paths
Kenny Root [Tue, 8 Feb 2011 20:07:50 +0000 (12:07 -0800)]
am e3f9c573: Free some strings in error paths

* commit 'e3f9c573d0edb186f4583fea1dbcdf9c12c0c36c':
  Free some strings in error paths

13 years agoMerge "Remove the deprecated gcSoftReferences method." into dalvik-dev
Carl Shapiro [Tue, 8 Feb 2011 19:45:18 +0000 (11:45 -0800)]
Merge "Remove the deprecated gcSoftReferences method." into dalvik-dev

13 years agoFree some strings in error paths
Kenny Root [Wed, 2 Feb 2011 23:07:00 +0000 (15:07 -0800)]
Free some strings in error paths

Change-Id: I54629ca65c30960f930ce6886e0915e360e20237

13 years agoRemove the deprecated gcSoftReferences method.
Carl Shapiro [Tue, 8 Feb 2011 04:38:38 +0000 (20:38 -0800)]
Remove the deprecated gcSoftReferences method.

This code was used by the zygote to force a garbage collection that
never preserves SoftReference referents.  With this change, the
SoftReference processor defaults to never preserve when running in
zygote mode.

Change-Id: I90edadd05b732badc401baead6986d37c71a5afc

13 years agoam 85019f27: Avoid double-free on error.
Andy McFadden [Mon, 7 Feb 2011 23:56:12 +0000 (15:56 -0800)]
am 85019f27: Avoid double-free on error.

* commit '85019f27b4140f86450948f3486a64743d1f8671':
  Avoid double-free on error.

13 years agoAvoid double-free on error.
Andy McFadden [Mon, 7 Feb 2011 23:49:13 +0000 (15:49 -0800)]
Avoid double-free on error.

In certain circumstances on a -user build we could end up trying to
free a buffer twice.

Bug 3431477

Change-Id: I1cce1da0e32aabc85d5c5c69346224c6db49b8ee

13 years agoUpdated expected outputs for some dx tests.
jeffhao [Mon, 7 Feb 2011 21:58:20 +0000 (13:58 -0800)]
Updated expected outputs for some dx tests.

Recent changes in code generation caused the generated output to no
longer match the expected results of these tests. They've now been
updated properly.

Change-Id: I223075e2b1ff297d37022d77de74304b084ca900

13 years agoFix expected output.
Dan Bornstein [Mon, 7 Feb 2011 20:22:18 +0000 (12:22 -0800)]
Fix expected output.

The expected output of these tests changed due to incidental (to the
tests) changes in dx, in particular renaming the payload opcodes and
simplifying some error output.

Change-Id: Ia16cd484202a86b9ddab1ae4794a384b2ec53d9a

13 years agoFix dex processing when no output file is specified.
Dan Bornstein [Mon, 7 Feb 2011 20:06:54 +0000 (12:06 -0800)]
Fix dex processing when no output file is specified.

This case is mainly exercised in test code.

Change-Id: Ifbcbec3f001cae925090796ce8ed69f6a986384c

13 years agoMerge "Move DexException to dx.util." into dalvik-dev
Dan Bornstein [Mon, 7 Feb 2011 19:31:24 +0000 (11:31 -0800)]
Merge "Move DexException to dx.util." into dalvik-dev

13 years agoMerge commit 'e502b66edd734e8265bc2bd8f1c2addb64b63e73' into honeycomb-release-to...
Brian Carlstrom [Sun, 6 Feb 2011 01:10:56 +0000 (17:10 -0800)]
Merge commit 'e502b66edd734e8265bc2bd8f1c2addb64b63e73' into honeycomb-release-to-dalvik-dev

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Sat, 5 Feb 2011 06:25:58 +0000 (22:25 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Sat, 5 Feb 2011 05:55:43 +0000 (21:55 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoMove DexException to dx.util.
Dan Bornstein [Sat, 5 Feb 2011 01:59:14 +0000 (17:59 -0800)]
Move DexException to dx.util.

Change-Id: I86bf83bc3adcc55eb8bbeac2fc28822cb5f2d2b9

13 years agoRemove unused and racey debugging code.
Carl Shapiro [Sat, 5 Feb 2011 01:36:49 +0000 (17:36 -0800)]
Remove unused and racey debugging code.

Change-Id: I335a9304b7ffdcba8062cd33ce1a0d721f345a73

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Sat, 5 Feb 2011 01:35:37 +0000 (17:35 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoRemove and outdated comment and logging macro.
Carl Shapiro [Sat, 5 Feb 2011 01:29:40 +0000 (17:29 -0800)]
Remove and outdated comment and logging macro.

Change-Id: I39fe34f69276d2e3d26d5d296cda4e7240f4d845

13 years agoresolved conflicts for merge of d6e32b81 to dalvik-dev
Andy McFadden [Sat, 5 Feb 2011 01:08:41 +0000 (17:08 -0800)]
resolved conflicts for merge of d6e32b81 to dalvik-dev

Change-Id: Ib038cc0e68651c63dbcf9a0df2a5607ab2c2d6c7

13 years agoEnsure word atomicity in System.arraycopy
Andy McFadden [Thu, 3 Feb 2011 00:55:41 +0000 (16:55 -0800)]
Ensure word atomicity in System.arraycopy

The VM needs to ensure that updates to 16-bit and 32-bit fields
and array elements happen atomically.  System.arraycopy was calling
memmmove(), which in bionic happens to copy a byte at a time.

The new plan is to have bionic provide a platform-optimized memmove
variant that makes guarantees about word sizes.  If it is not present
(either because it hasn't been written for the current platform,
or we're not linking against bionic), we will use a trivial copy loop.

We assume that the memmove-by-word implementation does whatever
it needs to for best performance.  For example, if the function
determines that memcpy() is word-safe and will be faster, it can
call that.  The VM no longer makes assumptions about the internal
workings of libc functions.

I also rearranged the code to avoid making indirect calls, reading
function addresses from memory, and using integer multiplication
instructions when a simple shift will do.  (gcc now generates the
whole thing as one function.)

Also, added some primitive array copy tests to 011-array-copy.

Bug 3398352

Change-Id: I4677ee1c87998697a93e61f39a48b3f391e8e11b

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Fri, 4 Feb 2011 19:49:07 +0000 (11:49 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoMove the instruction representation code.
Dan Bornstein [Fri, 4 Feb 2011 18:44:08 +0000 (10:44 -0800)]
Move the instruction representation code.

It now gets its own subpackage, reducing the clutter in the base .io
package. I was on the fence about CodeReader and ended up just leaving
it be, but maybe that one wants to move too.

Change-Id: I87c574ce2086025bcb9583627a545160084ba88e

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Fri, 4 Feb 2011 18:26:04 +0000 (10:26 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoMerge "Clean up targets and data payloads." into dalvik-dev
Dan Bornstein [Fri, 4 Feb 2011 17:45:23 +0000 (09:45 -0800)]
Merge "Clean up targets and data payloads." into dalvik-dev

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Fri, 4 Feb 2011 15:19:01 +0000 (07:19 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoMerge commit 'e6cad708e93dab280335d3f69917048c34cfc640' into honeycomb-release-to...
Brian Carlstrom [Fri, 4 Feb 2011 05:47:30 +0000 (21:47 -0800)]
Merge commit 'e6cad708e93dab280335d3f69917048c34cfc640' into honeycomb-release-to-dalvik-dev

13 years agoClean up targets and data payloads.
Dan Bornstein [Fri, 4 Feb 2011 01:05:28 +0000 (17:05 -0800)]
Clean up targets and data payloads.

In particular:
* Fix target calculation to be properly relative when encoding.
* Add data payload variants of DecodedInstruction, and en/decode using them.
* Remove the uninterpreted data member from the base DecodedInstruction.

This change introduces the concept of an "address map" that is built
up while reading or writing code, which is used when en/decoding
switch data payload instructions, so that they can decode targets into
absolute addresses and encode targets into relative addresses. The
deal is that the relative addresses encoded in these payload
instructions are relative to the address of the dependant switch
instruction and not the address of the payload instruction.

Change-Id: I43cb014f1af75a31bbf0b757e4854a9dc865eab7

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Thu, 3 Feb 2011 23:26:36 +0000 (15:26 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoMerge "Make some "argument shape" be represented by subclassing." into dalvik-dev
Dan Bornstein [Thu, 3 Feb 2011 23:18:24 +0000 (15:18 -0800)]
Merge "Make some "argument shape" be represented by subclassing." into dalvik-dev

13 years agoMake some "argument shape" be represented by subclassing.
Dan Bornstein [Thu, 3 Feb 2011 20:40:04 +0000 (12:40 -0800)]
Make some "argument shape" be represented by subclassing.

In particular, this splits out subclasses for each possible fixed
register count as well as one for register ranges. A follow-up patch
will introduce explicit DecodedInstruction subclasses for payload data
instructions, which is actually the original motivation for this
change, though this change makes InstructionCodec get cleaner in most
of the decoders (at the expense of one decoder that gets a bit
uglier). C'est la guerre.

Change-Id: Ib22280ba86c9d087c396845bf94266d3e2894db5

13 years agoMerge "[JIT] Fix for 3385583: Performance variance" into dalvik-dev
Bill Buzbee [Thu, 3 Feb 2011 20:25:17 +0000 (12:25 -0800)]
Merge "[JIT] Fix for 3385583: Performance variance" into dalvik-dev

13 years agoMerge "Fixed SCCP to properly propagate reverse subtraction." into dalvik-dev
jeffhao [Thu, 3 Feb 2011 20:20:06 +0000 (12:20 -0800)]
Merge "Fixed SCCP to properly propagate reverse subtraction." into dalvik-dev

13 years ago[JIT] Fix for 3385583: Performance variance
Bill Buzbee [Thu, 3 Feb 2011 15:38:22 +0000 (07:38 -0800)]
[JIT] Fix for 3385583: Performance variance

Closes a window in which the "interpret-only" templace could get chained
to an existing trace while the intended translation was under construction.
Note that this CL also introduces some small, but fundamental changes in trace
formation:

1.  Previouosly, when an exception or other trace terminating event
occurred during trace formation, the entire trace was abandoned.  With this
change, we instead end the trace at the last successful instruction.

2.  We previously allowed multiple attempts (perhaps by multiple threads)
to form a trace compilation request for a dalvik PC.  This was done in an
attempt to allow recovery from compiler failures.  Now we enforce a new rule:
only the thread that wins the race to allocate an entry in the JitTable will
form the trace request.

3.  In a (probably misguided) attempt avoid unnecessary contention, we
previously allowed work order enqueue requests to be dropped if a requester
did not aquire TableLock on first attempt (assuming that if the trace were
hot, it would be requested again).  Now we block on enqueue.

Change-Id: I40ea4f1b012250219ca37d5c40c5f22cae2092f1

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Thu, 3 Feb 2011 19:23:24 +0000 (11:23 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoFixed SCCP to properly propagate reverse subtraction.
jeffhao [Thu, 3 Feb 2011 19:07:37 +0000 (11:07 -0800)]
Fixed SCCP to properly propagate reverse subtraction.

Change-Id: If9c83d2f9ce5de466e6c7b4108bda54d2d025dd6

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Thu, 3 Feb 2011 15:17:43 +0000 (07:17 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoMerge "Guard against uninitialized objects when counting instances." into dalvik-dev
Carl Shapiro [Thu, 3 Feb 2011 08:12:59 +0000 (00:12 -0800)]
Merge "Guard against uninitialized objects when counting instances." into dalvik-dev

13 years agoDo not write to an unmarked object when freeing its monitor.
Carl Shapiro [Thu, 3 Feb 2011 02:20:08 +0000 (18:20 -0800)]
Do not write to an unmarked object when freeing its monitor.

Previously, the monitor sweep routine cleared the lock word of every
unmarked object with an inflated lock to ensure than an errant code
would not observe a dangling pointer.  It is not clear this has bought
us much safety or debuggability.  In the mean time, the process of
freeing an object did not always require the object itself to be
touched.  Removing this write removes an opportunity for a cache miss
during the final pause of a GC.

Change-Id: I85928b73356d6a9b6c51f7dafc4657ace1c94335

13 years agoGuard against uninitialized objects when counting instances.
Carl Shapiro [Thu, 3 Feb 2011 01:54:26 +0000 (17:54 -0800)]
Guard against uninitialized objects when counting instances.

Objects marked in the live object bitmap are not guaranteed to have
their class object pointer installed.  With this change the subclass
check is short circuited when an NULL class pointer is encountered.
Previously, the class pointer was blindly assumed to be valid which
could cause the instance-of check to abort the VM.

Change-Id: I2d8810f1efd7643015e3ce3cf1dd93d90d330eee

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Thu, 3 Feb 2011 00:13:09 +0000 (16:13 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoCodeReader visitor dispatch now uses OpcodeInfo.
Dan Bornstein [Wed, 2 Feb 2011 22:01:52 +0000 (14:01 -0800)]
CodeReader visitor dispatch now uses OpcodeInfo.

This gets rid of the per-opcode Instruction array and just does a
simple switch. If it turns out that the switch has poor performance,
we can push the visitor abstraction down into IndexType.

The big change to OpcodeInfo is to make every Info instance always
have a non-null IndexType, exactly so it could be reliably switch()ed
on without having to do an explicit null check.

Change-Id: Iee8289f8766ce41c5043eec7212b2133ec71e682

13 years agoMerge "Simplify string transformation." into dalvik-dev
Dan Bornstein [Wed, 2 Feb 2011 21:54:34 +0000 (13:54 -0800)]
Merge "Simplify string transformation." into dalvik-dev

13 years agoSimplify string transformation.
Dan Bornstein [Wed, 2 Feb 2011 21:43:05 +0000 (13:43 -0800)]
Simplify string transformation.

Also, check for index jumboization across the board.

Change-Id: I7a5a15f80155b7061b8bc6e15ffa315873ad1626

13 years agoMerge "Add range checking to DecodedInstruction." into dalvik-dev
Dan Bornstein [Wed, 2 Feb 2011 21:38:14 +0000 (13:38 -0800)]
Merge "Add range checking to DecodedInstruction." into dalvik-dev

13 years agoam 13a0e7b2: am 168ae921: am e7bf56c5: Use the global maximum to compute the size...
Carl Shapiro [Wed, 2 Feb 2011 21:26:59 +0000 (13:26 -0800)]
am 13a0e7b2: am 168ae921: am e7bf56c5: Use the global maximum to compute the size of a new mspace.

* commit '13a0e7b2e9b4cd0eb09a3cfa156b82e11671e116':
  Use the global maximum to compute the size of a new mspace.

13 years agoam 168ae921: am e7bf56c5: Use the global maximum to compute the size of a new mspace.
Carl Shapiro [Wed, 2 Feb 2011 21:22:53 +0000 (13:22 -0800)]
am 168ae921: am e7bf56c5: Use the global maximum to compute the size of a new mspace.

* commit '168ae921fb68f2af7fbb62619232ec27bb741bea':
  Use the global maximum to compute the size of a new mspace.

13 years agoam e7bf56c5: Use the global maximum to compute the size of a new mspace.
Carl Shapiro [Wed, 2 Feb 2011 21:18:48 +0000 (13:18 -0800)]
am e7bf56c5: Use the global maximum to compute the size of a new mspace.

* commit 'e7bf56c584b8b2c3d60f79a27a4a2e9a6b1e2f22':
  Use the global maximum to compute the size of a new mspace.

13 years agoAdd range checking to DecodedInstruction.
Dan Bornstein [Wed, 2 Feb 2011 20:48:00 +0000 (12:48 -0800)]
Add range checking to DecodedInstruction.

This fixes some cases where encoding would have silently truncated values.
There may be some other lurking cases, and the new methods in this patch
are meant to be used prophylactically as necessary.

Change-Id: I57372d679e36c53975e0d2af246bbab76fcac7c9

13 years agoMove opcode names into OpcodeInfo.
Dan Bornstein [Wed, 2 Feb 2011 19:45:53 +0000 (11:45 -0800)]
Move opcode names into OpcodeInfo.

This also allowed me to remove the Instruction argument from the
CodeReader visitor methods. Per previous discussion, this also gets
rid of the redundant argument output in FindUsages. I can clean up
CodeReader some more in a follow-up.

Change-Id: I7a65e8d74498e201fd169cddde0d1f19d6f33f81

13 years agoHook up CodeReader.
Dan Bornstein [Wed, 2 Feb 2011 01:01:27 +0000 (17:01 -0800)]
Hook up CodeReader.

This involved tweaking a lot of interfaces and a few bits of the
implementation, and it could use at least one cleanup pass, but I think
the basic structure is pretty reasonable.

Change-Id: Ic49410aca479d54ceb837ee7e04bedd2ca0bcda9

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Wed, 2 Feb 2011 15:21:36 +0000 (07:21 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoUse the global maximum to compute the size of a new mspace.
Carl Shapiro [Wed, 2 Feb 2011 04:19:04 +0000 (20:19 -0800)]
Use the global maximum to compute the size of a new mspace.

The global maximum was used for the initial specificaion but a local
maximum was used for post-Zygote mspace creations.  This prevented a
clearing of the growth limit from having the intended effect.

Bug: 3414804
Change-Id: I47e0c1510f2212849e3b738c5578bbd7b1aff27d

13 years agoClarify cursor().
Dan Bornstein [Tue, 1 Feb 2011 23:22:28 +0000 (15:22 -0800)]
Clarify cursor().

Change-Id: I417b495fe524c6feaa2ec6a4e2cd6726012c8d18