OSDN Git Service

android-x86/dalvik.git
13 years agoFix class loader interning following a String.intern.
Carl Shapiro [Wed, 20 Oct 2010 00:27:13 +0000 (17:27 -0700)]
Fix class loader interning following a String.intern.

Strings can be intered by the class loader, in the case of string
literals, or by the user, through String.intern.  Literal strings
exist for the life of their referencing classes.  User strings are
weak and may be garbage collected when unreferenced.  These two
classes of strings are kept in seprate tables for the conveniance of
the garbage collector during root traversal.

When a class loader interns a string that was already interned by the
user the runtime must move the string from the intern table to the
literal table to increase the reference strength.  Previously, this
was implemented by inserting the incoming string into the literal
table and removing any matching strings in the intern table.  This
transition lost pointer equality.  With this change we first insert
the exact string from the intern table into the literal table and
secondly remove its reference from the intern table.  By moving the
string between tables pointer equality is preserved.

At this point lookupInternedString should be split into two functions,
possibly by pulled up the relevant bits into the public interface
functions.  Since this change will be merged to gingerbread I will
leave the clean up to a separate change.

Bug: 3098960
Change-Id: I11d24d0afa9b7ca2e53fefb1b5e6364795e14d44

13 years agoam d2ba02c2: (-s ours) am da34e27a: (-s ours) am 3db6149c: Merge "Update heap dump...
Andy McFadden [Tue, 19 Oct 2010 20:45:31 +0000 (13:45 -0700)]
am d2ba02c2: (-s ours) am da34e27a: (-s ours) am 3db6149c: Merge "Update heap dump notes.  DO NOT MERGE." into gingerbread

Merge commit 'd2ba02c297bc8214611e347e27edee9f41772474' into dalvik-dev

* commit 'd2ba02c297bc8214611e347e27edee9f41772474':
  Update heap dump notes.  DO NOT MERGE.

13 years agoam da34e27a: (-s ours) am 3db6149c: Merge "Update heap dump notes. DO NOT MERGE...
Andy McFadden [Tue, 19 Oct 2010 20:37:01 +0000 (13:37 -0700)]
am da34e27a: (-s ours) am 3db6149c: Merge "Update heap dump notes.  DO NOT MERGE." into gingerbread

Merge commit 'da34e27a6de6eec8b4f1036c9ba4922a12a5bf19'

* commit 'da34e27a6de6eec8b4f1036c9ba4922a12a5bf19':
  Update heap dump notes.  DO NOT MERGE.

13 years agoMerge "Update heap dump notes." into dalvik-dev
Andy McFadden [Tue, 19 Oct 2010 19:02:25 +0000 (12:02 -0700)]
Merge "Update heap dump notes." into dalvik-dev

13 years agoam 6b08a477: am e8debfcf: am c6fb7a5e: Merge "Exit early if the we encounter a null...
Carl Shapiro [Tue, 19 Oct 2010 18:34:00 +0000 (11:34 -0700)]
am 6b08a477: am e8debfcf: am c6fb7a5e: Merge "Exit early if the we encounter a null reference." into gingerbread

Merge commit '6b08a4774e13844802cc324320681ba26479899e' into dalvik-dev

* commit '6b08a4774e13844802cc324320681ba26479899e':
  Exit early if the we encounter a null reference.

13 years agoam 3db6149c: Merge "Update heap dump notes. DO NOT MERGE." into gingerbread
Andy McFadden [Tue, 19 Oct 2010 18:28:36 +0000 (11:28 -0700)]
am 3db6149c: Merge "Update heap dump notes.  DO NOT MERGE." into gingerbread

Merge commit '3db6149c9891089ed1b357ab69db5c57c9c1fb6c' into gingerbread-plus-aosp

* commit '3db6149c9891089ed1b357ab69db5c57c9c1fb6c':
  Update heap dump notes.  DO NOT MERGE.

13 years agoUpdate heap dump notes.
Andy McFadden [Tue, 19 Oct 2010 18:25:02 +0000 (11:25 -0700)]
Update heap dump notes.

The release order changed slightly.

Bug 3110872 is related.

Change-Id: I2b2982a29910ee58746188e9dbd61ffd9c3b3d64

13 years agoMerge "Update heap dump notes. DO NOT MERGE." into gingerbread
Andy McFadden [Tue, 19 Oct 2010 18:19:28 +0000 (11:19 -0700)]
Merge "Update heap dump notes.  DO NOT MERGE." into gingerbread

13 years agoam e8debfcf: am c6fb7a5e: Merge "Exit early if the we encounter a null reference...
Carl Shapiro [Tue, 19 Oct 2010 18:18:23 +0000 (11:18 -0700)]
am e8debfcf: am c6fb7a5e: Merge "Exit early if the we encounter a null reference." into gingerbread

Merge commit 'e8debfcf2d16ba18474ca51200e9b7f2d912dee3'

* commit 'e8debfcf2d16ba18474ca51200e9b7f2d912dee3':
  Exit early if the we encounter a null reference.

13 years agoam 078241d5: am 8ca802ff: am 7b4c1d52: Pop call frame before boxing result
Andy McFadden [Tue, 19 Oct 2010 17:56:38 +0000 (10:56 -0700)]
am 078241d5: am 8ca802ff: am 7b4c1d52: Pop call frame before boxing result

Merge commit '078241d5d7b44f145b93979665cdc6e5df2b093b' into dalvik-dev

* commit '078241d5d7b44f145b93979665cdc6e5df2b093b':
  Pop call frame before boxing result

13 years agoam 1e09b407: am 8cb3d855: am e09a766f: x86 mterp: fix cherry-pick/merge, issue 3095771
buzbee [Tue, 19 Oct 2010 17:56:34 +0000 (10:56 -0700)]
am 1e09b407: am 8cb3d855: am e09a766f: x86 mterp: fix cherry-pick/merge, issue 3095771

Merge commit '1e09b40718a6dc9db0ce34a7aacc93a3df45c664' into dalvik-dev

* commit '1e09b40718a6dc9db0ce34a7aacc93a3df45c664':
  x86 mterp: fix cherry-pick/merge, issue 3095771

