OSDN Git Service

android-x86/dalvik.git
13 years agoImplement method parser and SSA transformation.
Ben Cheng [Thu, 28 Oct 2010 18:13:58 +0000 (11:13 -0700)]
Implement method parser and SSA transformation.

Change-Id: If3fb3a36f33aaee8e5fdded4e9fa607be54f0bfb

13 years agoMerge "Experimental x86 Jit trace selection" into dalvik-dev
buzbee [Mon, 13 Dec 2010 23:33:46 +0000 (15:33 -0800)]
Merge "Experimental x86 Jit trace selection" into dalvik-dev

13 years agoExperimental x86 Jit trace selection
buzbee [Wed, 22 Sep 2010 23:19:28 +0000 (16:19 -0700)]
Experimental x86 Jit trace selection

Experimental support for trace selection for x86 host mode operation.
Not enabled by default.  Turned on by setting WITH_HOST_DALVIK true
and WITH_JIT true.  When enabled, profiles during x86 fast interpreter
operation, selects hot traces and "compiles" traces consisting of jumps
back to the interpreter.

First in a series of experimental x86 support checkins.

Change-Id: I0e423ec58a7bf01f226cb486f55de2841fab1002

13 years agoMerge "Adding javax.sip to the dx blacklist." into dalvik-dev
jeffhao [Mon, 13 Dec 2010 23:17:23 +0000 (15:17 -0800)]
Merge "Adding javax.sip to the dx blacklist." into dalvik-dev

13 years agoDo not commingle application and zygote references when sweeping.
Carl Shapiro [Mon, 13 Dec 2010 01:09:04 +0000 (17:09 -0800)]
Do not commingle application and zygote references when sweeping.

When garbage objects are identified references to these objects are
passed to a function which, in the case of an application heap,
releases their storage to the mspace or, in the case of a zygote heap,
counts their freed memory without touching the underlying heap.

This freeing process is performed in bulk.  To attenuate the cost of
calling and to allow for more efficient merging of adjacent unused
blocks of memory, a buffer is filled with adjacent references to free.
The freeing mechanism is chosen based on the first reference in the
buffer.  If the first reference is an application heap object all
objects in the buffer have their storage released to the underlying
mspace.  If the first object is a zygote object, only the free space
counting is performed.  Assertions check if this assumption is sound.

The previous change to the sweep did not treat the various regions of
the heap specially and therefore allowed the freeing buffer to have
its contained pointers span both heaps.  This change restores some of
the functionality which kept references from either heap separate.

Change-Id: Ibc563dcf46ff1681596664f04a2a85a4d29eb5e1

13 years agoresolved conflicts for merge of 8a69168b to dalvik-dev
Carl Shapiro [Mon, 13 Dec 2010 21:47:37 +0000 (13:47 -0800)]
resolved conflicts for merge of 8a69168b to dalvik-dev

Change-Id: I8f17c650f6528fddec6198097fb1abeb978b3c05

13 years agoAdding javax.sip to the dx blacklist.
jeffhao [Mon, 13 Dec 2010 18:51:15 +0000 (10:51 -0800)]
Adding javax.sip to the dx blacklist.

Change-Id: I5be068821862ccf073cb758e60b686f46a3c97c1

13 years agoFix a bug in hprof that corrupted the root set output.
Carl Shapiro [Mon, 13 Dec 2010 20:13:47 +0000 (12:13 -0800)]
Fix a bug in hprof that corrupted the root set output.

The root visitor takes an Object ** but the hprof output assumed an
Object *.  As such, bad root set object ids were written to the hprof
dump and, by extension, objects reachable only from the roots either
looked like floating garbage or were wholly omitted from the output.

Change-Id: I58b31b6ad145fa9843ecbda630ed8b6ab951d931

13 years agoFix a comment that misrepresents the root marking algorithm.
Carl Shapiro [Mon, 13 Dec 2010 00:00:59 +0000 (16:00 -0800)]
Fix a comment that misrepresents the root marking algorithm.

During the initial root marking nothing is pushed on the mark stack.
Marked roots are pushed during the scanning phase following root
marking.  Unfortunately, the comment above the root marking callback
incorrectly claimed that it pushed objects on the mark stack.

In addition, this change renames the marking callback for the re-mark
phase to more accurately reflect its limited usage.

Change-Id: I38161fa723e00e14bd8d047a2e25cdbfd215a2c6

13 years agoNew jumbo verification error opcode.
Dan Bornstein [Sat, 11 Dec 2010 01:03:06 +0000 (17:03 -0800)]
New jumbo verification error opcode.

I'll regenerate the vm code for this in a follow-up change.

Change-Id: I59a0a91d39fd539f1b3a25f1f2889618fa484b96

13 years agoNew instruction format for verification errors.
Dan Bornstein [Sat, 11 Dec 2010 00:57:38 +0000 (16:57 -0800)]
New instruction format for verification errors.

Change-Id: I99e6828487dcc7f6277bb710e4279ce0aa8c7563

