OSDN Git Service

android-x86/dalvik.git
13 years agoam 5a57e766: Merge "Change dx.bat to Windows EOL."
Raphael Moll [Mon, 11 Jul 2011 23:57:50 +0000 (16:57 -0700)]
am 5a57e766: Merge "Change dx.bat to Windows EOL."

* commit '5a57e766a662184902e215b52cb943e02d9fa827':
  Change dx.bat to Windows EOL.

13 years agoMerge "Change dx.bat to Windows EOL."
Raphael Moll [Mon, 11 Jul 2011 23:50:51 +0000 (16:50 -0700)]
Merge "Change dx.bat to Windows EOL."

13 years agoChange dx.bat to Windows EOL.
Raphael Moll [Mon, 11 Jul 2011 22:16:34 +0000 (18:16 -0400)]
Change dx.bat to Windows EOL.

Change-Id: I0adc6101297e8491814599d345b3cfd3278837cd

13 years agoresolved conflicts for merge of d0d351b2 to gingerbread-plus-aosp
David 'Digit' Turner [Mon, 11 Jul 2011 21:20:22 +0000 (23:20 +0200)]
resolved conflicts for merge of d0d351b2 to gingerbread-plus-aosp

Change-Id: I1594c21fb3dd761b1e2275be2019ec139cf64174

13 years agomerge intel x86 patches into gingerbread branch
David 'Digit' Turner [Fri, 8 Jul 2011 16:19:01 +0000 (18:19 +0200)]
merge intel x86 patches into gingerbread branch

13 years agoMerge "Undecoded jobject leaking in through attachThread"
Elliott Hughes [Wed, 22 Jun 2011 16:25:01 +0000 (09:25 -0700)]
Merge "Undecoded jobject leaking in through attachThread"

13 years agoOnly use O_BINARY if it is defined (windows compatibility)
Bruce Beare [Mon, 6 Jun 2011 17:50:57 +0000 (10:50 -0700)]
Only use O_BINARY if it is defined (windows compatibility)

Change-Id: Iaa3c0812ef4d90d46b4031be7f4faca84c7d7200
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
13 years agoUpdate to allow x86-atom build for FI on Gingerbread
Johnnie Birch [Fri, 18 Feb 2011 18:06:23 +0000 (10:06 -0800)]
Update to allow x86-atom build for FI on Gingerbread

Also handles most TODO.txt items and contains some rewriting of the dispatch code.
Also adds a newline to the end of files that did not previously end with a newline.

Change-Id: Ifa627ac3d493447013524eb0be178b5b6d952612

13 years agoCombined patch from master branch
Bruce Beare [Wed, 1 Jun 2011 22:10:47 +0000 (15:10 -0700)]
Combined patch from master branch

  From: Jack Ren <jack.ren@intel.com>
  Date: Tue, 1 Mar 2011 21:10:42 +0800
  Subject: [PATCH 1/2] sync with korg/master commit dd19f5b91a1032e60871febb143850fd81000c5a

following patches are applied in one time:

commit dd19f5b91a1032e60871febb143850fd81000c5a
Merge: 2b3d7e8 a62c84f
Author: Romain Guy <romainguy@android.com>
Date:   Thu Feb 24 11:24:47 2011 -0800

    Merge "Fix for a crash when GC weak references."

commit 2b3d7e8eccd7cbf64b2ac41c05073a9191d0d3b3
Merge: ef4b061 b4719ed
Author: Raphael Moll <ralf@android.com>
Date:   Tue Feb 22 14:55:59 2011 -0800

    Merge "Open dexdump files in binary mode."

commit b4719eda048c4dc4a4b6e5280c7a2b8299051078
Author: Raphael Moll <ralf@android.com>
Date:   Wed Feb 16 13:39:27 2011 -0800

    Open dexdump files in binary mode.

    Requires change Ia5c0a59e from system/core
    (which defines O_BINARY globally.)