13 years agoam 8ca802ff: am 7b4c1d52: Pop call frame before boxing result
Andy McFadden [Tue, 19 Oct 2010 17:44:34 +0000 (10:44 -0700)]
am 8ca802ff: am 7b4c1d52: Pop call frame before boxing result

Merge commit '8ca802ff96060b730119b58379c2e6366afdbd3e'

* commit '8ca802ff96060b730119b58379c2e6366afdbd3e':
  Pop call frame before boxing result

13 years agoam 8cb3d855: am e09a766f: x86 mterp: fix cherry-pick/merge, issue 3095771
buzbee [Tue, 19 Oct 2010 17:44:30 +0000 (10:44 -0700)]
am 8cb3d855: am e09a766f: x86 mterp: fix cherry-pick/merge, issue 3095771

Merge commit '8cb3d8558b3cdc3da00e736bb3cdb95adf653659'

* commit '8cb3d8558b3cdc3da00e736bb3cdb95adf653659':
  x86 mterp: fix cherry-pick/merge, issue 3095771

13 years agoUpdate heap dump notes. DO NOT MERGE.
Andy McFadden [Tue, 19 Oct 2010 17:15:14 +0000 (10:15 -0700)]
Update heap dump notes.  DO NOT MERGE.

We brought over the VM change that removed SIGUSR1 as a way to cause
an hprof dump, but didn't bring the replacement command-line stuff
("am dumpheap" and the updated version of runhat).  This updates the
documentation to reflect the state of the world in gingerbread.

Bug 3110872.

Change-Id: Ia64190584a344995670e663636e8e2c0983fb29f

13 years agoam c6fb7a5e: Merge "Exit early if the we encounter a null reference." into gingerbread
Carl Shapiro [Tue, 19 Oct 2010 04:24:31 +0000 (21:24 -0700)]
am c6fb7a5e: Merge "Exit early if the we encounter a null reference." into gingerbread

Merge commit 'c6fb7a5e56d3d17848482d403d2b1464a89aca46' into gingerbread-plus-aosp

* commit 'c6fb7a5e56d3d17848482d403d2b1464a89aca46':
  Exit early if the we encounter a null reference.

13 years agoMerge "Exit early if the we encounter a null reference." into gingerbread
Carl Shapiro [Tue, 19 Oct 2010 04:22:43 +0000 (21:22 -0700)]
Merge "Exit early if the we encounter a null reference." into gingerbread

13 years agoFix a typo in the return type of dvmIsValidCard.
Carl Shapiro [Tue, 19 Oct 2010 01:00:35 +0000 (18:00 -0700)]
Fix a typo in the return type of dvmIsValidCard.

Change-Id: I518751b338e373d63a975c55320200348fa94b91

13 years agoMerge "Remove an obsolete debugging message." into dalvik-dev
Carl Shapiro [Tue, 19 Oct 2010 00:49:18 +0000 (17:49 -0700)]
Merge "Remove an obsolete debugging message." into dalvik-dev

13 years agoRemove an obsolete debugging message.
Carl Shapiro [Tue, 19 Oct 2010 00:36:13 +0000 (17:36 -0700)]
Remove an obsolete debugging message.

Change-Id: Idb6af743bdd2e60a64d8ba8488d373f1724be3a2

13 years agoMerge "Export dvmIsValid card." into dalvik-dev
Carl Shapiro [Tue, 19 Oct 2010 00:16:36 +0000 (17:16 -0700)]
Merge "Export dvmIsValid card." into dalvik-dev

13 years agoam 7b4c1d52: Pop call frame before boxing result
Andy McFadden [Tue, 19 Oct 2010 00:04:19 +0000 (17:04 -0700)]
am 7b4c1d52: Pop call frame before boxing result

Merge commit '7b4c1d52a946506d49c6da5649d1677e92263d66' into gingerbread-plus-aosp

* commit '7b4c1d52a946506d49c6da5649d1677e92263d66':
  Pop call frame before boxing result

13 years agoam e09a766f: x86 mterp: fix cherry-pick/merge, issue 3095771
buzbee [Tue, 19 Oct 2010 00:03:52 +0000 (17:03 -0700)]
am e09a766f: x86 mterp: fix cherry-pick/merge, issue 3095771

Merge commit 'e09a766f3a964fb98296939ce1f92b8c95bf8c25' into gingerbread-plus-aosp

* commit 'e09a766f3a964fb98296939ce1f92b8c95bf8c25':
  x86 mterp: fix cherry-pick/merge, issue 3095771

13 years agoExport dvmIsValid card.
Carl Shapiro [Tue, 19 Oct 2010 00:00:41 +0000 (17:00 -0700)]
Export dvmIsValid card.

Change-Id: If92998de87db61cad75c7affa1500aed582f9687

13 years agoam 8f192cc6: Open hprof files with O_TRUNC to avoid partial overwrites of existing...
Brian Carlstrom [Mon, 18 Oct 2010 23:41:53 +0000 (16:41 -0700)]
am 8f192cc6: Open hprof files with O_TRUNC to avoid partial overwrites of existing files

Merge commit '8f192cc6bb9906849a5811ce4a9aae7cdab9a994' into dalvik-dev

* commit '8f192cc6bb9906849a5811ce4a9aae7cdab9a994':
  Open hprof files with O_TRUNC to avoid partial overwrites of existing files

13 years agoExit early if the we encounter a null reference.
Carl Shapiro [Mon, 18 Oct 2010 23:27:29 +0000 (16:27 -0700)]
Exit early if the we encounter a null reference.

Bug: 3108418
Change-Id: I057e7a674e2ab96671f4651811071b6810250528

13 years agoOpen hprof files with O_TRUNC to avoid partial overwrites of existing files
Brian Carlstrom [Mon, 18 Oct 2010 22:37:24 +0000 (15:37 -0700)]
Open hprof files with O_TRUNC to avoid partial overwrites of existing files

Change-Id: I97a89071ad766005bb9f91661185dd901a35ae03

