OSDN Git Service

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

13 years agoresolved conflicts for merge of 6d55b332 to master
buzbee [Fri, 1 Oct 2010 06:19:49 +0000 (23:19 -0700)]
resolved conflicts for merge of 6d55b332 to master

Change-Id: I21e35d4cdf2636ae3cd7facd45ad4f5c4ab82e7b

13 years agoam b78c76f8: GC Card marking fix for SPUT_OBJECT - use correct object head
buzbee [Fri, 1 Oct 2010 03:24:45 +0000 (20:24 -0700)]
am b78c76f8: GC Card marking fix for SPUT_OBJECT - use correct object head

Merge commit 'b78c76f88ea42e7a3b295c210ca9ee86e7290043' into gingerbread-plus-aosp

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

13 years agoam 2f92dcdc: am 33ff9f32: am d8b5f50d: Correct dexopt for uniprocessors.
Andy McFadden [Fri, 1 Oct 2010 02:22:44 +0000 (19:22 -0700)]
am 2f92dcdc: am 33ff9f32: am d8b5f50d: Correct dexopt for uniprocessors.

Merge commit '2f92dcdc05f3c4c1bd7d67786f56393308813f1e' into dalvik-dev

* commit '2f92dcdc05f3c4c1bd7d67786f56393308813f1e':
  Correct dexopt for uniprocessors.

13 years agoam 6b2897b6: am 2428d518: am f45b6cbe: Be explicit about both uniprocessor and SMP...
Dan Bornstein [Fri, 1 Oct 2010 02:22:39 +0000 (19:22 -0700)]
am 6b2897b6: am 2428d518: am f45b6cbe: Be explicit about both uniprocessor and SMP when calling dexopt.

Merge commit '6b2897b60410c540ee5686a2e85eb46386f9f745' into dalvik-dev

* commit '6b2897b60410c540ee5686a2e85eb46386f9f745':
  Be explicit about both uniprocessor and SMP when calling dexopt.

13 years agoGC Card marking fix for SPUT_OBJECT - use correct object head
buzbee [Fri, 1 Oct 2010 02:08:20 +0000 (19:08 -0700)]
GC Card marking fix for SPUT_OBJECT - use correct object head

Change-Id: I8b84a4f1e1690f5b62de7404ea6ede00317848bb

13 years agoam 33ff9f32: am d8b5f50d: Correct dexopt for uniprocessors.
Andy McFadden [Fri, 1 Oct 2010 01:11:46 +0000 (18:11 -0700)]
am 33ff9f32: am d8b5f50d: Correct dexopt for uniprocessors.

Merge commit '33ff9f32d460a232729a123617ca81b3f67195c6'

* commit '33ff9f32d460a232729a123617ca81b3f67195c6':
  Correct dexopt for uniprocessors.

13 years agoam 2428d518: am f45b6cbe: Be explicit about both uniprocessor and SMP when calling...
Dan Bornstein [Fri, 1 Oct 2010 01:11:15 +0000 (18:11 -0700)]
am 2428d518: am f45b6cbe: Be explicit about both uniprocessor and SMP when calling dexopt.

Merge commit '2428d518efb9b5a62d74f44a267f3a6c18982549'

* commit '2428d518efb9b5a62d74f44a267f3a6c18982549':
  Be explicit about both uniprocessor and SMP when calling dexopt.

13 years agoChange Runtime.nativeLoad to return the dlerror(3) string.
Elliott Hughes [Thu, 30 Sep 2010 22:51:31 +0000 (15:51 -0700)]
Change Runtime.nativeLoad to return the dlerror(3) string.

This has a companion change in libcore:
  https://android-git.corp.google.com/g/71342

Bug: 3044042
Change-Id: I070a80a41ec2f306f5092a641807017f70179451

13 years agoam d8b5f50d: Correct dexopt for uniprocessors.
Andy McFadden [Thu, 30 Sep 2010 22:40:43 +0000 (15:40 -0700)]
am d8b5f50d: Correct dexopt for uniprocessors.

Merge commit 'd8b5f50d0c6c9a0ce157e89df4ee1e8eb8b334c3' into gingerbread-plus-aosp

* commit 'd8b5f50d0c6c9a0ce157e89df4ee1e8eb8b334c3':
  Correct dexopt for uniprocessors.