commit a62c84f62a27a08d6bef6da0b96913d616dd659f
Author: Mattias Petersson <mattias.petersson@sonyericsson.com>
Date:   Tue Dec 21 09:28:04 2010 +0100

    Fix for a crash when GC weak references.

    When a weak reference had been cleared there was a small risk that
    the VM crashed when the cleared reference was garbage collected.

    This is an example of code that can cause the problem:
       Integer referent = new Integer(10);
       wref = new WeakReference<Integer>(referent);
       wref.clear(); //set the referent to null

    When a garbage collection starts, all objects are scanned, looking
    for objects that can be collected. During this phase, a list of
    weak references is created. A check is performed to ensure that
    only references with a non-null referent are added to this list.
    In most cases, for the example above, the referent will be null
    at this point, and it will never be added to the list. But if
    the timing is extremely bad it looks like it is possible for the
    reference to end up on the list before the referent has been set
    to null, and the referent is set to null a little while later.
    This means that we now have a reference on the list with a null
    referent.

    A bit later in the garbage collection flow, the list of weak

s is traversed in order to clear the references that
    can be collected. Here we got the crash because the code asserted
    that the referent of the references in the list should be
    non-null. And in some rare cases it actually was null. The fix
    is simply to remove the assert.

commit ef4b0613d6952770aefac07d503955eb7b962d2b
Merge: 464104b e9503ef
Author: Andy McFadden <fadden@android.com>
Date:   Mon Nov 8 19:38:19 2010 -0800

    am e9503ef8: am 886130bc: (-s ours) Two patches.

    * commit 'e9503ef8c460f4818062ecc80a9e0b4f8c6745b8':
      Two patches.

Change-Id: I04c1c9204af8197a4352358d805af40f1312d2ea
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
13 years agoUndecoded jobject leaking in through attachThread
Mark Gordon [Fri, 20 May 2011 21:18:36 +0000 (17:18 -0400)]
Undecoded jobject leaking in through attachThread

Change-Id: I6b03227dc07d53862467395531b8dca07d2381ef

13 years agoMerge "Update to allow x86-atom build for FI on Gingerbread"
David Turner [Sat, 5 Mar 2011 09:08:13 +0000 (01:08 -0800)]
Merge "Update to allow x86-atom build for FI on Gingerbread"

13 years agoam dd19f5b9: Merge "Fix for a crash when GC weak references."
Romain Guy [Tue, 1 Mar 2011 20:39:47 +0000 (12:39 -0800)]
am dd19f5b9: Merge "Fix for a crash when GC weak references."

* commit 'dd19f5b91a1032e60871febb143850fd81000c5a':
  Fix for a crash when GC weak references.

13 years agoam 2b3d7e8e: Merge "Open dexdump files in binary mode."
Raphael Moll [Tue, 1 Mar 2011 20:39:44 +0000 (12:39 -0800)]
am 2b3d7e8e: Merge "Open dexdump files in binary mode."

* commit '2b3d7e8eccd7cbf64b2ac41c05073a9191d0d3b3':
  Open dexdump files in binary mode.

13 years agoMerge "Fix for a crash when GC weak references."
Romain Guy [Thu, 24 Feb 2011 19:24:47 +0000 (11:24 -0800)]
Merge "Fix for a crash when GC weak references."

13 years agoMerge "Open dexdump files in binary mode."
Raphael Moll [Tue, 22 Feb 2011 22:55:59 +0000 (14:55 -0800)]
Merge "Open dexdump files in binary mode."

13 years agoUpdate to allow x86-atom build for FI on Gingerbread
Johnnie Birch [Fri, 18 Feb 2011 18:06:23 +0000 (10:06 -0800)]
Update to allow x86-atom build for FI on Gingerbread

Also handles most TODO.txt items and contains some rewriting of the dispatch code.
Also adds a newline to the end of files that did not previously end with a newline.

Change-Id: I0cf3e77dc7bbf5ed7ec8538ef4d7d8740e296640