13 years agoPop call frame before boxing result
Andy McFadden [Mon, 18 Oct 2010 20:28:31 +0000 (13:28 -0700)]
Pop call frame before boxing result

After reflective method calls, primitive results need to be boxed
up in an appropriate object.  This generally requires allocating an
object of the appropriate type.  We were doing this before popping
the call frame, which meant that if the allocation caused a GC we
would be scanning results out of a "dead" stack frame.

We hit a case where a register went from holding a reference to
holding a primitive right before the method returned.  The exported
PC was pointing at the last GC point, where the register was expected
to hold a reference, so precise GC was getting very confused.

Bug 3102352.

(cherry-pick from dalvik-dev)

Change-Id: I21f59f1d70689d9e4901deb3100c756fd85223e7

13 years agoPop call frame before boxing result
Andy McFadden [Mon, 18 Oct 2010 20:28:31 +0000 (13:28 -0700)]
Pop call frame before boxing result

After reflective method calls, primitive results need to be boxed
up in an appropriate object.  This generally requires allocating an
object of the appropriate type.  We were doing this before popping
the call frame, which meant that if the allocation caused a GC we
would be scanning results out of a "dead" stack frame.

We hit a case where a register went from holding a reference to
holding a primitive right before the method returned.  The exported
PC was pointing at the last GC point, where the register was expected
to hold a reference, so precise GC was getting very confused.

Bug 3102352.

Change-Id: Ic929b725ab81cbaab4c7aa1d85131f7ca3cec961

13 years agoMerge "Switch to VMWAIT before sending to DDMS" into dalvik-dev
Andy McFadden [Mon, 18 Oct 2010 15:17:02 +0000 (08:17 -0700)]
Merge "Switch to VMWAIT before sending to DDMS" into dalvik-dev

13 years agoam fd9c61b2: am ef1ed3c5: (-s ours) x86 mterp: fix cherry-pick/merge, issue 3095771
buzbee [Sat, 16 Oct 2010 01:18:14 +0000 (18:18 -0700)]
am fd9c61b2: am ef1ed3c5: (-s ours) x86 mterp: fix cherry-pick/merge, issue 3095771

Merge commit 'fd9c61b2e56a4bb73ffd03d13504461e51a3611b' into dalvik-dev

* commit 'fd9c61b2e56a4bb73ffd03d13504461e51a3611b':
  x86 mterp: fix cherry-pick/merge, issue 3095771

13 years agoam ef1ed3c5: (-s ours) x86 mterp: fix cherry-pick/merge, issue 3095771
buzbee [Sat, 16 Oct 2010 00:51:37 +0000 (17:51 -0700)]
am ef1ed3c5: (-s ours) x86 mterp: fix cherry-pick/merge, issue 3095771

Merge commit 'ef1ed3c5cbde4de64e1991de2dbea57efd964841'

* commit 'ef1ed3c5cbde4de64e1991de2dbea57efd964841':
  x86 mterp: fix cherry-pick/merge, issue 3095771

13 years agoSwitch to VMWAIT before sending to DDMS
Andy McFadden [Fri, 15 Oct 2010 20:54:28 +0000 (13:54 -0700)]
Switch to VMWAIT before sending to DDMS

If you stop DDMS with Ctrl-Z, packets sent from the VM will start
to back up and eventually the network write will block.  The VM was
doing the write in "running" state, which meant that if another thread
tried to GC it would be unable to suspend the stalled thread and the
VM would abort.

Now when this happens the affected thread(s) will be quietly stuck until
DDMS is resumed.  (We may want to fix that eventually.)

Bug 3101425.

Change-Id: Ide83c4622137e24c23ee85c006b497d84cf5006b

13 years agoam fd294a76: am f4b26ea7: resolved conflicts for merge of b0b2a75d to gingerbread...
Raphael [Fri, 15 Oct 2010 07:28:57 +0000 (00:28 -0700)]
am fd294a76: am f4b26ea7: resolved conflicts for merge of b0b2a75d to gingerbread-plus-aosp

Merge commit 'fd294a76498a93e6497a0b0f110967ae1892376e' into dalvik-dev

* commit 'fd294a76498a93e6497a0b0f110967ae1892376e':
  SDK: fix dx shell script to look for dx.jar in platform-tools

13 years agoam f4b26ea7: resolved conflicts for merge of b0b2a75d to gingerbread-plus-aosp
Raphael [Fri, 15 Oct 2010 07:07:54 +0000 (00:07 -0700)]
am f4b26ea7: resolved conflicts for merge of b0b2a75d to gingerbread-plus-aosp

Merge commit 'f4b26ea7ea0a85e2592a0ec0e439ffa4f3c5a038'

* commit 'f4b26ea7ea0a85e2592a0ec0e439ffa4f3c5a038':
  SDK: fix dx shell script to look for dx.jar in platform-tools

13 years agox86 mterp: fix cherry-pick/merge, issue 3095771
buzbee [Thu, 14 Oct 2010 00:47:52 +0000 (17:47 -0700)]
x86 mterp: fix cherry-pick/merge, issue 3095771

Bug http://b/issue?id=3095771

Change
https://android-git.corp.google.com/g/#change,70700
was a cherry-pick/merge of
https://android-git.corp.google.com/g/#change,70388

It was not properly merged, and resulting in the register holding
the object head to be trashed (and subsequently broke GC).

Change-Id: Ic480104e3a643a5b744d36eb0aefaedd3e4f925c

13 years agox86 mterp: fix cherry-pick/merge, issue 3095771
buzbee [Thu, 14 Oct 2010 00:47:52 +0000 (17:47 -0700)]
x86 mterp: fix cherry-pick/merge, issue 3095771

Bug http://b/issue?id=3095771

Change
https://android-git.corp.google.com/g/#change,70700
was a cherry-pick/merge of
https://android-git.corp.google.com/g/#change,70388

It was not properly merged, and resulting in the register holding
the object head to be trashed (and subsequently broke GC).

Change-Id: Ic480104e3a643a5b744d36eb0aefaedd3e4f925c

