OSDN Git Service

android-x86/dalvik.git
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 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

13 years agoMerge "More progress on instruction coding." into dalvik-dev
Dan Bornstein [Tue, 1 Feb 2011 23:19:54 +0000 (15:19 -0800)]
Merge "More progress on instruction coding." into dalvik-dev

13 years agoam d9c39e0f: Update doc with actual version number.
Andy McFadden [Tue, 1 Feb 2011 22:37:58 +0000 (14:37 -0800)]
am d9c39e0f: Update doc with actual version number.

* commit 'd9c39e0f0177e9d271735766501524196fd14b08':
  Update doc with actual version number.

13 years agoUpdate doc with actual version number.
Andy McFadden [Tue, 1 Feb 2011 22:02:59 +0000 (14:02 -0800)]
Update doc with actual version number.

Honeycomb is 3.0.

Change-Id: Ic7f15a9e2345344acdc787db153f8b8c559fe15f

13 years agoMore progress on instruction coding.
Dan Bornstein [Tue, 1 Feb 2011 21:41:08 +0000 (13:41 -0800)]
More progress on instruction coding.

* Redefine the target to be an absolute, not relative, offset.
* Add a cursor to the CodeInput API.
* Recognize payload opcodes as valid.
* Add codecs for the payload instructions.

Change-Id: I77f8e5a9e2b6b72f6a1f5ecc2eb4d701edd66837

13 years agoMerge "Remove the unused monitor tracking and deadlock prediction code." into dalvik-dev
Carl Shapiro [Tue, 1 Feb 2011 21:16:28 +0000 (13:16 -0800)]
Merge "Remove the unused monitor tracking and deadlock prediction code." into dalvik-dev

13 years agoMerge "Add more direct encode() and decode() methods." into dalvik-dev
Dan Bornstein [Tue, 1 Feb 2011 20:00:37 +0000 (12:00 -0800)]
Merge "Add more direct encode() and decode() methods." into dalvik-dev

13 years agoRemove the unused monitor tracking and deadlock prediction code.
Carl Shapiro [Tue, 1 Feb 2011 19:32:44 +0000 (11:32 -0800)]
Remove the unused monitor tracking and deadlock prediction code.

This feature has been in the code base for several releases but has never
been enabled.

Change-Id: Ia770b03ebc90a3dc7851c0cd8ef301f9762f50db

13 years agoMerge "Remove the HPROF stack trace collection feature." into dalvik-dev
Carl Shapiro [Tue, 1 Feb 2011 19:20:33 +0000 (11:20 -0800)]
Merge "Remove the HPROF stack trace collection feature." into dalvik-dev

13 years agoMerge "Changed reg allocator to try mapping phi sources/result to the same reg."...
jeffhao [Tue, 1 Feb 2011 19:00:39 +0000 (11:00 -0800)]
Merge "Changed reg allocator to try mapping phi sources/result to the same reg." into dalvik-dev

13 years agoAdd more direct encode() and decode() methods.
Dan Bornstein [Tue, 1 Feb 2011 18:34:50 +0000 (10:34 -0800)]
Add more direct encode() and decode() methods.

Also, tweaked a couple messages in CodeReader to match newly-clarified
opcode names, while I was in the territory.