13 years agoOpen dexdump files in binary mode.
Raphael Moll [Wed, 16 Feb 2011 21:39:27 +0000 (13:39 -0800)]
Open dexdump files in binary mode.

Requires change Ia5c0a59e from system/core
(which defines O_BINARY globally.)

Change-Id: If814608ee9662190a7cf80aae2ad2451d88364ae

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

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

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

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

Bug: 3399673
Change-Id: Ic7d795e5d397548e9d6d8c11a585d86838cf8a44

13 years agoam 6ad1992b: am 70b130f5: (-s ours) Clean up/out some comments. DO NOT MERGE.
Dan Bornstein [Fri, 14 Jan 2011 20:39:45 +0000 (12:39 -0800)]
am 6ad1992b: am 70b130f5: (-s ours) Clean up/out some comments. DO NOT MERGE.

* commit '6ad1992b311937963d44be68f3ec0255a87d82b8':
  Clean up/out some comments. DO NOT MERGE.

13 years agoam 70b130f5: (-s ours) Clean up/out some comments. DO NOT MERGE.
Dan Bornstein [Fri, 14 Jan 2011 20:37:13 +0000 (12:37 -0800)]
am 70b130f5: (-s ours) Clean up/out some comments. DO NOT MERGE.

* commit '70b130f5398c43418b6eacba2cc09f71d9febdc4':
  Clean up/out some comments. DO NOT MERGE.

13 years agoClean up/out some comments. DO NOT MERGE.
Dan Bornstein [Fri, 14 Jan 2011 20:26:12 +0000 (12:26 -0800)]
Clean up/out some comments. DO NOT MERGE.

Change-Id: I16063cf9132e0f2d6556ce06e1ebfb90ecff05aa

13 years agoam f741b8e1: am 80a30431: (-s ours) Remove some pointless tests.
Dan Bornstein [Thu, 13 Jan 2011 22:35:55 +0000 (14:35 -0800)]
am f741b8e1: am 80a30431: (-s ours) Remove some pointless tests.

* commit 'f741b8e112834cb3c140ca81890dc41126649dee':
  Remove some pointless tests.

13 years agoam 80a30431: (-s ours) Remove some pointless tests.
Dan Bornstein [Thu, 13 Jan 2011 22:33:39 +0000 (14:33 -0800)]
am 80a30431: (-s ours) Remove some pointless tests.

* commit '80a30431fa6c92433d2602c159bc71dd81c62c8f':
  Remove some pointless tests.

13 years agoRemove some pointless tests.
Dan Bornstein [Thu, 13 Jan 2011 20:46:28 +0000 (12:46 -0800)]
Remove some pointless tests.

Change-Id: Ibaaf74fbdffd6c08af48cac50ef62a05e8473899

13 years agoam 4d7dd569: Handle the case of referent clearing during tracing.
Carl Shapiro [Wed, 12 Jan 2011 18:49:25 +0000 (10:49 -0800)]
am 4d7dd569: Handle the case of referent clearing during tracing.

* commit '4d7dd56902150ab8db4c20a191bad112928839e9':
  Handle the case of referent clearing during tracing.

13 years agoHandle the case of referent clearing during tracing.
Carl Shapiro [Wed, 12 Jan 2011 01:16:48 +0000 (17:16 -0800)]
Handle the case of referent clearing during tracing.

Reference objects with non-null referent fields are collected during
tracing for processing after the trace has completed.  Before the
trace was made concurrent there was no way for a reference with a
non-null referent field to have its referent become null by any action
of the garbage collector after it was discovered.  Assertions were
placed in the reference processing code to check this invariant.

After the trace was made concurrent it became possible for a user to
clear the referent field of an already discovered reference.  This
violates the assertions in the reference processing code.

This change replaces the assertions in the reference processing code
with logic to deal with null referent fields.  The assert in the
SoftReference preservation code has been converted to a continue that
short circuits the preservation logic.  The assert in the white
reference clearing code short circuits the clearing and enqueueing.

Bug: 3342757
Change-Id: I967b011485e2691b2752500a3488fbcb54f129d3