13 years agoresolved conflicts for merge of b0b2a75d to gingerbread-plus-aosp
Raphael [Wed, 13 Oct 2010 20:36:32 +0000 (13:36 -0700)]
resolved conflicts for merge of b0b2a75d to gingerbread-plus-aosp

Change-Id: Ie475c74ea64cab1e74171a7f885dd3e48f219922

13 years agoSDK: fix dx shell script to look for dx.jar in platform-tools
Raphael [Wed, 13 Oct 2010 20:11:07 +0000 (13:11 -0700)]
SDK: fix dx shell script to look for dx.jar in platform-tools

Change-Id: I4b644dc686f1da75ef7fb34ea874b54ce44f8391

13 years agoam d5854946: am 141c9711: am 3f01142e: Merge "Added some threading notes" into ginger...
Andy McFadden [Tue, 12 Oct 2010 23:49:00 +0000 (16:49 -0700)]
am d5854946: am 141c9711: am 3f01142e: Merge "Added some threading notes" into gingerbread

Merge commit 'd5854946a4ce3ad3da66542ca3aafb35e9558281' into dalvik-dev

* commit 'd5854946a4ce3ad3da66542ca3aafb35e9558281':
  Added some threading notes

13 years agoam e6a8cabb: am 565c5663: am 44dcf29d: Add include guards to avoid multiple definitions.
Carl Shapiro [Tue, 12 Oct 2010 23:45:22 +0000 (16:45 -0700)]
am e6a8cabb: am 565c5663: am 44dcf29d: Add include guards to avoid multiple definitions.

Merge commit 'e6a8cabbd6bf5869fd302d9cd53212611f2c671b' into dalvik-dev

* commit 'e6a8cabbd6bf5869fd302d9cd53212611f2c671b':
  Add include guards to avoid multiple definitions.

13 years agoam 141c9711: am 3f01142e: Merge "Added some threading notes" into gingerbread
Andy McFadden [Tue, 12 Oct 2010 23:38:38 +0000 (16:38 -0700)]
am 141c9711: am 3f01142e: Merge "Added some threading notes" into gingerbread

Merge commit '141c9711d546c161d7ad6b149392dfddf705a26e'

* commit '141c9711d546c161d7ad6b149392dfddf705a26e':
  Added some threading notes

13 years agoam 565c5663: am 44dcf29d: Add include guards to avoid multiple definitions.
Carl Shapiro [Tue, 12 Oct 2010 23:27:10 +0000 (16:27 -0700)]
am 565c5663: am 44dcf29d: Add include guards to avoid multiple definitions.

Merge commit '565c56636641b9ed28ed479b6f4730e1a9df4f7e'

* commit '565c56636641b9ed28ed479b6f4730e1a9df4f7e':
  Add include guards to avoid multiple definitions.

13 years agoMerge "Fine-tune the instructions on the method invocation path." into dalvik-dev
Ben Cheng [Tue, 12 Oct 2010 20:43:41 +0000 (13:43 -0700)]
Merge "Fine-tune the instructions on the method invocation path." into dalvik-dev

13 years agoMerge "Minor rename." into dalvik-dev
Andy McFadden [Tue, 12 Oct 2010 20:32:15 +0000 (13:32 -0700)]
Merge "Minor rename." into dalvik-dev

13 years agoMerge "Bump version." into dalvik-dev
Andy McFadden [Tue, 12 Oct 2010 20:31:20 +0000 (13:31 -0700)]
Merge "Bump version." into dalvik-dev

13 years agoFine-tune the instructions on the method invocation path.
Ben Cheng [Tue, 12 Oct 2010 18:50:10 +0000 (11:50 -0700)]
Fine-tune the instructions on the method invocation path.

1) Initialize the register and out sizes for callee methods through
   constant moves.
2) Eliminate an unnecessary load of Dalvik PC for chained and
   native callees.

Improved method invocation performance by ~3%.

Change-Id: Iead1276eed0ba527e82eb876f08d169ab9b496b2

13 years agoMinor rename.
Andy McFadden [Tue, 12 Oct 2010 20:29:02 +0000 (13:29 -0700)]
Minor rename.

Rename two dummy-result variables to "unused".

Change-Id: Ib3e49436904123c6ceebe9bfb6e461f654209b23

13 years agoBump version.
Andy McFadden [Tue, 12 Oct 2010 17:18:39 +0000 (10:18 -0700)]
Bump version.

Increment the minor version post-GB.  Increment DALVIK_VM_BUILD, which
should've happened when I added return-void-barrier.

Change-Id: I65480ced9183d0e3c84be2c1eeb9670017bbbc8f

13 years agoKeep track of debugger call results
Andy McFadden [Fri, 8 Oct 2010 22:31:31 +0000 (15:31 -0700)]
Keep track of debugger call results

The debugger can execute arbitrary methods in threads that are stopped
at a breakpoint.  The result is passed back from the target thread to
the debugger through the JDWP thread.  During this time, nothing else
has a copy of the return value, so if it's an object reference we need
to make sure the GC doesn't move or discard it.

The object is added to the "GC don't touch" list by the JDWP code,
but it was happening after the object was passed between threads.
We now register the object right after we get it.

Also, don't call dvmAddTrackedAlloc on a null object.

Bug 3009076

Change-Id: I5ab07a70ad7141b6867707c75843cfb60c35446d

13 years agoam 643b045e: am 65da91cf: am 16926bc4: Merge "Remove obsolete variable "len" to avoid...
Jean-Baptiste Queru [Tue, 12 Oct 2010 08:56:16 +0000 (01:56 -0700)]
am 643b045e: am 65da91cf: am 16926bc4: Merge "Remove obsolete variable "len" to avoid compile failed"

Merge commit '643b045edcec8fe5b2b9b6f2f95529214f9d0dd2' into dalvik-dev

* commit '643b045edcec8fe5b2b9b6f2f95529214f9d0dd2':
  Remove obsolete variable "len" to avoid compile failed

13 years agoam 65da91cf: am 16926bc4: Merge "Remove obsolete variable "len" to avoid compile...
Jean-Baptiste Queru [Tue, 12 Oct 2010 08:45:43 +0000 (01:45 -0700)]
am 65da91cf: am 16926bc4: Merge "Remove obsolete variable "len" to avoid compile failed"