Change-Id: I7bad8be967a3ca9c69f0443d4387b927ccd56d16

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Tue, 1 Feb 2011 18:12:11 +0000 (10:12 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoRemove the HPROF stack trace collection feature.
Carl Shapiro [Tue, 1 Feb 2011 02:07:58 +0000 (18:07 -0800)]
Remove the HPROF stack trace collection feature.

Change-Id: I0eab9c496b07212fb2c86fe122dc422e70af891e

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Tue, 1 Feb 2011 01:24:32 +0000 (17:24 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoAdd ShortArrayCodeInput.
Dan Bornstein [Tue, 1 Feb 2011 00:55:36 +0000 (16:55 -0800)]
Add ShortArrayCodeInput.

This is analogous to ByteArrayInputStream, and is hopefully useful
as-is to be the impedence matcher between CodeReader and InstructionCodec.

I also modified CodeInput's methods to throw EOFException, implementing
ShortArrayCodeInput to throw it in the expected cases.

Change-Id: Id46366590ed5a2607bc6672d040f9d11fa8a445d
Bonus: Fixed a comment in BytecodeArray that I happened to notice.

13 years agoMerge "Move dx.dex.code.DalvOps -> dx.io.Opcodes." into dalvik-dev
Dan Bornstein [Sun, 30 Jan 2011 22:38:43 +0000 (14:38 -0800)]
Merge "Move dx.dex.code.DalvOps -> dx.io.Opcodes." into dalvik-dev

13 years agoam 01025db4: am d820da20: Reconcile gingerbread-plus-aosp and honeycomb
The Android Open Source Project [Sun, 30 Jan 2011 22:28:08 +0000 (14:28 -0800)]
am 01025db4: am d820da20: Reconcile gingerbread-plus-aosp and honeycomb

* commit '01025db4992639d453b5f70ea17efd1c189a884d':

13 years agoMove dx.dex.code.DalvOps -> dx.io.Opcodes.
Dan Bornstein [Sun, 30 Jan 2011 22:05:39 +0000 (14:05 -0800)]
Move dx.dex.code.DalvOps -> dx.io.Opcodes.

This breaks a nascent circular dependency, keeping dx.io the lower layer.

Bonus: While I was in the territory, I clarified the data payload
opcodes, including adding explicit constants for them.

Change-Id: I8655064ebc3b5713cbb4a6c83bcc90984393701f

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Sun, 30 Jan 2011 21:37:41 +0000 (13:37 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoam d820da20: Reconcile gingerbread-plus-aosp and honeycomb
The Android Open Source Project [Sun, 30 Jan 2011 20:53:55 +0000 (12:53 -0800)]
am d820da20: Reconcile gingerbread-plus-aosp and honeycomb

* commit 'd820da20e28c0468324125a8a2bf75c3c4c01c27':

13 years agoBasic facility to read/write bytecode.
Dan Bornstein [Wed, 26 Jan 2011 00:39:12 +0000 (16:39 -0800)]
Basic facility to read/write bytecode.

These classes are meant for reading and writing bytecode at the lowest
possible level, in particular without layering any interpretation of
the instructions beyond understanding the instruction formats. (For
example, constant indices remain numbers and aren't tied to objects
representing constants.)

This patch represents a work-in-progress that compiles but is as yet
not hooked up to anything else. Hooking it all up will happen in
one or more follow-on patches.

Change-Id: Ifd3b3ff0925dc9dc3d82e507dc1be83cb560031d

13 years agoReconcile gingerbread-plus-aosp and honeycomb
The Android Open Source Project [Sun, 30 Jan 2011 20:39:54 +0000 (12:39 -0800)]
Reconcile gingerbread-plus-aosp and honeycomb

Change-Id: Ic8c04a257aaf0ecf5348d176def5bedc6c640ee0

13 years agoMass merge from gingerbread - do not merge
The Android Open Source Project [Sun, 30 Jan 2011 20:39:54 +0000 (12:39 -0800)]
Mass merge from gingerbread - do not merge

Change-Id: I03cce63a718a19c27445efd2c48a7886f22f7ed1

13 years agoMerge "Make more DEX optimizations "essential"" into dalvik-dev
Andy McFadden [Sun, 30 Jan 2011 18:04:43 +0000 (10:04 -0800)]
Merge "Make more DEX optimizations "essential"" into dalvik-dev

13 years agoMerge "Added a comment to String.equals implementation" into dalvik-dev
Andy McFadden [Sun, 30 Jan 2011 18:04:30 +0000 (10:04 -0800)]
Merge "Added a comment to String.equals implementation" into dalvik-dev

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Sun, 30 Jan 2011 17:58:55 +0000 (09:58 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoam 81058aaf: (-s ours) Use bcopy() to move object refs around within an array. DO...
Dan Bornstein [Sat, 29 Jan 2011 18:51:59 +0000 (10:51 -0800)]
am 81058aaf: (-s ours) Use bcopy() to move object refs around within an array. DO NOT MERGE.

* commit '81058aaf92c188cc20273edd0275329fc304aca2':
  Use bcopy() to move object refs around within an array. DO NOT MERGE.

13 years agoam ae7faf48: (-s ours) am b46125f2: (-s ours) am 08e54499: (-s ours) am 81058aaf...
Dan Bornstein [Sat, 29 Jan 2011 17:01:59 +0000 (09:01 -0800)]
am ae7faf48: (-s ours) am b46125f2: (-s ours) am 08e54499: (-s ours) am 81058aaf: Use bcopy() to move object refs around within an array. DO NOT MERGE.

* commit 'ae7faf4823e1bd71cff40dfb420c239420b89210':
  Use bcopy() to move object refs around within an array. DO NOT MERGE.

13 years agoam b46125f2: (-s ours) am 08e54499: (-s ours) am 81058aaf: Use bcopy() to move object...
Dan Bornstein [Sat, 29 Jan 2011 16:47:06 +0000 (08:47 -0800)]
am b46125f2: (-s ours) am 08e54499: (-s ours) am 81058aaf: Use bcopy() to move object refs around within an array. DO NOT MERGE.

* commit 'b46125f27e83da6b9844a502b11ffff48c59f729':
  Use bcopy() to move object refs around within an array. DO NOT MERGE.

13 years agoam 08e54499: (-s ours) am 81058aaf: Use bcopy() to move object refs around within...
Dan Bornstein [Sat, 29 Jan 2011 16:44:07 +0000 (08:44 -0800)]
am 08e54499: (-s ours) am 81058aaf: Use bcopy() to move object refs around within an array. DO NOT MERGE.

* commit '08e5449920e616cab1895eda309c20e109e5752e':
  Use bcopy() to move object refs around within an array. DO NOT MERGE.

13 years agoChanged reg allocator to try mapping phi sources/result to the same reg.
jeffhao [Sat, 29 Jan 2011 01:38:16 +0000 (17:38 -0800)]
Changed reg allocator to try mapping phi sources/result to the same reg.

The current registor allocator is pretty greedy in how it chooses to
allocate registers. This change makes it attempt to try to map the
sources and result of a phi to the same register if one of them already
has a mapping and that mapping is compatible with the others. This saves
on some register shuffling when the original greedy method got unlucky.

Change-Id: I8afa430ce2ba8d034a9c0452a247d5943bc9cf37

13 years agoAdded a comment to String.equals implementation
Andy McFadden [Sat, 29 Jan 2011 00:32:19 +0000 (16:32 -0800)]
Added a comment to String.equals implementation

We don't currently compare hash codes.  Explain why.

Change-Id: Id2f00547dd4752d4f05f69f79775ef0beefe8f28

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Fri, 28 Jan 2011 23:49:09 +0000 (15:49 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoMake more DEX optimizations "essential"
Andy McFadden [Fri, 28 Jan 2011 01:01:54 +0000 (17:01 -0800)]
Make more DEX optimizations "essential"

This shifts two dexopt optimizations from the "non-essential" category
to "essential", which means they will be performed at class load time
for classes that did not successfully verify in dexopt.  (This has an
impact on memory and start time, but measurements have indicated that
it's negligible because dexopt usually succeeds.)

First, invoke-direct --> invoke-direct-empty.  This is part of the
work needed for bug 3342343, which needs to do a little extra work
when returning from Object.<init> in a finalizable class.

Second, invoke-* --> execute-inline.  We currently have three copies
of methods like String.length(): one in libcore, one in InlineNatives.c,
and one in the JIT's code generator.  If we guarantee inlining, we can
get rid of the copy in libcore.  We also ensure that certain libcore
tests (which are organized in a way that makes dexopt unhappy) are
using the version that will most likely be used on production.

Note there is currently no support for "jumbo" opcodes here.

Also, made the inline method lookup abort-on-failure.  Once upon a time
these were "best effort" optimizations, but now they're mandatory.  And
seriously, if you don't have String.length() and Math.min() you
shouldn't be trying to run anyway.  dvmInlineNativeCheck() is now
redundant and has been removed.

Change-Id: I4244e011839f77311fea0570195b3b0df4d84dcf

13 years agoam e8a7cddd: (-s ours) am 99d4ea09: am 3207edfa: Use bcopy() to move object refs...
Dan Bornstein [Fri, 28 Jan 2011 23:05:58 +0000 (15:05 -0800)]
am e8a7cddd: (-s ours) am 99d4ea09: am 3207edfa: Use bcopy() to move object refs around within an array.

* commit 'e8a7cddd65fb90784575a4d70f1359dabfaba79b':
  Use bcopy() to move object refs around within an array.

13 years agoMerge "[JIT} Fix bug in code cache lookup" into dalvik-dev
buzbee [Fri, 28 Jan 2011 20:06:49 +0000 (12:06 -0800)]
Merge "[JIT} Fix bug in code cache lookup" into dalvik-dev

13 years ago[JIT} Fix bug in code cache lookup
buzbee [Fri, 28 Jan 2011 18:44:30 +0000 (10:44 -0800)]
[JIT} Fix bug in code cache lookup

Fix a bug introduced in a recent change to getCodeAddr() that opened a window in which
an invalid code address could be returned.  This bug exists only in the dalvik-dev branch.

Change-Id: Ic1478cd35d3652411d3c8373ef5b97d4fe246634

13 years agomerge in honeycomb-release history after reset to honeycomb
The Android Automerger [Fri, 28 Jan 2011 15:25:06 +0000 (07:25 -0800)]
merge in honeycomb-release history after reset to honeycomb

13 years agoMerge commit '907121653af99cd560113e6aea6e70c00eb5e7b3' into honeycomb-release-to...
Brian Carlstrom [Fri, 28 Jan 2011 06:18:09 +0000 (22:18 -0800)]
Merge commit '907121653af99cd560113e6aea6e70c00eb5e7b3' into honeycomb-release-to-dalvik-dev

13 years agoam 7a52659a: am 76675cb5: am 9b6881c2: Fix accidental transposition of partial and...
Carl Shapiro [Fri, 28 Jan 2011 02:44:24 +0000 (18:44 -0800)]
am 7a52659a: am 76675cb5: am 9b6881c2: Fix accidental transposition of partial and concurrent values.

* commit '7a52659a4bf39991089c1569e496f33a87c84e74':
  Fix accidental transposition of partial and concurrent values.

13 years agoMerge "resolved conflicts for merge of f2b77f75 to dalvik-dev" into dalvik-dev
Carl Shapiro [Fri, 28 Jan 2011 02:11:39 +0000 (18:11 -0800)]
Merge "resolved conflicts for merge of f2b77f75 to dalvik-dev" into dalvik-dev

13 years agoresolved conflicts for merge of f2b77f75 to dalvik-dev
Carl Shapiro [Fri, 28 Jan 2011 02:11:11 +0000 (18:11 -0800)]
resolved conflicts for merge of f2b77f75 to dalvik-dev

Change-Id: Ic11e637710403229958729ae7bf333e1c85fc69f

13 years agoMerge "Expand the "--dev" mode to cover VM development." into dalvik-dev
Ben Cheng [Fri, 28 Jan 2011 01:31:08 +0000 (17:31 -0800)]
Merge "Expand the "--dev" mode to cover VM development." into dalvik-dev

13 years agoExpand the "--dev" mode to cover VM development.
Ben Cheng [Thu, 27 Jan 2011 19:59:19 +0000 (11:59 -0800)]
Expand the "--dev" mode to cover VM development.

When specified, print the VM invocation command line too.
Also made minor cleanup on the class path to simply the invocation command.

Change-Id: I7af0a2c1df15c0e435d2e5c0b2aa0713455db0de

13 years agoClarify the comment.
Dan Bornstein [Fri, 28 Jan 2011 00:49:30 +0000 (16:49 -0800)]
Clarify the comment.

bcopy() doesn't have a strong spec, so clarify here that it's about
the Bionic implementation.

Change-Id: Icc0e198272b43ae9ccce292ab7f2cdec36a83e49

13 years agoUse bcopy() to move object refs around within an array. DO NOT MERGE.
Dan Bornstein [Thu, 27 Jan 2011 19:38:37 +0000 (11:38 -0800)]
Use bcopy() to move object refs around within an array. DO NOT MERGE.

bcopy() guarantees that pointer-size words are stored atomically, and
so this prevents the gc from seeing a pointer in mid-change.

Change-Id: Ib13cacb386d343fe996df6ec8c1a8f7d1b8ca463

13 years agoam 81058aaf: Use bcopy() to move object refs around within an array. DO NOT MERGE.
Dan Bornstein [Thu, 27 Jan 2011 23:28:25 +0000 (15:28 -0800)]
am 81058aaf: Use bcopy() to move object refs around within an array. DO NOT MERGE.

* commit '81058aaf92c188cc20273edd0275329fc304aca2':
  Use bcopy() to move object refs around within an array. DO NOT MERGE.

13 years agoam 99d4ea09: am 3207edfa: Use bcopy() to move object refs around within an array.
Dan Bornstein [Thu, 27 Jan 2011 23:10:56 +0000 (15:10 -0800)]
am 99d4ea09: am 3207edfa: Use bcopy() to move object refs around within an array.

* commit '99d4ea09cb64768d0e1f2149f7e3af7d37172be7':
  Use bcopy() to move object refs around within an array.

13 years agoam 3207edfa: Use bcopy() to move object refs around within an array.
Dan Bornstein [Thu, 27 Jan 2011 22:59:38 +0000 (14:59 -0800)]
am 3207edfa: Use bcopy() to move object refs around within an array.

* commit '3207edfa2de55be1207ff3e10409e7b291e33ab1':
  Use bcopy() to move object refs around within an array.

13 years agoUse bcopy() to move object refs around within an array. DO NOT MERGE.
Dan Bornstein [Thu, 27 Jan 2011 19:38:37 +0000 (11:38 -0800)]
Use bcopy() to move object refs around within an array. DO NOT MERGE.

bcopy() guarantees that pointer-size words are stored atomically, and
so this prevents the gc from seeing a pointer in mid-change.

Bug: 3399673
Change-Id: Ic7d795e5d397548e9d6d8c11a585d86838cf8a44

13 years agoUse bcopy() to move object refs around within an array.
Dan Bornstein [Thu, 27 Jan 2011 19:38:37 +0000 (11:38 -0800)]
Use bcopy() to move object refs around within an array.

bcopy() guarantees that pointer-size words are stored atomically, and
so this prevents the gc from seeing a pointer in mid-change.

Change-Id: I7ba426c5b54a3459504211d88cca1b07383168bb