13 years agoam 6159ef45: Parameterize instance counting to include subclasses.
Carl Shapiro [Sat, 8 Jan 2011 02:46:57 +0000 (18:46 -0800)]
am 6159ef45: Parameterize instance counting to include subclasses.

* commit '6159ef4520073ae8e7ce7b7d1f7648b161a33302':
  Parameterize instance counting to include subclasses.

13 years agoParameterize instance counting to include subclasses.
Carl Shapiro [Thu, 4 Nov 2010 22:12:09 +0000 (15:12 -0700)]
Parameterize instance counting to include subclasses.

13 years agoFix for a crash when GC weak references.
Mattias Petersson [Tue, 21 Dec 2010 08:28:04 +0000 (09:28 +0100)]
Fix for a crash when GC weak references.

When a weak reference had been cleared there was a small risk that
the VM crashed when the cleared reference was garbage collected.

This is an example of code that can cause the problem:
   Integer referent = new Integer(10);
   wref = new WeakReference<Integer>(referent);
   wref.clear(); //set the referent to null

When a garbage collection starts, all objects are scanned, looking
for objects that can be collected. During this phase, a list of
weak references is created. A check is performed to ensure that
only references with a non-null referent are added to this list.
In most cases, for the example above, the referent will be null
at this point, and it will never be added to the list. But if
the timing is extremely bad it looks like it is possible for the
reference to end up on the list before the referent has been set
to null, and the referent is set to null a little while later.
This means that we now have a reference on the list with a null
referent.

A bit later in the garbage collection flow, the list of weak
references is traversed in order to clear the references that
can be collected. Here we got the crash because the code asserted
that the referent of the references in the list should be
non-null. And in some rare cases it actually was null. The fix
is simply to remove the assert.

Change-Id: I722b51008f3d6f69abd13490663bef8010c96847

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

14 years agoam e9503ef8: am 886130bc: (-s ours) Two patches.
Andy McFadden [Tue, 9 Nov 2010 03:38:19 +0000 (19:38 -0800)]
am e9503ef8: am 886130bc: (-s ours) Two patches.

* commit 'e9503ef8c460f4818062ecc80a9e0b4f8c6745b8':
  Two patches.

14 years agoam 886130bc: (-s ours) Two patches.
Andy McFadden [Tue, 9 Nov 2010 02:13:32 +0000 (18:13 -0800)]
am 886130bc: (-s ours) Two patches.

* commit '886130bc7ff992940e152636f57072e58c91aa2e':
  Two patches.

14 years agoTwo patches.
Andy McFadden [Tue, 9 Nov 2010 01:05:39 +0000 (17:05 -0800)]
Two patches.

Patch 1a+1b: Set capabilities sooner.

(cherry-pick from gingerbread I22fde728bd5d65774f8fdf1fa45956fe18358c4c)
(hand-pick from gingerbread Ief58bdfff2cb82d7824ef796c2c1031f525f6ee9,
 plus minor tweak to avoid altering the API)

Patch 3: If there's an error dropping privileges, abort.

(cherry-pick from gingerbread I85ce12e93cb8c297add756dc3b872b8346eda00b)

Bug 3176774

Change-Id: If8285d7bfd5a466bd77c0f7ffadf1bf96d31db06

14 years agoam 1fe34326: am fbe51551: (-s ours) Remove a pointless test, which just tested a...
Dan Bornstein [Sat, 30 Oct 2010 01:30:57 +0000 (18:30 -0700)]
am 1fe34326: am fbe51551: (-s ours) Remove a pointless test, which just tested a test support class.

* commit '1fe3432661f96bf57b1e3bd91c3c01bd7564e6ae':
  Remove a pointless test, which just tested a test support class.

14 years agoam fbe51551: (-s ours) Remove a pointless test, which just tested a test support...
Dan Bornstein [Sat, 30 Oct 2010 01:29:27 +0000 (18:29 -0700)]
am fbe51551: (-s ours) Remove a pointless test, which just tested a test support class.