13 years agoCorrect dexopt for uniprocessors.
Andy McFadden [Thu, 30 Sep 2010 21:02:54 +0000 (14:02 -0700)]
Correct dexopt for uniprocessors.

The SMP flag was defaulting to "true" for dexopt, even on uniprocessors.
With this change the VM now has three choices: dexopt for SMP, dexopt
for uniprocessor, or dexopt for current system.  The last is used for
just-in-time dexopt (used by -eng and -userdebug builds on bootstrap DEX
files) and installd dexopt (used for apps on all builds).

The dexopt used by the build system during -user builds will either be
explicitly SMP or explicitly uniprocessor, since "current system" has
no meaning when you're cross-dexopting.

Also, unified the dexopt control flags into a single enum.

(cherry-pick from dalvik-dev)

Change-Id: Id1d9c548ca8567585a28ef9ee911cc2ac6b116dd

13 years agoam f45b6cbe: Be explicit about both uniprocessor and SMP when calling dexopt.
Dan Bornstein [Thu, 30 Sep 2010 22:11:27 +0000 (15:11 -0700)]
am f45b6cbe: Be explicit about both uniprocessor and SMP when calling dexopt.

Merge commit 'f45b6cbed6ce7cb6a38746b5abe0213263106a71' into gingerbread-plus-aosp

* commit 'f45b6cbed6ce7cb6a38746b5abe0213263106a71':
  Be explicit about both uniprocessor and SMP when calling dexopt.

13 years agoMerge "Correct dexopt for uniprocessors." into dalvik-dev
Andy McFadden [Thu, 30 Sep 2010 22:08:29 +0000 (15:08 -0700)]
Merge "Correct dexopt for uniprocessors." into dalvik-dev

13 years agoCorrect dexopt for uniprocessors.
Andy McFadden [Thu, 30 Sep 2010 21:02:54 +0000 (14:02 -0700)]
Correct dexopt for uniprocessors.

The SMP flag was defaulting to "true" for dexopt, even on uniprocessors.
With this change the VM now has three choices: dexopt for SMP, dexopt
for uniprocessor, or dexopt for current system.  The last is used for
just-in-time dexopt (used by -eng and -userdebug builds on bootstrap DEX
files) and installd dexopt (used for apps on all builds).

The dexopt used by the build system during -user builds will either be
explicitly SMP or explicitly uniprocessor, since "current system" has
no meaning when you're cross-dexopting.

Also, unified the dexopt control flags into a single enum.

Change-Id: I02e22d53ccde2e8603cac8090ca3aae59f792f70

13 years agoBe explicit about both uniprocessor and SMP when calling dexopt.
Dan Bornstein [Thu, 30 Sep 2010 22:04:34 +0000 (15:04 -0700)]
Be explicit about both uniprocessor and SMP when calling dexopt.

Change-Id: Ic1b68dddf6822773041de6023c594a062e141325

13 years agoam 19e8f008: am f37569d1: am 1e053438: Merge "After trimming, set the footprint to...
Carl Shapiro [Thu, 30 Sep 2010 18:48:49 +0000 (11:48 -0700)]
am 19e8f008: am f37569d1: am 1e053438: Merge "After trimming, set the footprint to the number of pages in use." into gingerbread

Merge commit '19e8f008c99464bb3ebbe06c269ca9945a3dfc7b' into dalvik-dev

* commit '19e8f008c99464bb3ebbe06c269ca9945a3dfc7b':
  After trimming, set the footprint to the number of pages in use.

13 years agoam 5f556005: am 0cb51973: am d4cdb357: Merge "Update the card table scanning for...
Carl Shapiro [Thu, 30 Sep 2010 18:48:42 +0000 (11:48 -0700)]
am 5f556005: am 0cb51973: am d4cdb357: Merge "Update the card table scanning for header-only card marks." into gingerbread

Merge commit '5f556005ec84881a00350018027f1d82aec7f79e' into dalvik-dev

* commit '5f556005ec84881a00350018027f1d82aec7f79e':
  Update the card table scanning for header-only card marks.