13 years agoMinor tweaks.
Andy McFadden [Fri, 10 Dec 2010 23:23:47 +0000 (15:23 -0800)]
Minor tweaks.

Clean up replaceFailingInstruction() a little.  In particular, use
the appropriate method for extracting the opcode, and assert that
the instruction we're replacing was marked "can throw" (if it wasn't,
the list of predecessors in the catch handler will be wrong).  Also
remove a declaration that became redundant when we started replacing
instructions in place (as opposed to making a copy of the method body).

Strip out a bit of stale #if 0 code.

Change-Id: Iccf80647237672e2da4b1b46ca9627ae3344704d

13 years agoSplit BitVector into its own file.
Andy McFadden [Fri, 10 Dec 2010 19:08:22 +0000 (11:08 -0800)]
Split BitVector into its own file.

This just pulls the BitVector stuff out into separate files.

IIRC the motivation for building Misc.c for ARM rather than Thumb was
the bit-manipulation going on in BitVector (e.g. the use of ffs()),
so I switched that around in the makefile.

The only change of any substance was relocation of the kBitVectorGrowth
define from the .h to the .c.

Change-Id: Ib35fda81809081bd629b4f344e41f21966e1441c

13 years agoProgress on liveness analysis.
Andy McFadden [Thu, 2 Dec 2010 00:18:19 +0000 (16:18 -0800)]
Progress on liveness analysis.

Compute basic blocks and their predecessors, necessary for backward flow
analysis.  This is a work in progress and isn't yet enabled.

(When enabled, verification takes 20% longer, so there's some room for
improvement on performance.)

Also, this changes the "generate register maps" setting to be enabled
by default, and allows a "no" prefix on -Xgenregmap to disable it.

Bug 2534655

Change-Id: Id2e8512f53fc454ce2184879ab663ed7121274b6

13 years agoKill dvmHeapSourceGetObjectBitmaps and aliasBitmaps.
Carl Shapiro [Thu, 9 Dec 2010 23:24:11 +0000 (15:24 -0800)]
Kill dvmHeapSourceGetObjectBitmaps and aliasBitmaps.

In the beginning separate mark bitmaps and live bitmaps were kept for
each of the three heaps.  Later, all heaps were allocated adjacent to
one another from a single contiguous tract of virtual memory.  As
such, summary data structures such as the card table, mark bitmap, and
live bitmap, were similarly allocated from individual blocks of memory
instead of sparsely for each heap.

While the summary structures were changed, the sweeping routine was
left to assume separate bitmaps.  In fact, the aliasBitmap hack was
added to continue the fiction of small bitmaps for each of the heaps.
It would have been preferable to change the sweeping routine, but that
routine was greatly entangled with generalities.  Fortunately, those
entanglements have since been eliminated.

This change updates the sweeping routine to operate on memory address
ranges instead of whole bitmaps, obsoleting aliasBitmaps and its sole
caller.  The bitmap sweep routine now receives a range of addresses
for sweeping.  This range may span the entire bitmap or any contiguous
range within the span of the bitmap.

Change-Id: Iae206032738d6cad77e0625d27ae7b7d6551890d

13 years agoCompare the buffer pointers to avoid signedness mismatches.
Carl Shapiro [Thu, 9 Dec 2010 01:17:45 +0000 (17:17 -0800)]
Compare the buffer pointers to avoid signedness mismatches.

Previously, this code tried to traffick in buffer sizes.  It seems
that the results of the pointer arithmetic resulted in a signed value
while the buffer size constant was interpreted as an unsigned.

Change-Id: I1816fee9eae36f225d0480642ecc91ea7a2d0ad1

13 years agoMerge "Compute the pointer buffer size from familiar constants." into dalvik-dev
Carl Shapiro [Thu, 9 Dec 2010 00:49:17 +0000 (16:49 -0800)]
Merge "Compute the pointer buffer size from familiar constants." into dalvik-dev

13 years agoam 06d02069: Various improvements to dexdeps.
Dan Bornstein [Thu, 9 Dec 2010 00:16:19 +0000 (16:16 -0800)]
am 06d02069: Various improvements to dexdeps.

* commit '06d020698f7182ae17b933fa688ab9302a8674e2':
  Various improvements to dexdeps.

13 years agoCompute the pointer buffer size from familiar constants.
Carl Shapiro [Wed, 8 Dec 2010 23:40:24 +0000 (15:40 -0800)]
Compute the pointer buffer size from familiar constants.

Change-Id: Ibe4260c508417b015537fbee4f0dc78329450cbf

13 years agoVarious improvements to dexdeps.
Dan Bornstein [Wed, 8 Dec 2010 22:47:11 +0000 (14:47 -0800)]
Various improvements to dexdeps.

This includes:
* Adding an option to only produce lists of dependent classes (and not
  also fields and methods).
* Adding the ability to process multiple files on a single invocation.
* Adding a label at the head of the section for each file.
* Neatening up Output a bit by factoring "System.out" into a static field.