Merge commit '65da91cf96f8e567db9fc1221d2dcb12bad2ab80'

* commit '65da91cf96f8e567db9fc1221d2dcb12bad2ab80':
  Remove obsolete variable "len" to avoid compile failed

13 years agoam 63843e0e: am 7876eb7d: am 0b89c266: Merge "Use the break position of the current...
Carl Shapiro [Tue, 12 Oct 2010 02:18:37 +0000 (19:18 -0700)]
am 63843e0e: am 7876eb7d: am 0b89c266: Merge "Use the break position of the current mspace for sizing the zygote heap." into gingerbread

Merge commit '63843e0e739c3f2b259faafd85abd37baf5324c5' into dalvik-dev

* commit '63843e0e739c3f2b259faafd85abd37baf5324c5':
  Use the break position of the current mspace for sizing the zygote heap.

13 years agoam ebf657c0: am 90ee39ea: am ad3ff025: Merge "Update Call386ABI.S to support 16 byte...
Jean-Baptiste Queru [Tue, 12 Oct 2010 02:18:35 +0000 (19:18 -0700)]
am ebf657c0: am 90ee39ea: am ad3ff025: Merge "Update Call386ABI.S to support 16 byte alignment"

Merge commit 'ebf657c0ab53a6e0db5c3dd565eba591f98a7321' into dalvik-dev

* commit 'ebf657c0ab53a6e0db5c3dd565eba591f98a7321':
  Update Call386ABI.S to support 16 byte alignment

13 years agoam baac134a: am 789fb059: am bc02ca96: Merge "Fixed bug in OP_GOTO_32.S, added suppor...
Jean-Baptiste Queru [Tue, 12 Oct 2010 02:18:31 +0000 (19:18 -0700)]
am baac134a: am 789fb059: am bc02ca96: Merge "Fixed bug in OP_GOTO_32.S, added support for additional parameters to dvmHandleStackOverflow"

Merge commit 'baac134a4fab06f538a10d660585d33c587506e9' into dalvik-dev

* commit 'baac134a4fab06f538a10d660585d33c587506e9':
  Fixed bug in OP_GOTO_32.S, added support for additional parameters to dvmHandleStackOverflow

13 years agoam 7876eb7d: am 0b89c266: Merge "Use the break position of the current mspace for...
Carl Shapiro [Tue, 12 Oct 2010 01:58:54 +0000 (18:58 -0700)]
am 7876eb7d: am 0b89c266: Merge "Use the break position of the current mspace for sizing the zygote heap." into gingerbread

Merge commit '7876eb7d797f5c3937b7d1be34f81e9aa3b865e9'

* commit '7876eb7d797f5c3937b7d1be34f81e9aa3b865e9':
  Use the break position of the current mspace for sizing the zygote heap.

13 years agoam 90ee39ea: am ad3ff025: Merge "Update Call386ABI.S to support 16 byte alignment"
Jean-Baptiste Queru [Tue, 12 Oct 2010 01:58:15 +0000 (18:58 -0700)]
am 90ee39ea: am ad3ff025: Merge "Update Call386ABI.S to support 16 byte alignment"

Merge commit '90ee39eabbee701b63e79ddaf4859481b7e0547a'

* commit '90ee39eabbee701b63e79ddaf4859481b7e0547a':
  Update Call386ABI.S to support 16 byte alignment

13 years agoam 789fb059: am bc02ca96: Merge "Fixed bug in OP_GOTO_32.S, added support for additio...
Jean-Baptiste Queru [Tue, 12 Oct 2010 01:58:09 +0000 (18:58 -0700)]
am 789fb059: am bc02ca96: Merge "Fixed bug in OP_GOTO_32.S, added support for additional parameters to dvmHandleStackOverflow"

Merge commit '789fb0592cb6ea7ac573bd81ea8fb0a8bb5e103f'

* commit '789fb0592cb6ea7ac573bd81ea8fb0a8bb5e103f':
  Fixed bug in OP_GOTO_32.S, added support for additional parameters to dvmHandleStackOverflow

13 years agoam 3f01142e: Merge "Added some threading notes" into gingerbread
Andy McFadden [Tue, 12 Oct 2010 00:25:42 +0000 (17:25 -0700)]
am 3f01142e: Merge "Added some threading notes" into gingerbread

Merge commit '3f01142ed915021eb871a80d3f8eadca6e6bfc3b' into gingerbread-plus-aosp

* commit '3f01142ed915021eb871a80d3f8eadca6e6bfc3b':
  Added some threading notes

13 years agoMerge "Added some threading notes" into gingerbread
Andy McFadden [Mon, 11 Oct 2010 22:35:54 +0000 (15:35 -0700)]
Merge "Added some threading notes" into gingerbread

13 years agoam 44dcf29d: Add include guards to avoid multiple definitions.
Carl Shapiro [Mon, 11 Oct 2010 22:17:47 +0000 (15:17 -0700)]
am 44dcf29d: Add include guards to avoid multiple definitions.

Merge commit '44dcf29d18f819b4b9d78d4d81676681b57f44ce' into gingerbread-plus-aosp

* commit '44dcf29d18f819b4b9d78d4d81676681b57f44ce':
  Add include guards to avoid multiple definitions.

13 years agoAdd include guards to avoid multiple definitions.
Carl Shapiro [Mon, 11 Oct 2010 21:55:08 +0000 (14:55 -0700)]
Add include guards to avoid multiple definitions.

Change-Id: I2a52823325a0a582a746890af7f040324d671806

13 years agoAdded some threading notes
Andy McFadden [Mon, 11 Oct 2010 21:46:25 +0000 (14:46 -0700)]
Added some threading notes

Explain thread attach/detach, behavior of threads running native code.
Added pthread_key_create destructor note to backward compatibility
section.

Change-Id: I954708c9ec7c83ba951c0f512c88d5c610a49411