13 years agoam f37569d1: am 1e053438: Merge "After trimming, set the footprint to the number...
Carl Shapiro [Thu, 30 Sep 2010 18:26:04 +0000 (11:26 -0700)]
am f37569d1: am 1e053438: Merge "After trimming, set the footprint to the number of pages in use." into gingerbread

Merge commit 'f37569d1cf3ed24fa37488ceb9bac2a52f45260c'

* commit 'f37569d1cf3ed24fa37488ceb9bac2a52f45260c':
  After trimming, set the footprint to the number of pages in use.

13 years agoam 0cb51973: am d4cdb357: Merge "Update the card table scanning for header-only card...
Carl Shapiro [Thu, 30 Sep 2010 18:24:50 +0000 (11:24 -0700)]
am 0cb51973: am d4cdb357: Merge "Update the card table scanning for header-only card marks." into gingerbread

Merge commit '0cb519734afc574b2ca60d72ced1e9fc46a8f4c9'

* commit '0cb519734afc574b2ca60d72ced1e9fc46a8f4c9':
  Update the card table scanning for header-only card marks.

13 years agoRemove obsolete variable "len" to avoid compile failed
Robert CH Chou [Thu, 30 Sep 2010 09:20:07 +0000 (17:20 +0800)]
Remove obsolete variable "len" to avoid compile failed

Change-Id: Ibf759acef58f6a3e404bfc4be13505774b3d39ad

13 years agoam bf7001a9: am c315cbf1: am 87f66617: Add --uniprocessor option to dex-preopt.
Dan Bornstein [Thu, 30 Sep 2010 03:49:36 +0000 (20:49 -0700)]
am bf7001a9: am c315cbf1: am 87f66617: Add --uniprocessor option to dex-preopt.

Merge commit 'bf7001a9900b737603301bcbbd16daae644d7965' into dalvik-dev

* commit 'bf7001a9900b737603301bcbbd16daae644d7965':
  Add --uniprocessor option to dex-preopt.

13 years agoam c315cbf1: am 87f66617: Add --uniprocessor option to dex-preopt.
Dan Bornstein [Thu, 30 Sep 2010 03:35:10 +0000 (20:35 -0700)]
am c315cbf1: am 87f66617: Add --uniprocessor option to dex-preopt.

Merge commit 'c315cbf15411e9b4b1f7a9732f16117eaea7afcb'

* commit 'c315cbf15411e9b4b1f7a9732f16117eaea7afcb':
  Add --uniprocessor option to dex-preopt.

13 years agoam 1e053438: Merge "After trimming, set the footprint to the number of pages in use...
Carl Shapiro [Wed, 29 Sep 2010 21:30:25 +0000 (14:30 -0700)]
am 1e053438: Merge "After trimming, set the footprint to the number of pages in use." into gingerbread

Merge commit '1e053438810dbd8406ec8339b94801195261e849' into gingerbread-plus-aosp

* commit '1e053438810dbd8406ec8339b94801195261e849':
  After trimming, set the footprint to the number of pages in use.

13 years agoMerge "After trimming, set the footprint to the number of pages in use." into gingerbread
Carl Shapiro [Wed, 29 Sep 2010 21:27:50 +0000 (14:27 -0700)]
Merge "After trimming, set the footprint to the number of pages in use." into gingerbread

13 years agoam d4cdb357: Merge "Update the card table scanning for header-only card marks." into...
Carl Shapiro [Wed, 29 Sep 2010 19:40:05 +0000 (12:40 -0700)]
am d4cdb357: Merge "Update the card table scanning for header-only card marks." into gingerbread

Merge commit 'd4cdb3572b489e770d20a6afba0f86563f380825' into gingerbread-plus-aosp

* commit 'd4cdb3572b489e770d20a6afba0f86563f380825':
  Update the card table scanning for header-only card marks.

13 years agoMerge "Update the card table scanning for header-only card marks." into gingerbread
Carl Shapiro [Wed, 29 Sep 2010 19:38:19 +0000 (12:38 -0700)]
Merge "Update the card table scanning for header-only card marks." into gingerbread

13 years agoam 87f66617: Add --uniprocessor option to dex-preopt.
Dan Bornstein [Wed, 29 Sep 2010 17:04:22 +0000 (10:04 -0700)]
am 87f66617: Add --uniprocessor option to dex-preopt.