* commit 'fbe515510323ee65ce594b8eda5547c1cbfb8ad9':
  Remove a pointless test, which just tested a test support class.

14 years agoRemove a pointless test, which just tested a test support class.
Dan Bornstein [Sat, 30 Oct 2010 01:23:19 +0000 (18:23 -0700)]
Remove a pointless test, which just tested a test support class.

Change-Id: Ia6d47860ad71f013fef5631bcd434c2f6f1d346f

14 years agoam 66b96b42: am 3144eec0: (-s ours) Replace the implementation of this class.
Dan Bornstein [Sat, 30 Oct 2010 00:02:39 +0000 (17:02 -0700)]
am 66b96b42: am 3144eec0: (-s ours) Replace the implementation of this class.

* commit '66b96b42ba1d21027b71ca65821648925c661a78':
  Replace the implementation of this class.

14 years agoam 3144eec0: (-s ours) Replace the implementation of this class.
Dan Bornstein [Sat, 30 Oct 2010 00:00:32 +0000 (17:00 -0700)]
am 3144eec0: (-s ours) Replace the implementation of this class.

* commit '3144eec027b6a0de24f024c286e4544b1aca683b':
  Replace the implementation of this class.

14 years agoReplace the implementation of this class.
Dan Bornstein [Fri, 29 Oct 2010 22:27:54 +0000 (15:27 -0700)]
Replace the implementation of this class.

Use the Apache Harmony version.

Change-Id: Ica3b4c69ccd1cd4c91325c52fad5a71695d58ba4

14 years agoam 3cf48016: Set capabilities sooner.
Andy McFadden [Wed, 27 Oct 2010 20:25:34 +0000 (13:25 -0700)]
am 3cf48016: Set capabilities sooner.

14 years agoSet capabilities sooner.
Andy McFadden [Wed, 27 Oct 2010 18:25:13 +0000 (11:25 -0700)]
Set capabilities sooner.

Bug 3135433.

Change-Id: I22fde728bd5d65774f8fdf1fa45956fe18358c4c

14 years agoam 36bd1345: Fix for array lower-bound check for count-down loops.
Ben Cheng [Tue, 26 Oct 2010 17:16:28 +0000 (10:16 -0700)]
am 36bd1345: Fix for array lower-bound check for count-down loops.

14 years agoFix for array lower-bound check for count-down loops.
Ben Cheng [Tue, 26 Oct 2010 03:54:31 +0000 (20:54 -0700)]
Fix for array lower-bound check for count-down loops.

If the counted loop is composed as

for (int i = hi; i >= lo; i--) {
    .. = array[i];
}

The hoisted lower-bound check should be asserting "lo >= 0".
On the other hand if the counted loop is composed as

for (int i = hi; i > lo; i--) {
    .. = array[i];
}

The hoisted lower-bound check should be asserting "lo + 1 >= 0".
Previously these two checks are reversed.

Bug: 3130818
Change-Id: Ibc5a6daa837880e9986e45bbc29d1a5e548be3ae

14 years agoam 2e3ec716: Fix class loader interning following a String.intern.
Carl Shapiro [Wed, 20 Oct 2010 04:37:28 +0000 (21:37 -0700)]
am 2e3ec716: Fix class loader interning following a String.intern.

Merge commit '2e3ec7160b265d520cd755f8c20163410d822373' into gingerbread-plus-aosp

* commit '2e3ec7160b265d520cd755f8c20163410d822373':
  Fix class loader interning following a String.intern.

14 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

14 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.

14 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

14 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

14 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.

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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.

14 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

14 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

14 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

14 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"

14 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.

14 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

14 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

14 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

14 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

14 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"

14 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"

14 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.

14 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

14 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.

14 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

14 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.

14 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

14 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

14 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.

14 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

14 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

14 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

14 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

14 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.

14 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

14 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.

14 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

14 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

14 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.

14 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

14 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.

14 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

14 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.

14 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

14 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

14 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

14 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.