Change-Id: Id9a691d23afd18f82ab3790cb760cfd12e14bc86

13 years agoam 07946cfd: Throw useful detail messages when Method.invoke fails.
Elliott Hughes [Wed, 8 Dec 2010 00:39:16 +0000 (16:39 -0800)]
am 07946cfd: Throw useful detail messages when Method.invoke fails.

* commit '07946cfdee82ba5ef235be61d067f56aa56e3b02':
  Throw useful detail messages when Method.invoke fails.

13 years agoThrow useful detail messages when Method.invoke fails.
Elliott Hughes [Sat, 4 Dec 2010 01:59:32 +0000 (17:59 -0800)]
Throw useful detail messages when Method.invoke fails.

Part of my general push for better exceptions.

(Cherry-pick from dalvik-dev of https://android-git.corp.google.com/g/83287.)

Change-Id: I0cd47b492fbdc52db2eef8e2a02f31bda2a086eb

13 years agoThrow useful detail messages when Method.invoke fails.
Elliott Hughes [Sat, 4 Dec 2010 01:59:32 +0000 (17:59 -0800)]
Throw useful detail messages when Method.invoke fails.

Part of my general push for better exceptions.

Change-Id: I9677c946744caa4c1c9e8b834edcd38e656a888b

13 years agoFix implicit conversions, rename reserved works, enable -Wc++-compat.
Carl Shapiro [Tue, 7 Dec 2010 19:43:38 +0000 (11:43 -0800)]
Fix implicit conversions, rename reserved works, enable -Wc++-compat.

Change-Id: I06292964a6882ea2d0c17c5c962db95e46b01543

13 years agoMerge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master
Brian Carlstrom [Mon, 6 Dec 2010 22:23:09 +0000 (14:23 -0800)]
Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master

13 years agoam 91b93ea4: Fix monitor verification.
Andy McFadden [Sun, 5 Dec 2010 07:42:21 +0000 (23:42 -0800)]
am 91b93ea4: Fix monitor verification.

* commit '91b93ea496e8c86f410f302a94c2adf0fc9d8189':
  Fix monitor verification.

13 years agoMinor simplification.
Dan Bornstein [Sat, 4 Dec 2010 01:58:01 +0000 (17:58 -0800)]
Minor simplification.

Change-Id: Ie17ba83ead45028a8b7b32c1cc5763f9dd6d684c

13 years agoMerge "Fix stupid copy-paste error." into dalvik-dev
Dan Bornstein [Sat, 4 Dec 2010 01:49:46 +0000 (17:49 -0800)]
Merge "Fix stupid copy-paste error." into dalvik-dev

13 years agoFix stupid copy-paste error.
Dan Bornstein [Sat, 4 Dec 2010 01:48:27 +0000 (17:48 -0800)]
Fix stupid copy-paste error.

Change-Id: I1ad1e8c26ec47b9b148fc6a4292afa2ee25e58e2

13 years agoMerge "These asserts are no longer pointless." into dalvik-dev
Dan Bornstein [Sat, 4 Dec 2010 01:32:04 +0000 (17:32 -0800)]
Merge "These asserts are no longer pointless." into dalvik-dev

13 years agoThese asserts are no longer pointless.
Dan Bornstein [Sat, 4 Dec 2010 01:24:34 +0000 (17:24 -0800)]
These asserts are no longer pointless.

Change-Id: I32cfd2334de344156a41d1c2d7c10a8d96e970c4

13 years agoMake the inlined String.charAt throw detailed exceptions.
Elliott Hughes [Sat, 4 Dec 2010 00:37:54 +0000 (16:37 -0800)]
Make the inlined String.charAt throw detailed exceptions.

Part of my general push for better exceptions. I'll add a unit test to libcore,
but until we lose the dexopt brain damage, we won't be able to see it (dexopt
can't optimize JUnit tests, so we get no coverage of inline natives on our
continuous builds; http://b/3003994).

Change-Id: I3af757751534747fa4b3cc725b0914a8f7b3d45d

13 years agoMerge "Another clarifying rename and a bit more automation." into dalvik-dev
Dan Bornstein [Sat, 4 Dec 2010 00:07:33 +0000 (16:07 -0800)]
Merge "Another clarifying rename and a bit more automation." into dalvik-dev

13 years agoAnother clarifying rename and a bit more automation.
Dan Bornstein [Fri, 3 Dec 2010 23:32:40 +0000 (15:32 -0800)]
Another clarifying rename and a bit more automation.

kNumDalvikInstructions is now kNumPackedOpcodes, there is a new
kMaxOpcodeValue, and both are generated by opcode-gen.

Change-Id: Ic46f1f52d2d21382452c8e777024f4a985ad31d3
Bonus: Reworded the switch and array data comment for clarity.

13 years agoMerge "Use dvmHumanReadableDescriptor in -Xjnitrace." into dalvik-dev
Elliott Hughes [Fri, 3 Dec 2010 23:40:14 +0000 (15:40 -0800)]
Merge "Use dvmHumanReadableDescriptor in -Xjnitrace." into dalvik-dev

13 years agoRegular-expression compatibility.
Dan Bornstein [Fri, 3 Dec 2010 23:11:55 +0000 (15:11 -0800)]
Regular-expression compatibility.

The most compatible way of indicating that a dash is part of a
character range is to put a single dash at the end of the range
expression.

Change-Id: I1e118038dfacffbc004c97be0ae1c3dfe97e861d

13 years agoSmall fixes.
Dan Bornstein [Fri, 3 Dec 2010 21:16:08 +0000 (13:16 -0800)]
Small fixes.

I had unpackOpcode() slightly wrong, and I made the libcore opcode
numbers always be four hex digits.

Change-Id: I4f988b8794b4b6c48ef91698a8e567fa46b96dac

13 years agoClean up the opcode-gen script.
Dan Bornstein [Fri, 3 Dec 2010 21:01:06 +0000 (13:01 -0800)]
Clean up the opcode-gen script.

There was way too much string duplication, and it needed at least
a bit more commenting.

Change-Id: Id31ee1fd260db6f4afe301764c60de7c63b3f729

13 years agoUse dvmHumanReadableDescriptor in -Xjnitrace.
Elliott Hughes [Fri, 3 Dec 2010 18:57:15 +0000 (10:57 -0800)]
Use dvmHumanReadableDescriptor in -Xjnitrace.

This made the output more readable while debugging a zlib issue.

Bug: 3220923
Change-Id: Ie360516a8a7a92b5b75fe70feb5c9722289bed78

13 years agoMerge "Eliminate the GC.h header file." into dalvik-dev
Carl Shapiro [Fri, 3 Dec 2010 01:37:48 +0000 (17:37 -0800)]
Merge "Eliminate the GC.h header file." into dalvik-dev

13 years agoEliminate the GC.h header file.
Carl Shapiro [Fri, 3 Dec 2010 01:27:01 +0000 (17:27 -0800)]
Eliminate the GC.h header file.

Change-Id: Ieda8b819032fc6aac80b390960d9c6f4864795ab

13 years agoMerge "Add a note." into dalvik-dev
Dan Bornstein [Fri, 3 Dec 2010 01:09:33 +0000 (17:09 -0800)]
Merge "Add a note." into dalvik-dev

13 years agoAdd a note.
Dan Bornstein [Fri, 3 Dec 2010 01:08:56 +0000 (17:08 -0800)]
Add a note.

Change-Id: I55362cbc8bfbb22ebcd493db7cdeb34fc3394e3a

13 years agoMerge "Get rid of the ugly macros inside the bitmap sweep routine." into dalvik-dev
Carl Shapiro [Fri, 3 Dec 2010 01:07:52 +0000 (17:07 -0800)]
Merge "Get rid of the ugly macros inside the bitmap sweep routine." into dalvik-dev

13 years agoMerge "Make opcode 00ff be called "dispatch-ff"." into dalvik-dev
Dan Bornstein [Fri, 3 Dec 2010 01:07:38 +0000 (17:07 -0800)]
Merge "Make opcode 00ff be called "dispatch-ff"." into dalvik-dev

13 years agoMerge "Inching closer to having extended opcodes in the vm." into dalvik-dev
Dan Bornstein [Fri, 3 Dec 2010 01:07:04 +0000 (17:07 -0800)]
Merge "Inching closer to having extended opcodes in the vm." into dalvik-dev

13 years agoGet rid of the ugly macros inside the bitmap sweep routine.
Carl Shapiro [Fri, 3 Dec 2010 00:41:28 +0000 (16:41 -0800)]
Get rid of the ugly macros inside the bitmap sweep routine.

Thanks to recent simplifications the implementation macrology can be
expanded out.  While we are here, fix the comments about the treatment
of max.  This edit should have happened in the previous change to the
sweeper.

Change-Id: Ia18ee580f5955dca8c27b96f7badbfb067a0a1cb

13 years agoMerge "Drive all root scanning by the root visitor." into dalvik-dev
Carl Shapiro [Fri, 3 Dec 2010 00:59:54 +0000 (16:59 -0800)]
Merge "Drive all root scanning by the root visitor." into dalvik-dev

13 years agoMake opcode 00ff be called "dispatch-ff".
Dan Bornstein [Fri, 3 Dec 2010 00:46:25 +0000 (16:46 -0800)]
Make opcode 00ff be called "dispatch-ff".

With this change, it's still implemented as an unused opcode, but
it's now ready for its new life!

Change-Id: Ic70d311704925067e47d87b657d133a792144e65

13 years agoFix monitor verification.
Andy McFadden [Thu, 2 Dec 2010 21:13:22 +0000 (13:13 -0800)]
Fix monitor verification.

An earlier change inadvertently disabled the basic register type check
when the fancier checks were disabled.  This restores the type check,
and replaces a "TODO: add an assert" with an actual assert.

Bug 3246598.

(cherry-pick from dalvik-dev)

Change-Id: Iddfb33d2a3f0c03f5a06c3f6e4a47644ca640736

13 years agoMerge "Replace dalvik test local mode with new host mode" into dalvik-dev
buzbee [Fri, 3 Dec 2010 00:24:14 +0000 (16:24 -0800)]
Merge "Replace dalvik test local mode with new host mode" into dalvik-dev

13 years agoInching closer to having extended opcodes in the vm.
Dan Bornstein [Fri, 3 Dec 2010 00:05:51 +0000 (16:05 -0800)]
Inching closer to having extended opcodes in the vm.

Change-Id: If6578a0686ac8fe5e6d1a26509d8a5c748bed179

13 years agoDrive all root scanning by the root visitor.
Carl Shapiro [Fri, 3 Dec 2010 00:16:01 +0000 (16:16 -0800)]
Drive all root scanning by the root visitor.

The root visitor has been used by the concurrent collector during the
re-mark phase.  This change makes both the initial mark use the same
visitor routine and obsoletes all of the one-off markers scattered
throughout the runtime sources.

Change-Id: I08ea86d875f235cc628754240ad30ea5dfe2ce70

13 years agoReplace dalvik test local mode with new host mode
buzbee [Thu, 2 Dec 2010 23:37:06 +0000 (15:37 -0800)]
Replace dalvik test local mode with new host mode

To run the dalvik tests with host mode:
1.  build with WITH_HOST_DALVIK=true
2.  run-all-tests --host, or run-test <num> --host

Change-Id: Ic20df0b0720571b5a4ae11b5a1f6ce760d921d4b

13 years agoGive the awk script its own file.
Dan Bornstein [Thu, 2 Dec 2010 23:21:59 +0000 (15:21 -0800)]
Give the awk script its own file.

The embedded awk script totally dwarfed the shell script driver. It
was getting pretty ridiculous. (Ok ok, maybe the fact that this uses
awk in the first place is itself ridiculous.)

Change-Id: Ia53dbbff636eab7aeb44ff24013c62494ef86da0

13 years agoMerge "Extremely minor cleanup." into dalvik-dev
Dan Bornstein [Thu, 2 Dec 2010 23:15:54 +0000 (15:15 -0800)]
Merge "Extremely minor cleanup." into dalvik-dev

13 years agoExtremely minor cleanup.
Dan Bornstein [Thu, 2 Dec 2010 23:15:21 +0000 (15:15 -0800)]
Extremely minor cleanup.

Change-Id: Ia302597d27773aa72f675509e9b4f844db65cc85

13 years agoMerge "x86-mterp bug fix; support host mode in tests" into dalvik-dev
buzbee [Thu, 2 Dec 2010 23:14:51 +0000 (15:14 -0800)]
Merge "x86-mterp bug fix; support host mode in tests" into dalvik-dev

13 years agoRename some instruction/opcode types and utilities.
Dan Bornstein [Thu, 2 Dec 2010 20:45:00 +0000 (12:45 -0800)]
Rename some instruction/opcode types and utilities.

A lot of this is more about properties of opcodes as opposed to
inspecting instructions per se, and the new naming attempts to
make it clear what is being queried and what sort of data is being
returned.

Change-Id: Ice6f9f2ebf4f1cfa8c99597419aa13d1134a33b2

13 years agoMerge "Fix monitor verification." into dalvik-dev
Andy McFadden [Thu, 2 Dec 2010 22:49:30 +0000 (14:49 -0800)]
Merge "Fix monitor verification." into dalvik-dev

13 years agox86-mterp bug fix; support host mode in tests
buzbee [Thu, 2 Dec 2010 22:29:16 +0000 (14:29 -0800)]
x86-mterp bug fix; support host mode in tests

A recent x86 housecleaning change introduced a bug in OP_FILLED_ARRAY.
Fixed that, plus hacked up dalvik test scripts to support host
mode operation (with --host)

Change-Id: Iaf8b1ab753f93fa344e64f984a3c4696433ec9aa

13 years agoGet rid of QUIET_ZYGOTE_GC and make it the default.
Carl Shapiro [Thu, 2 Dec 2010 22:04:22 +0000 (14:04 -0800)]
Get rid of QUIET_ZYGOTE_GC and make it the default.

Change-Id: Ib9af028cfa46ca6041d716085ed3a78ef591bbc8

13 years agoMove a stray forward declaration of HeapSource to where it's needed.
Carl Shapiro [Thu, 2 Dec 2010 21:36:58 +0000 (13:36 -0800)]
Move a stray forward declaration of HeapSource to where it's needed.

Change-Id: I10dcc065c90ce40685b20a362470a32e213bf28f

13 years agoFix monitor verification.
Andy McFadden [Thu, 2 Dec 2010 21:13:22 +0000 (13:13 -0800)]
Fix monitor verification.

An earlier change inadvertently disabled the basic register type check
when the fancier checks were disabled.  This restores the type check,
and replaces a "TODO: add an assert" with an actual assert.

Bug 3246598.

Change-Id: I842c392e1e3aa8525235d873726c840f39703ff3

13 years agoMerge "Make the enums typedeffed as such." into dalvik-dev
Dan Bornstein [Thu, 2 Dec 2010 20:31:20 +0000 (12:31 -0800)]
Merge "Make the enums typedeffed as such." into dalvik-dev

13 years agoMake the enums typedeffed as such.
Dan Bornstein [Thu, 2 Dec 2010 18:35:48 +0000 (10:35 -0800)]
Make the enums typedeffed as such.

This makes these definitions C++-friendly. I also tried to clean up
and generally improve the documentation in this area. (Maybe you can
guess what's coming next.)

Change-Id: I76ab3087dcde5cc255288a993ec7b2963f2b733b

13 years agoam f0badd23: Merge "Fix dvmHumanReadableDescriptor("B")."
Elliott Hughes [Thu, 2 Dec 2010 18:32:19 +0000 (10:32 -0800)]
am f0badd23: Merge "Fix dvmHumanReadableDescriptor("B")."

* commit 'f0badd239ba1d4a65adebcf2df100ec7e1e54786':
  Fix dvmHumanReadableDescriptor("B").

13 years agoMerge "Fix dvmHumanReadableDescriptor("B")."
Elliott Hughes [Thu, 2 Dec 2010 18:26:57 +0000 (10:26 -0800)]
Merge "Fix dvmHumanReadableDescriptor("B")."

13 years agoFix dvmHumanReadableDescriptor("B").
Elliott Hughes [Thu, 2 Dec 2010 00:59:21 +0000 (16:59 -0800)]
Fix dvmHumanReadableDescriptor("B").

dvmHumanReadableDescriptor was failing for primitive scalars in
libdvm_assert.so --- there was an assertion that wasn't true,
because we wouldn't have copied the ';' into the result (in the
other cases, we'd copy the ';' and then overwrite it).

This patch rewrites dvmHumanReadableDescriptor to be a little
less tasteless, removes the asserts, behave better when out of
memory, and to include unit tests (currently only runnable on
the device).

Bug: 3245572
Change-Id: I57b06c774a5bc61c2d374cce6285553c3c5f388b

13 years agoFix the typing of the assert macro as required by C++.
Carl Shapiro [Thu, 2 Dec 2010 03:51:36 +0000 (19:51 -0800)]
Fix the typing of the assert macro as required by C++.

Change-Id: Iff70db8bf4f1ae8d1c4abbe565fa7993b0fe0df9

13 years agoMove reference processing next to its implementation.
Carl Shapiro [Thu, 2 Dec 2010 03:32:05 +0000 (19:32 -0800)]
Move reference processing next to its implementation.

With this change, all of the reference processing now happens in the
same module.  As such, we can make all of the implementation routines
static.

Change-Id: If3f1ff2e48f49b57b75cfc9d0af61ad892435c47

13 years agoMerge "Return the value at the top of the mark stack straight away." into dalvik-dev
Carl Shapiro [Thu, 2 Dec 2010 03:33:11 +0000 (19:33 -0800)]
Merge "Return the value at the top of the mark stack straight away." into dalvik-dev

13 years agoReturn the value at the top of the mark stack straight away.
Carl Shapiro [Thu, 2 Dec 2010 02:54:19 +0000 (18:54 -0800)]
Return the value at the top of the mark stack straight away.

Change-Id: I9ce87b1e72bb3e8a0b876ab9ba05569260cd93e8

13 years agoIt's "opcode" not "opCode".
Dan Bornstein [Thu, 2 Dec 2010 01:02:26 +0000 (17:02 -0800)]
It's "opcode" not "opCode".

Similarly "Opcode" not "OpCode".

This appears to be the general worldwide consensus on the matter. Other
residents of my office didn't seem to mind one way or the other how it's
spelled in our code, but for whatever reason, it really bugged me.

Change-Id: Ia0b73d19c54aefc0f543a9c9451dda22ee876a59

13 years agoRename OpCodeNames.c -> DexOpcodes.c.
Dan Bornstein [Thu, 2 Dec 2010 00:34:22 +0000 (16:34 -0800)]
Rename OpCodeNames.c -> DexOpcodes.c.

Change-Id: I9e22543740129f4a8fd50ff246a165d6358ed9b5

13 years agoClarify the spec slightly.
Dan Bornstein [Thu, 2 Dec 2010 00:28:49 +0000 (16:28 -0800)]
Clarify the spec slightly.

And, importantly, fix a lingering naming issue.

Change-Id: I2b0d2008aae32679430910dfe5fa58a86f0a59df

13 years agoMerge "Minor tweaks." into dalvik-dev
Andy McFadden [Thu, 2 Dec 2010 00:17:24 +0000 (16:17 -0800)]
Merge "Minor tweaks." into dalvik-dev

13 years agoMerge "Rename OpCode.h -> DexOpcodes.h." into dalvik-dev
Dan Bornstein [Thu, 2 Dec 2010 00:17:12 +0000 (16:17 -0800)]
Merge "Rename OpCode.h -> DexOpcodes.h." into dalvik-dev

13 years agoRename OpCode.h -> DexOpcodes.h.
Dan Bornstein [Wed, 1 Dec 2010 22:23:44 +0000 (14:23 -0800)]
Rename OpCode.h -> DexOpcodes.h.

Also incorporate the former contents of OpCodeNames.h. This is a small
attempt to increase naming consistency in libdex. There will be a bit
more to come, in a follow-up.

Change-Id: Ia7ab06042dde2e19eda02ef1fee72fb4260e899d

13 years agoMinor tweaks.
Andy McFadden [Mon, 29 Nov 2010 15:38:01 +0000 (07:38 -0800)]
Minor tweaks.

Use dexOpCodeFromCodeUnit instead of (*insns & 0xff).  (Not strictly
necessary in its current incarnation, but the code will soon be checking
opcode flags.)

Mark some local functions "static".

Make instruction widths >= 65536 a warning rather than an error.  I
don't think you can get there with converted Java bytecode because of
the method size limit, but it's possible in directly-generated DEX.

Change-Id: Ic9714b855c606f8b5c618793b271436e1c2cdc44

13 years agoam 33dab964: Improve "No new threads in -Xzygote mode" message to include thread...
Brian Carlstrom [Wed, 1 Dec 2010 22:04:47 +0000 (14:04 -0800)]
am 33dab964: Improve "No new threads in -Xzygote mode" message to include thread name.

* commit '33dab964ac38c05472b734a2d36f6a2aacf9b731':
  Improve "No new threads in -Xzygote mode" message to include thread name.

13 years agoImprove "No new threads in -Xzygote mode" message to include thread name.
Brian Carlstrom [Wed, 1 Dec 2010 21:46:50 +0000 (13:46 -0800)]
Improve "No new threads in -Xzygote mode" message to include thread name.

Change-Id: I5335d86dc1e4cd3f7fd4270ff1f10cdc70f87e92

13 years agoAdd more "extended opcode" structure to libdex.
Dan Bornstein [Wed, 1 Dec 2010 20:30:21 +0000 (12:30 -0800)]
Add more "extended opcode" structure to libdex.

Although we don't yet generate any of the extended opcodes, this
change makes it a bit easier to add them.

In particular, we now differentiate between the raw opcode in a code
unit and an associated "packed opcode number." The packed opcode space
is densely populated in the range 0x000-0x1ff (though there will still
be a few unused slots), whereas the raw opcode values are sparse
throughout the range 0x0000-0xffff.

The OpCode enum is redefined/clarified to have packed, not sparse,
opcode values.

Change-Id: Ie3208a258648fbf044d344646f66c49ad24c31b2

13 years agoam 94a6213f: am b83b4c88: am ebcd8646: Fix for Issue 3161543 - Remove stray line...
buzbee [Wed, 1 Dec 2010 11:43:41 +0000 (03:43 -0800)]
am 94a6213f: am b83b4c88: am ebcd8646: Fix for Issue 3161543 - Remove stray line of code in JIT

* commit '94a6213f5693c3cd994f9734c6a085003692a5ba':
  Fix for Issue 3161543 - Remove stray line of code in JIT

13 years agoam b83b4c88: am ebcd8646: Fix for Issue 3161543 - Remove stray line of code in JIT
buzbee [Wed, 1 Dec 2010 11:36:44 +0000 (03:36 -0800)]
am b83b4c88: am ebcd8646: Fix for Issue 3161543 - Remove stray line of code in JIT

* commit 'b83b4c8876262cac96cf65c4cc27f83174b5bd00':
  Fix for Issue 3161543 - Remove stray line of code in JIT

13 years agoam a1d0e5ed: Merge remote branch \'goog/dalvik-dev\' into dalvik-dev-to-master
Brian Carlstrom [Wed, 1 Dec 2010 06:29:11 +0000 (22:29 -0800)]
am a1d0e5ed: Merge remote branch \'goog/dalvik-dev\' into dalvik-dev-to-master

* commit 'a1d0e5ed9c6879d29382d0bdb287c9a9a2234127':

13 years agoAdd a link to the dex-format doc.
Dan Bornstein [Wed, 1 Dec 2010 06:14:50 +0000 (22:14 -0800)]
Add a link to the dex-format doc.

For ease of clicking around when browsing and easier discoverability
in general.

Change-Id: Ia50507df454dd65526e99ef14194c310bb11edb1

13 years agoMerge "Remove excess generality from the bitmap sweep walking routine." into dalvik-dev
Carl Shapiro [Wed, 1 Dec 2010 05:19:01 +0000 (21:19 -0800)]
Merge "Remove excess generality from the bitmap sweep walking routine." into dalvik-dev

13 years agoRemove excess generality from the bitmap sweep walking routine.
Carl Shapiro [Wed, 1 Dec 2010 04:55:32 +0000 (20:55 -0800)]
Remove excess generality from the bitmap sweep walking routine.

The bitmaps that are passed to the sweep walking routine always have
the same base, bitsLen, and max values.  As such, there is no need to
account for situations where these values may be different.  This is
guarnateed because bitmaps being swept are actually private copies of
the global bitmaps which are initialized with common parameters.

Furthermore, the sweep callback does not change the max values, so we
do not need a clean-up loop to accomodate changes to max.  The sweep
routine operates on garbage objects and therefore has no need to set
bits in a bitmap and, by extension, update the max value.

Also eliminated was an obsolete TODO regarding the unrolling of a
loop.  We will leave that class of optimization to the compiler.

Change-Id: Iff6ede3d0ac68f88d381a06911fb6bd9cada926d

13 years agoMerge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master
Brian Carlstrom [Wed, 1 Dec 2010 01:25:51 +0000 (17:25 -0800)]
Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master

13 years agoBring 00x and 20bc into the fold.
Dan Bornstein [Wed, 1 Dec 2010 00:46:20 +0000 (16:46 -0800)]
Bring 00x and 20bc into the fold.

Change-Id: I12fde7eb665c9f3b75684018457f9464b0990156

13 years agoExplain a bit.
Dan Bornstein [Wed, 1 Dec 2010 00:29:42 +0000 (16:29 -0800)]
Explain a bit.

Change-Id: I845f34924249b6c5f34ad9ef7b9ebd3bc44f1aac

13 years agoinvoke-direct-empty doesn't actually invoke anything.
Dan Bornstein [Tue, 30 Nov 2010 22:58:53 +0000 (14:58 -0800)]
invoke-direct-empty doesn't actually invoke anything.

Update bytecode.txt as well as a couple bits in the JIT in recognition
of this fact.

Change-Id: I989556d39b40a879021eaf841404e015076073be

13 years agoMerge "Punch opcode info access from libcore to the vm." into dalvik-dev
Dan Bornstein [Tue, 30 Nov 2010 22:31:07 +0000 (14:31 -0800)]
Merge "Punch opcode info access from libcore to the vm." into dalvik-dev

13 years agoMerge "Fix DexFile cookie check." into dalvik-dev
Andy McFadden [Tue, 30 Nov 2010 21:55:44 +0000 (13:55 -0800)]
Merge "Fix DexFile cookie check." into dalvik-dev

13 years agoPunch opcode info access from libcore to the vm.
Dan Bornstein [Tue, 30 Nov 2010 20:21:28 +0000 (12:21 -0800)]
Punch opcode info access from libcore to the vm.

I looked at doing this as a native file in libcore, but that seemed to
pull in too many dependencies.

Change-Id: I1753b9b78bc593b9467a877a5fea0ba5d5161cfe

13 years agoFix DexFile cookie check.
Andy McFadden [Tue, 30 Nov 2010 19:29:51 +0000 (11:29 -0800)]
Fix DexFile cookie check.

We use a "cookie" rather than just accepting a raw pointer so that the
VM doesn't crash if something weird gets passed in.  Unfortunately the
cookie verify function was dereferencing the cookie to compute a value
for the hash table lookup, defeating the purpose.  Since we don't deal
with opening the same DEX file in a constructive way, we can just take
the low part of the pointer itself and use that as the hash.  (Hashing
isn't really necessary given the number of DEX files we expect to have
open; mostly it's just a convenient synchronized data structure.)

Bug 3238298

Change-Id: I1a545d4154b58159acdc21809b55b098c1419644

13 years agoam ebcd8646: Fix for Issue 3161543 - Remove stray line of code in JIT
buzbee [Tue, 30 Nov 2010 19:48:56 +0000 (11:48 -0800)]
am ebcd8646: Fix for Issue 3161543 - Remove stray line of code in JIT

* commit 'ebcd86461f9d61a1a5f25a8f6dde5a9ded5ba275':
  Fix for Issue 3161543 - Remove stray line of code in JIT

13 years agoFix for Issue 3161543 - Remove stray line of code in JIT
buzbee [Wed, 3 Nov 2010 17:44:15 +0000 (10:44 -0700)]
Fix for Issue 3161543 - Remove stray line of code in JIT

During Change 22370 "Thumb/Thumb2 instruction selection rework"
line 1689 of Codegen.c was inadvertently duplicated and deposited
in the unrelated function genPuntToInterp() at line 1732.

genPuntToInterp() is rarely used and half of the time (if the
roll-back Dalvik PC was word-aligned) the error would have been
benign.  However, if the Dalvik PC is not word-aligned, the result
would be a seg fault.

The fix is to remove the line of code.

Change-Id: Ib2ffb80059a639923c342a36797eb6c4995c5218

13 years agoClean up the opcode maintenance instructions.
Dan Bornstein [Tue, 30 Nov 2010 18:45:02 +0000 (10:45 -0800)]
Clean up the opcode maintenance instructions.

Change-Id: Ic9d7fcfd234116099ef510e4339a9af0bc3fcb1d