13 years agoam 7e08546d: am c7fb06ef: am 5276cccb: Verify method invocation type.
Andy McFadden [Mon, 11 Oct 2010 19:45:24 +0000 (12:45 -0700)]
am 7e08546d: am c7fb06ef: am 5276cccb: Verify method invocation type.

Merge commit '7e08546def661fc0f629d8462aae2db88c1a9708' into dalvik-dev

* commit '7e08546def661fc0f629d8462aae2db88c1a9708':
  Verify method invocation type.

13 years agoam c7fb06ef: am 5276cccb: Verify method invocation type.
Andy McFadden [Mon, 11 Oct 2010 19:37:06 +0000 (12:37 -0700)]
am c7fb06ef: am 5276cccb: Verify method invocation type.

Merge commit 'c7fb06efb576b7ff0295dd70c8beaeea11918645'

* commit 'c7fb06efb576b7ff0295dd70c8beaeea11918645':
  Verify method invocation type.

13 years agoam 451bed66: am 22156b4d: am 9be25d09: Clarify the invoke-* opcodes.
Dan Bornstein [Mon, 11 Oct 2010 19:04:26 +0000 (12:04 -0700)]
am 451bed66: am 22156b4d: am 9be25d09: Clarify the invoke-* opcodes.

Merge commit '451bed664ca2dcf0f32451445c224ffde7a0e9e8' into dalvik-dev

* commit '451bed664ca2dcf0f32451445c224ffde7a0e9e8':
  Clarify the invoke-* opcodes.

13 years agoam 22156b4d: am 9be25d09: Clarify the invoke-* opcodes.
Dan Bornstein [Mon, 11 Oct 2010 18:36:14 +0000 (11:36 -0700)]
am 22156b4d: am 9be25d09: Clarify the invoke-* opcodes.

Merge commit '22156b4d43d06446a0bb4d2c887c23bedabb3a96'

* commit '22156b4d43d06446a0bb4d2c887c23bedabb3a96':
  Clarify the invoke-* opcodes.

13 years agoam 16926bc4: Merge "Remove obsolete variable "len" to avoid compile failed"
Jean-Baptiste Queru [Mon, 11 Oct 2010 15:07:39 +0000 (08:07 -0700)]
am 16926bc4: Merge "Remove obsolete variable "len" to avoid compile failed"

Merge commit '16926bc4382640b73e439f678f675444d0d39e8f' into gingerbread-plus-aosp

* commit '16926bc4382640b73e439f678f675444d0d39e8f':
  Remove obsolete variable "len" to avoid compile failed

13 years agoMerge "Remove obsolete variable "len" to avoid compile failed"
Jean-Baptiste Queru [Mon, 11 Oct 2010 15:00:48 +0000 (08:00 -0700)]
Merge "Remove obsolete variable "len" to avoid compile failed"

13 years agoam 0b89c266: Merge "Use the break position of the current mspace for sizing the zygot...
Carl Shapiro [Mon, 11 Oct 2010 06:05:05 +0000 (23:05 -0700)]
am 0b89c266: Merge "Use the break position of the current mspace for sizing the zygote heap." into gingerbread

Merge commit '0b89c266321d6db8c50485e3b65d7def799ae0a3' into gingerbread-plus-aosp

* commit '0b89c266321d6db8c50485e3b65d7def799ae0a3':
  Use the break position of the current mspace for sizing the zygote heap.

13 years agoMerge "Use the break position of the current mspace for sizing the zygote heap."...
Carl Shapiro [Mon, 11 Oct 2010 06:03:22 +0000 (23:03 -0700)]
Merge "Use the break position of the current mspace for sizing the zygote heap." into gingerbread

13 years agoUse the break position of the current mspace for sizing the zygote heap.
Carl Shapiro [Mon, 11 Oct 2010 01:50:22 +0000 (18:50 -0700)]
Use the break position of the current mspace for sizing the zygote heap.

Previously, the mspace footprint used the "overhead" of a heap which
underestimates the size of the zygote heap by 16 bytes, the specific
size of a descriptor deposited at the start of an mspace containing
the control information about that mspace.  If a heap is a multiple of
a page or within 15 bytes of it, the size of the new heap would be
underestimated.

Bad things happened when this underestimate was used to create an
application heap.  The starting address of the application heap was
based on a correctly computed value instead of the underestimate.
This caused the application heap to be one page to large and end one
page beyond where it should.  This additional page happened to overlap
the first page one of the heap bitmaps.  Furthermore, the mspace
routine would proceed access protect that page thinking it was unused
free space.  During the next GC reads to the first page of the bitmap
would generate a SIGSEGV.

By using the break position, correctly rounded, for all sizing
computations this problem no longer exists.

Change-Id: Icb3c82731e589747e8e4cf16d0797052e64b3ad5

13 years agoam ad3ff025: Merge "Update Call386ABI.S to support 16 byte alignment"
Jean-Baptiste Queru [Mon, 11 Oct 2010 01:49:37 +0000 (18:49 -0700)]
am ad3ff025: Merge "Update Call386ABI.S to support 16 byte alignment"

Merge commit 'ad3ff0252ee5c59528828e0625490f0768d2081f' into gingerbread-plus-aosp

* commit 'ad3ff0252ee5c59528828e0625490f0768d2081f':
  Update Call386ABI.S to support 16 byte alignment

13 years agoam bc02ca96: Merge "Fixed bug in OP_GOTO_32.S, added support for additional parameter...
Jean-Baptiste Queru [Mon, 11 Oct 2010 01:49:31 +0000 (18:49 -0700)]
am bc02ca96: Merge "Fixed bug in OP_GOTO_32.S, added support for additional parameters to dvmHandleStackOverflow"

Merge commit 'bc02ca96c5cd3b45939809ed43ae2e7f2e4fb5b9' into gingerbread-plus-aosp

* commit 'bc02ca96c5cd3b45939809ed43ae2e7f2e4fb5b9':
  Fixed bug in OP_GOTO_32.S, added support for additional parameters to dvmHandleStackOverflow

13 years agoMerge "Update Call386ABI.S to support 16 byte alignment"
Jean-Baptiste Queru [Mon, 11 Oct 2010 01:35:44 +0000 (18:35 -0700)]
Merge "Update Call386ABI.S to support 16 byte alignment"