Merge commit '87f666172f55863d6a50762a1a07a31b67eb48f6' into gingerbread-plus-aosp

* commit '87f666172f55863d6a50762a1a07a31b67eb48f6':
  Add --uniprocessor option to dex-preopt.

13 years agoUpdate the card table scanning for header-only card marks.
Carl Shapiro [Wed, 29 Sep 2010 08:09:11 +0000 (01:09 -0700)]
Update the card table scanning for header-only card marks.

Previously, the card table accessors assumed that objects had either
their header marked or would be marked exactly.  As such, after
reckoning a marked card the scan would back up until it found an
object header and then move forward blackening each object within the
address range of the marked card.

Following a recent change we exclusively mark headers.  The scan only
has to move forward until the end of a card.  This saves scanning time
as dlmalloc's binning may leave large segments of the heap unused.  It
is not uncommon for hundreds of cards to be spanned when backing up to
the first live object below a marked card.

In addition, this change fixes the card table verifier to search the
mark stack for gray objects.  It is permissible for roots to point to
white objects on unmarked cards.  This was incorrectly treated as an
error.

Change-Id: Ia6b6ee2012e381d644b8b3f38b39d746749ea47a

13 years agoam d53caae3: am b3a94965: am 148283d7: Plumb SMP optimization control through to...
Dan Bornstein [Wed, 29 Sep 2010 06:43:34 +0000 (23:43 -0700)]
am d53caae3: am b3a94965: am 148283d7: Plumb SMP optimization control through to dexopt.

Merge commit 'd53caae351e40f877a7bcf592a31594ac2be9691' into dalvik-dev

* commit 'd53caae351e40f877a7bcf592a31594ac2be9691':
  Plumb SMP optimization control through to dexopt.

13 years agoam 481c2539: am 63114829: am de9cdfa9: Fix verification of switch offsets in large...
Andy McFadden [Wed, 29 Sep 2010 06:43:28 +0000 (23:43 -0700)]
am 481c2539: am 63114829: am de9cdfa9: Fix verification of switch offsets in large methods.

Merge commit '481c25391ef818539b2fbbe682dc873965af5306' into dalvik-dev

* commit '481c25391ef818539b2fbbe682dc873965af5306':
  Fix verification of switch offsets in large methods.

13 years agoAfter trimming, set the footprint to the number of pages in use.
Carl Shapiro [Wed, 29 Sep 2010 03:30:42 +0000 (20:30 -0700)]
After trimming, set the footprint to the number of pages in use.

A trim can decrease the an mspace footprint but it will not decrease
its max footprint.  We need to decrease the max footprint to make any
pages recovered by a trim available to external allocations.

By setting the ideal footprint after a trim we lift any soft limit in
effect and make the mspace footprint and max footprints equal.

Change-Id: Ia6eb99634ce1d732b417a90291b110d1fc46c2e3

13 years agoAdd --uniprocessor option to dex-preopt.
Dan Bornstein [Wed, 29 Sep 2010 01:53:28 +0000 (18:53 -0700)]
Add --uniprocessor option to dex-preopt.

This tells the preoptimizer to target a uniprocessor (unsurprisingly).
By default, it targets SMP, which makes it do more changes than it has
to for a uniprocessor (e.g. editing how non-wide volatile fields are
accessed within bytecode). To be clear, when SMP-optimized code is run
on a uniprocessor, it should still work. We're just aiming to only
make truly necessary changes during optimization.

While I was in the territory, I went ahead and cleaned up some single
vs. double quote hygiene in the file.

Change-Id: Ia45992939a436d0be6db8363c43d430de4acb80b

13 years agoam b3a94965: am 148283d7: Plumb SMP optimization control through to dexopt.
Dan Bornstein [Wed, 29 Sep 2010 01:40:01 +0000 (18:40 -0700)]
am b3a94965: am 148283d7: Plumb SMP optimization control through to dexopt.

Merge commit 'b3a949656a773953a44b148a6cdcba19f1c48e87'

* commit 'b3a949656a773953a44b148a6cdcba19f1c48e87':
  Plumb SMP optimization control through to dexopt.

13 years agoam 148283d7: Plumb SMP optimization control through to dexopt.
Dan Bornstein [Wed, 29 Sep 2010 01:37:39 +0000 (18:37 -0700)]
am 148283d7: Plumb SMP optimization control through to dexopt.

Merge commit '148283d71a7e35b9b506cbb49294b6822719c25e' into gingerbread-plus-aosp

* commit '148283d71a7e35b9b506cbb49294b6822719c25e':
  Plumb SMP optimization control through to dexopt.

13 years agoam 63114829: am de9cdfa9: Fix verification of switch offsets in large methods.
Andy McFadden [Wed, 29 Sep 2010 00:38:21 +0000 (17:38 -0700)]
am 63114829: am de9cdfa9: Fix verification of switch offsets in large methods.

Merge commit '63114829802ecdade4c95fe08a02acec67bd17bd'

* commit '63114829802ecdade4c95fe08a02acec67bd17bd':
  Fix verification of switch offsets in large methods.

13 years agoresolved conflicts for merge of 453d1aed to dalvik-dev
buzbee [Tue, 28 Sep 2010 23:48:26 +0000 (16:48 -0700)]
resolved conflicts for merge of 453d1aed to dalvik-dev

Change-Id: Ief387b280581cf1f271c96eb5a2e67154b18db8d

13 years agoPlumb SMP optimization control through to dexopt.
Dan Bornstein [Tue, 28 Sep 2010 22:46:54 +0000 (15:46 -0700)]
Plumb SMP optimization control through to dexopt.

Change-Id: I3bfaf6723e7b14d001f9de60cc1c1fd4f8e1ed99

13 years agoresolved conflicts for merge of 2e75e47d to master
buzbee [Tue, 28 Sep 2010 22:22:48 +0000 (15:22 -0700)]
resolved conflicts for merge of 2e75e47d to master

Change-Id: I644b3cd50e3c63b209741c8b818b4c1435ee8218

13 years agoam de9cdfa9: Fix verification of switch offsets in large methods.
Andy McFadden [Tue, 28 Sep 2010 22:15:04 +0000 (15:15 -0700)]
am de9cdfa9: Fix verification of switch offsets in large methods.

Merge commit 'de9cdfa9d6d5fa5c46a0ec0f3f1e8de08a688841' into gingerbread-plus-aosp

* commit 'de9cdfa9d6d5fa5c46a0ec0f3f1e8de08a688841':
  Fix verification of switch offsets in large methods.

13 years agoFixed bug in OP_GOTO_32.S, added support for additional parameters to dvmHandleStackO...
Johnnie Birch [Tue, 28 Sep 2010 21:58:37 +0000 (14:58 -0700)]
Fixed bug in OP_GOTO_32.S, added support for additional parameters to dvmHandleStackOverflow

Change-Id: I4d8d75418395661ffc8e7055eeb4600bb5b8b0bc

13 years agoFix verification of switch offsets in large methods.
Andy McFadden [Tue, 28 Sep 2010 21:43:28 +0000 (14:43 -0700)]
Fix verification of switch offsets in large methods.

The verifier was only using the low 16 bits when checking the offset
to a switch table.  This was failing on really large methods.

We also blew up the arbitrary size cap again, so I made it a warning
rather than a failure (it really wasn't doing anybody any good).

Changed to width-specific types for the various offsets and sizes.

Bug 3044850.

(cherry-pick+squash from dalvik-dev)

Change-Id: Ic7ebb86728cb39151f617a3e69e1c1994e61b5d9

13 years agoUpdate Call386ABI.S to support 16 byte alignment
Johnnie Birch [Tue, 28 Sep 2010 21:39:15 +0000 (14:39 -0700)]
Update Call386ABI.S to support 16 byte alignment

Change-Id: I61125ffab37f728665a91907bb699a0568568418

13 years agoBlargh.
Andy McFadden [Tue, 28 Sep 2010 21:37:31 +0000 (14:37 -0700)]
Blargh.

Somehow this didn't get written out.  Goes with
https://android-git.corp.google.com/g/#change,70744

Change-Id: I6e5e0e189d6622c612d26a1b18899a7d9b006a4c

13 years agoMerge "Fix verification of switch offsets in large methods." into dalvik-dev
Andy McFadden [Tue, 28 Sep 2010 21:27:42 +0000 (14:27 -0700)]
Merge "Fix verification of switch offsets in large methods." into dalvik-dev