13 years agoMerge "Fixed bug in OP_GOTO_32.S, added support for additional parameters to dvmHandl...
Jean-Baptiste Queru [Mon, 11 Oct 2010 01:34:16 +0000 (18:34 -0700)]
Merge "Fixed bug in OP_GOTO_32.S, added support for additional parameters to dvmHandleStackOverflow"

13 years agoam 5276cccb: Verify method invocation type.
Andy McFadden [Sun, 10 Oct 2010 21:12:00 +0000 (14:12 -0700)]
am 5276cccb: Verify method invocation type.

Merge commit '5276cccb15b6ce0133c8107ff9ff013b4a176ef7' into gingerbread-plus-aosp

* commit '5276cccb15b6ce0133c8107ff9ff013b4a176ef7':
  Verify method invocation type.

13 years agoVerify method invocation type.
Andy McFadden [Sun, 10 Oct 2010 19:59:11 +0000 (12:59 -0700)]
Verify method invocation type.

Dalvik provides five different ways to invoke a method (virtual, super,
direct, static, interface).  Using a virtual invoke instruction to call
a direct method will not produce the desired results.

This adds a test to the verifier that ensures the method targeted by
an invocation instruction is of an appropriate kind.

Bug 3082885.

(cherry-pick from dalvik-dev)

Change-Id: I3237cbefc7314f0b9d7557fc0bfd2b548ea30938

13 years agoam 9be25d09: Clarify the invoke-* opcodes.
Dan Bornstein [Sun, 10 Oct 2010 20:20:02 +0000 (13:20 -0700)]
am 9be25d09: Clarify the invoke-* opcodes.

Merge commit '9be25d09d24b3d6d0dd1a41c1c09471af4827687' into gingerbread-plus-aosp

* commit '9be25d09d24b3d6d0dd1a41c1c09471af4827687':
  Clarify the invoke-* opcodes.

13 years agoVerify method invocation type.
Andy McFadden [Sun, 10 Oct 2010 19:59:11 +0000 (12:59 -0700)]
Verify method invocation type.

Dalvik provides five different ways to invoke a method (virtual, super,
direct, static, interface).  Using a virtual invoke instruction to call
a direct method will not produce the desired results.

This adds a test to the verifier that ensures the method targeted by
an invocation instruction is of an appropriate kind.

Bug 3082885.

Change-Id: Iacf14b9b3959a0894d89d727286e10e3ecf72680

13 years agoClarify the invoke-* opcodes.
Dan Bornstein [Sun, 10 Oct 2010 19:29:07 +0000 (12:29 -0700)]
Clarify the invoke-* opcodes.

In particular, make it a little more explicit what kinds of methods
are acceptable for each variant.

Change-Id: Icd9dad876c2d10c23462b4d85ccaa9441d7f2c04

13 years agoTrack result from dvmCallMethod
Andy McFadden [Thu, 7 Oct 2010 22:11:43 +0000 (15:11 -0700)]
Track result from dvmCallMethod

When dvmCallMethod returns an object reference, we need to ensure
that the GC doesn't release or relocate the storage.  Unless we have
a clear view of how the object is used, we need to explicitly track
and release it.

This adds additional tracking, or comments indicating that explicit
tracking is not necessary.

On a similar note, clearing/restoring a pending exception requires
explicit tracking of that exception, since there's a fair chance
that it's no longer in the root set.  That needed fixing in a couple
of places.

Bug 3009076.

Change-Id: I39def8c3a5a628f0ee86fc094e34d7c69248c28b

13 years agoDon't do ClassLoader prep in dexopt.
Andy McFadden [Fri, 8 Oct 2010 17:06:26 +0000 (10:06 -0700)]
Don't do ClassLoader prep in dexopt.

The code to cache the method info for ClassLoader.loadClass() was
happening in dexopt, which is a problem when you're optimizing core.jar.
This splits it out into a different function, which the dexopt startup
doesn't call.

Change-Id: I0bd5b9323b65e8f152b2ab4ea8e58fcf0039e53c

13 years agoAvoid lookup of loadClass().
Andy McFadden [Thu, 7 Oct 2010 22:12:14 +0000 (15:12 -0700)]
Avoid lookup of loadClass().

Fix a TODO item: do the lookup of ClassLoader.loadClass() during init
instead of on every class load through a non-bootstrap loader.

Change-Id: Iebd145a721937bec7c09b0a7b7dbd78da8083cbe

13 years agoFix clazz->initThreadId ordering
Andy McFadden [Thu, 7 Oct 2010 00:03:27 +0000 (17:03 -0700)]
Fix clazz->initThreadId ordering

We want to make sure that, if the class we're interested in is in
CLASS_INITIALIZING, we're not loading a stale value for initThreadId.
This is an issue in dvmIsClassInitializing, which reads the value
without holding a lock.

Bug 3069119

Change-Id: I5b492249429cd7a8fbffd526b9a546fb5fb8e6bd

13 years agoMerge "Change handling of edge case." into dalvik-dev
Andy McFadden [Thu, 7 Oct 2010 14:38:35 +0000 (07:38 -0700)]
Merge "Change handling of edge case." into dalvik-dev

13 years agoChange handling of edge case.
Andy McFadden [Wed, 6 Oct 2010 00:02:54 +0000 (17:02 -0700)]
Change handling of edge case.

Generally speaking, you can't create an instance of a class before
the class is initialized.  When you're talking about java.lang.Class
itself, this doesn't apply.  We were trying to sneak in a just-in-time
initialization, but the recent addition of SMP-mandated opcode rewrites
screwed things up a bit.

Happily, the creation of the java.lang.Class class object now happens
at a known time, which means we can explicitly initialize the class
at the right time (when it's far enough along to be able to execute
the class initializer, but before anything tries to use a virtual
method or instance field in java.lang.Class).

Also, changed a LOGE+abort to a simple assert.  The test in question is
performed earlier during linking, so this doesn't merit more than an
assertion.

Bug 3045762.

Change-Id: Ifffb5083a3de108e1d91b3de7b75fd5e97705912

13 years agoMerge "Re-organize target-independent JIT code." into dalvik-dev
buzbee [Wed, 6 Oct 2010 19:29:41 +0000 (12:29 -0700)]
Merge "Re-organize target-independent JIT code." into dalvik-dev

13 years agoam 3d40f20c: Merge "Use DMB ST for store fence."
Andy McFadden [Fri, 1 Oct 2010 23:20:55 +0000 (16:20 -0700)]
am 3d40f20c: Merge "Use DMB ST for store fence."

Merge commit '3d40f20caf1d7778be664cc33ecd395281dfb2e5' into dalvik-dev

* commit '3d40f20caf1d7778be664cc33ecd395281dfb2e5':
  Use DMB ST for store fence.

13 years agoMerge "Use DMB ST for store fence."
Andy McFadden [Fri, 1 Oct 2010 22:22:35 +0000 (15:22 -0700)]
Merge "Use DMB ST for store fence."

13 years agoam 6f3a90d9: am 5163f62f: am 7d3f633d: Merge "Include static fields when dumping...
Carl Shapiro [Fri, 1 Oct 2010 20:08:29 +0000 (13:08 -0700)]
am 6f3a90d9: am 5163f62f: am 7d3f633d: Merge "Include static fields when dumping class objects." into gingerbread

Merge commit '6f3a90d94a46d5d42a885c07b8d06ff75f7b270b' into dalvik-dev

* commit '6f3a90d94a46d5d42a885c07b8d06ff75f7b270b':
  Include static fields when dumping class objects.

13 years agoam 5163f62f: am 7d3f633d: Merge "Include static fields when dumping class objects...
Carl Shapiro [Fri, 1 Oct 2010 19:59:39 +0000 (12:59 -0700)]
am 5163f62f: am 7d3f633d: Merge "Include static fields when dumping class objects." into gingerbread

Merge commit '5163f62f7048c4b651a425b4b7a3a1b0fb227eb6'

* commit '5163f62f7048c4b651a425b4b7a3a1b0fb227eb6':
  Include static fields when dumping class objects.

13 years agoam 7d3f633d: Merge "Include static fields when dumping class objects." into gingerbread
Carl Shapiro [Fri, 1 Oct 2010 19:57:44 +0000 (12:57 -0700)]
am 7d3f633d: Merge "Include static fields when dumping class objects." into gingerbread

Merge commit '7d3f633d2c0061e579c57186276c05ddcc275641' into gingerbread-plus-aosp

* commit '7d3f633d2c0061e579c57186276c05ddcc275641':
  Include static fields when dumping class objects.

13 years agoMerge "Include static fields when dumping class objects." into gingerbread
Carl Shapiro [Fri, 1 Oct 2010 19:54:52 +0000 (12:54 -0700)]
Merge "Include static fields when dumping class objects." into gingerbread

13 years agoUse DMB ST for store fence.
Andy McFadden [Fri, 1 Oct 2010 19:31:42 +0000 (12:31 -0700)]
Use DMB ST for store fence.

Change-Id: I4bde544a7c66e30a1756425ec088e53baa2f11a1

13 years agoInclude static fields when dumping class objects.
Carl Shapiro [Fri, 1 Oct 2010 00:20:11 +0000 (17:20 -0700)]
Include static fields when dumping class objects.

Change-Id: I8e7b1d1ef7ca205b489744dcbf0f210c1f2443c4

13 years agoam d0f17433: am b11c54c9: am 307aa79a: Merge "Change Runtime.nativeLoad to return...
Elliott Hughes [Fri, 1 Oct 2010 18:05:07 +0000 (11:05 -0700)]
am d0f17433: am b11c54c9: am 307aa79a: Merge "Change Runtime.nativeLoad to return the dlerror(3) string." into gingerbread

Merge commit 'd0f1743310437921525b630de102e5d2aefb4c2b' into dalvik-dev

* commit 'd0f1743310437921525b630de102e5d2aefb4c2b':
  Change Runtime.nativeLoad to return the dlerror(3) string.

13 years agoam b11c54c9: am 307aa79a: Merge "Change Runtime.nativeLoad to return the dlerror...
Elliott Hughes [Fri, 1 Oct 2010 17:52:29 +0000 (10:52 -0700)]
am b11c54c9: am 307aa79a: Merge "Change Runtime.nativeLoad to return the dlerror(3) string." into gingerbread

Merge commit 'b11c54c9b7849eaa95423dbbf8433e9f1b20ec32'

* commit 'b11c54c9b7849eaa95423dbbf8433e9f1b20ec32':
  Change Runtime.nativeLoad to return the dlerror(3) string.

13 years agoam 307aa79a: Merge "Change Runtime.nativeLoad to return the dlerror(3) string." into...
Elliott Hughes [Fri, 1 Oct 2010 17:49:02 +0000 (10:49 -0700)]
am 307aa79a: Merge "Change Runtime.nativeLoad to return the dlerror(3) string." into gingerbread

Merge commit '307aa79afc08c50e9ea69aac7bf5128bc75ac7ff' into gingerbread-plus-aosp

* commit '307aa79afc08c50e9ea69aac7bf5128bc75ac7ff':
  Change Runtime.nativeLoad to return the dlerror(3) string.

13 years agoMerge "Change Runtime.nativeLoad to return the dlerror(3) string." into gingerbread
Elliott Hughes [Fri, 1 Oct 2010 17:35:13 +0000 (10:35 -0700)]
Merge "Change Runtime.nativeLoad to return the dlerror(3) string." into gingerbread

13 years agoam 7c1f9b34: resolved conflicts for merge of 6d55b332 to master
buzbee [Fri, 1 Oct 2010 06:30:55 +0000 (23:30 -0700)]
am 7c1f9b34: resolved conflicts for merge of 6d55b332 to master

Merge commit '7c1f9b34d49aa7cea9b830226e33e95d7608cf76' into dalvik-dev

* commit '7c1f9b34d49aa7cea9b830226e33e95d7608cf76':
  GC Card marking fix for SPUT_OBJECT - use correct object head