OSDN Git Service

android-x86/dalvik.git
15 years agoMerge change 4657
Android (Google) Code Review [Thu, 18 Jun 2009 21:36:37 +0000 (14:36 -0700)]
Merge change 4657

* changes:
  Method override tests.

15 years agoMethod override tests.
Andy McFadden [Thu, 18 Jun 2009 21:15:23 +0000 (14:15 -0700)]
Method override tests.

Test various method overrides, especially those that the compiler
doesn't allow (public vs. private, static vs. virtual).  This doesn't
succeed right now because of the way the verifier deals with static and
virtual methods (internal bug 1752800).

15 years agoTrace profiling support for the jit
Bill Buzbee [Wed, 17 Jun 2009 23:56:19 +0000 (16:56 -0700)]
Trace profiling support for the jit

15 years agoModularize architecture selection.
Andy McFadden [Thu, 18 Jun 2009 18:03:12 +0000 (11:03 -0700)]
Modularize architecture selection.

"make" syntax lacks an "elif", so when you have an N-way choice the
indentation starts to get nasty.  This splits the arch/variant handling
into smaller pieces, and uses the "generic" arch if none of the pieces
matched.

15 years agoMerge change 4534
Android (Google) Code Review [Thu, 18 Jun 2009 17:31:48 +0000 (10:31 -0700)]
Merge change 4534

* changes:
  Reduce VM aborts during high CPU stress.

15 years agoMerge change 4495
Android (Google) Code Review [Thu, 18 Jun 2009 00:24:39 +0000 (17:24 -0700)]
Merge change 4495

* changes:
  Implemented peephole optimizations including null-check elimination, redundant ld/st elimination, ad-hoc register renaming and store sinking.

15 years agoReduce VM aborts during high CPU stress.
Andy McFadden [Wed, 17 Jun 2009 23:29:30 +0000 (16:29 -0700)]
Reduce VM aborts during high CPU stress.

The VM has some timeouts that are meant to kill the current process if
something gets stuck (e.g. a thread grabs a lock and then manages to die
while the rest of the process continues on).  These were tripping a
little too easily during some high-load situations.

This changes the order of operations so that we now unlock the "thread
suspend" lock before sending a wakeup broadcast to the condition variable
that threads sleep on.  This should make it less likely for a thread to
be running for an extended period while the lock is held.  (Relates to
internal bug 1664687.)

This also wraps a couple of things (pthread_create, dlopen) with a state
change to VMWAIT.  During high load situations these can take a while to
complete, and we would (with the K-Means Visualizer load generator
running) very occasionally time out.

Augmented the debug output in a couple of minor ways.  Updated comments.

15 years agoUse RFC3493-conformant IPv6 headers.
Lorenzo Colitti [Fri, 12 Jun 2009 02:35:46 +0000 (19:35 -0700)]
Use RFC3493-conformant IPv6 headers.

15 years agoImplemented peephole optimizations including null-check elimination, redundant ld...
Ben Cheng [Tue, 16 Jun 2009 23:11:47 +0000 (16:11 -0700)]
Implemented peephole optimizations including null-check elimination, redundant ld/st elimination, ad-hoc register renaming and store sinking.

15 years agoMerge change 4372
Android (Google) Code Review [Wed, 17 Jun 2009 01:49:39 +0000 (18:49 -0700)]
Merge change 4372

* changes:
  Don't throw away the return value of connect().

15 years agoam 5f9aa938: Merge change 4334 into donut
Android (Google) Code Review [Tue, 16 Jun 2009 23:43:21 +0000 (16:43 -0700)]
am 5f9aa938: Merge change 4334 into donut

Merge commit '5f9aa93881e796a66c2a625ced1ee89292c2b570'

* commit '5f9aa93881e796a66c2a625ced1ee89292c2b570':
  Modified Thread to copy the context class loader from parent to child threads. Re-enabled test that covers this. Removed security-related code from test since it was invalid (the security check

15 years agoMerge change 4335
Android (Google) Code Review [Tue, 16 Jun 2009 21:40:02 +0000 (14:40 -0700)]
Merge change 4335

* changes:
  Add arm vfp support for the Jit

15 years agoMerge change 4334 into donut
Android (Google) Code Review [Tue, 16 Jun 2009 21:36:31 +0000 (14:36 -0700)]
Merge change 4334 into donut

* changes:
  Modified Thread to copy the context class loader from parent to child threads. Re-enabled test that covers this. Removed security-related code from test since it was invalid (the security check     doesn't occur if the calling code's class loader is an ancestor of the context class loader).

15 years agoAdd arm vfp support for the Jit
Bill Buzbee [Tue, 16 Jun 2009 00:00:57 +0000 (17:00 -0700)]
Add arm vfp support for the Jit

15 years agoDon't throw away the return value of connect().
Lorenzo Colitti [Tue, 16 Jun 2009 19:43:23 +0000 (12:43 -0700)]
Don't throw away the return value of connect().

15 years agoDon't init class during reflection signature scan.
Andy McFadden [Tue, 16 Jun 2009 19:10:04 +0000 (12:10 -0700)]
Don't init class during reflection signature scan.

When processing Class.getDeclaredMethods() we create Method objects.
These have arrays of classes that indicate the method parameter types.
While generating the array we were initializing the classes we found,
which isn't necessary and led to some unpleasantness described in
external bug 3005.

15 years agoModified Thread to copy the context class loader from parent to child threads. Re...
crazybob [Tue, 16 Jun 2009 17:01:05 +0000 (12:01 -0500)]
Modified Thread to copy the context class loader from parent to child threads. Re-enabled test that covers this. Removed security-related code from test since it was invalid (the security check
    doesn't occur if the calling code's class loader is an ancestor of the context class loader).

15 years agoMerge change 4254
Android (Google) Code Review [Tue, 16 Jun 2009 14:20:44 +0000 (07:20 -0700)]
Merge change 4254

* changes:
  Treat some right shifts as narrowing conversions.

15 years agoDefine wrappers for connect() and bind() to support IPv6.
Lorenzo Colitti [Mon, 15 Jun 2009 18:02:24 +0000 (11:02 -0700)]
Define wrappers for connect() and bind() to support IPv6.

15 years agoTreat some right shifts as narrowing conversions.
Andy McFadden [Fri, 12 Jun 2009 14:26:17 +0000 (07:26 -0700)]
Treat some right shifts as narrowing conversions.

Java bytecode optimizers like ProGuard will remove explicit integer
width conversions from certain sequences.  For example, after
right-shifting an integer 24 times, an int-to-byte instruction is
redundant.

This change teaches the verifier that right shifts sometimes reduce
(or at least don't increase) the width of an integer.  Previously, the
result of a right shift was always a full-sized int.

15 years agoam ed3c841b: Adding: QuoVadis Root Certification Authority QuoVadis Root CA 2 ...
Nagendra Modadugu [Mon, 15 Jun 2009 20:56:55 +0000 (13:56 -0700)]
am ed3c841b: Adding:  QuoVadis Root Certification Authority  QuoVadis Root CA 2  QuoVadis Root CA 3

Merge commit 'ed3c841bc7f1100ad827146bae062e5458812fa9'

* commit 'ed3c841bc7f1100ad827146bae062e5458812fa9':
  Adding:

15 years agoAdding:
Nagendra Modadugu [Mon, 15 Jun 2009 20:34:41 +0000 (13:34 -0700)]
Adding:
QuoVadis Root Certification Authority
QuoVadis Root CA 2
QuoVadis Root CA 3

15 years agoam 593d6c7c: Copy the correct number of bytes for IPv6 addresses in InetAddress_getho...
Lorenzo Colitti [Mon, 15 Jun 2009 18:39:29 +0000 (11:39 -0700)]
am 593d6c7c: Copy the correct number of bytes for IPv6 addresses in InetAddress_gethostbyaddr

Merge commit '593d6c7c4c08c82b361dcc08c20a0120aaaacf49'

* commit '593d6c7c4c08c82b361dcc08c20a0120aaaacf49':
  Copy the correct number of bytes for IPv6 addresses in InetAddress_gethostbyaddr

15 years agoMerge change 4123
Android (Google) Code Review [Mon, 15 Jun 2009 14:20:57 +0000 (07:20 -0700)]
Merge change 4123

* changes:
  Added a VFP utility function for future use.

15 years agoCopy the correct number of bytes for IPv6 addresses in InetAddress_gethostbyaddr
Lorenzo Colitti [Sat, 13 Jun 2009 00:54:23 +0000 (17:54 -0700)]
Copy the correct number of bytes for IPv6 addresses in InetAddress_gethostbyaddr

15 years agoAdded a VFP utility function for future use.
Andy McFadden [Fri, 12 Jun 2009 23:58:02 +0000 (16:58 -0700)]
Added a VFP utility function for future use.

15 years agoam 729c7056: Test and fix for the ArrayList.addAll(), bug 2954.
Jesse Wilson [Fri, 12 Jun 2009 15:26:16 +0000 (08:26 -0700)]
am 729c7056: Test and fix for the ArrayList.addAll(), bug 2954.

Merge commit '729c70568dac17c7178bbeccdde39fc21b9d5c1c'

* commit '729c70568dac17c7178bbeccdde39fc21b9d5c1c':
  Test and fix for the ArrayList.addAll(), bug 2954.

15 years agoMerge change 3997
Android (Google) Code Review [Fri, 12 Jun 2009 14:27:46 +0000 (07:27 -0700)]
Merge change 3997

* changes:
  Rename vfp to arm-vfp.

15 years agoTest and fix for the ArrayList.addAll(), bug 2954.
Jesse Wilson [Fri, 12 Jun 2009 00:35:12 +0000 (17:35 -0700)]
Test and fix for the ArrayList.addAll(), bug 2954.

15 years agoMerge change 4006
Android (Google) Code Review [Fri, 12 Jun 2009 00:46:33 +0000 (17:46 -0700)]
Merge change 4006

* changes:
  Test and fix for the ArrayList.addAll(), bug 2954.

15 years agoTest and fix for the ArrayList.addAll(), bug 2954.
Jesse Wilson [Fri, 12 Jun 2009 00:35:12 +0000 (17:35 -0700)]
Test and fix for the ArrayList.addAll(), bug 2954.

15 years agoRename vfp to arm-vfp.
Andy McFadden [Fri, 12 Jun 2009 00:10:29 +0000 (17:10 -0700)]
Rename vfp to arm-vfp.

15 years agoGive dx a large max heap size by default.
Dan Bornstein [Thu, 11 Jun 2009 22:03:11 +0000 (15:03 -0700)]
Give dx a large max heap size by default.

15 years agoMerge change 2279
Android (Google) Code Review [Thu, 11 Jun 2009 21:54:36 +0000 (14:54 -0700)]
Merge change 2279

* changes:
  Updating archive to Harmony r772995.

15 years agoam 32c0ded2: Fix internal issue #1898791 ("PlatformAddressFactory PlatformAddress...
Dan Bornstein [Wed, 10 Jun 2009 23:31:46 +0000 (16:31 -0700)]
am 32c0ded2: Fix internal issue #1898791 ("PlatformAddressFactory PlatformAddress cache causes memory to not be freed in a timely manner.").

Merge commit '32c0ded21ec8cd40f27015b4e65ec6a1bd78ef9a'

* commit '32c0ded21ec8cd40f27015b4e65ec6a1bd78ef9a':
  Fix internal issue #1898791 ("PlatformAddressFactory PlatformAddress cache

15 years agoMerge change 3764
Android (Google) Code Review [Wed, 10 Jun 2009 22:13:32 +0000 (15:13 -0700)]
Merge change 3764

* changes:
  Allow {iput,sput}-boolean on a byte value.

15 years agoAllow {iput,sput}-boolean on a byte value.
Andy McFadden [Wed, 10 Jun 2009 21:11:07 +0000 (14:11 -0700)]
Allow {iput,sput}-boolean on a byte value.

javac generates code that can only be understood as storing a byte value
into a boolean field.  The verifier now allows this.

15 years agoFix internal issue #1898791 ("PlatformAddressFactory PlatformAddress cache
Dan Bornstein [Wed, 10 Jun 2009 20:05:51 +0000 (13:05 -0700)]
Fix internal issue #1898791 ("PlatformAddressFactory PlatformAddress cache
causes memory to not be freed in a timely manner.").

The change makes the two PlatformAddressFactory.alloc() methods always
allocate separate PlatformAddress objects instead of looking for them
in the cache. This means that, should they have auto-free turned on,
there won't be a reference in the cache that prevents the freeing from
happening. And since we're talking about freshly-allocated memory anyway,
it would be surprising that either a matching address would be found in
cache *or* that a subsequent call to on() would ever happen with the
same address. So, it's a win on several fronts.

15 years agoMerge change 3512
Android (Google) Code Review [Wed, 10 Jun 2009 17:46:30 +0000 (10:46 -0700)]
Merge change 3512

* changes:
  At least mostly-fix internal issue #1898095 / public issue #2868.

15 years agoMerge change 3625
Android (Google) Code Review [Tue, 9 Jun 2009 23:37:04 +0000 (16:37 -0700)]
Merge change 3625

* changes:
  Bump from 1.0.1 to 1.1.0.

15 years agoAt least mostly-fix internal issue #1898095 / public issue #2868.
Dan Bornstein [Tue, 9 Jun 2009 00:21:06 +0000 (17:21 -0700)]
At least mostly-fix internal issue #1898095 / public issue #2868.

The problem is that Scala code may have two variables with the same
name that are simultaneously active, and dx didn't expect that ever to
be the case. The fix is simply to catch another case where a local
variable might be considered to become superfluous due to having an
empty extent. However, this is really more of a workaround, as the
result will be that such code when attached to a debugger will only
show one of the two (or more) same-named variables as being active at
any given time.

The thing that prevents a more satisfactory solution is that the
optimization code can end up "splitting up" a single local into
multiple registers, and the only way we have to track them is by
name/type. So, even without Scala's rules, it was already possible to
find a same-named local in multiple registers, but with the status
quo, finding that really meant that a local was moving from one
register to another. The local variable table code handles that case
by automatically "ending" variables that appear to move, and the Scala
case looks just like that.

In the long run, we probably want to have a way to tag local variables
that isn't just name/type, but that will have to come later.

(As a bonus, I did some minor renaming for clarity while I was in the
territory.)

15 years agoUpdating archive to Harmony r772995.
Jesse Wilson [Fri, 22 May 2009 00:39:08 +0000 (17:39 -0700)]
Updating archive to Harmony r772995.

Squashed commit of the following:
    Adding @TestTargetNew tags

    Initial merge of branch 'archive_772995' into archive_dalvik.

    Fixed some problems, including InflaterInputStream.available()
    and JarFile.skip() bugs.

    Conflicts:
     libcore/archive/.classpath
     libcore/archive/META-INF/MANIFEST.MF
     libcore/archive/build.xml
     libcore/archive/make/hyproperties.xml
     libcore/archive/src/main/java/java/util/jar/Attributes.java
     libcore/archive/src/main/java/java/util/jar/JarEntry.java
     libcore/archive/src/main/java/java/util/jar/JarException.java
     libcore/archive/src/main/java/java/util/jar/JarFile.java
     libcore/archive/src/main/java/java/util/jar/JarInputStream.java
     libcore/archive/src/main/java/java/util/jar/JarVerifier.java
     libcore/archive/src/main/java/java/util/jar/Manifest.java
     libcore/archive/src/main/java/java/util/jar/Pack200.java
     libcore/archive/src/main/java/java/util/zip/Adler32.java
     libcore/archive/src/main/java/java/util/zip/CRC32.java
     libcore/archive/src/main/java/java/util/zip/Checksum.java
     libcore/archive/src/main/java/java/util/zip/DataFormatException.java
     libcore/archive/src/main/java/java/util/zip/Deflater.java
     libcore/archive/src/main/java/java/util/zip/DeflaterOutputStream.java
     libcore/archive/src/main/java/java/util/zip/GZIPInputStream.java
     libcore/archive/src/main/java/java/util/zip/GZIPOutputStream.java
     libcore/archive/src/main/java/java/util/zip/Inflater.java
     libcore/archive/src/main/java/java/util/zip/InflaterInputStream.java
     libcore/archive/src/main/java/java/util/zip/ZipEntry.java
     libcore/archive/src/main/java/java/util/zip/ZipException.java
     libcore/archive/src/main/java/java/util/zip/ZipFile.java
     libcore/archive/src/main/java/java/util/zip/ZipInputStream.java
     libcore/archive/src/main/java/java/util/zip/ZipOutputStream.java
     libcore/archive/src/main/java/org/apache/harmony/archive/internal/nls/Messages.java
     libcore/archive/src/main/native/archive/shared/archiveglob.c
     libcore/archive/src/main/native/archive/shared/jarfile.c
     libcore/archive/src/main/native/archive/shared/zip.c
     libcore/archive/src/main/native/archive/shared/zip.h
     libcore/archive/src/main/native/archive/unix/makefile
     libcore/archive/src/main/native/archive/windows/makefile
     libcore/archive/src/main/native/java_util_zip_Adler32.c
     libcore/archive/src/main/native/java_util_zip_CRC32.c
     libcore/archive/src/main/native/java_util_zip_Deflater.c
     libcore/archive/src/main/native/java_util_zip_Inflater.c
     libcore/archive/src/main/native/zip/shared/hyzip.nls
     libcore/archive/src/main/native/zip/unix/makefile
     libcore/archive/src/main/native/zipsup.h
     libcore/archive/src/main/native/zlib/unix/makefile
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/AttributesNameTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/AttributesTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarEntryTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarInputStreamTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarOutputStreamTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/ManifestTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPInputStreamTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPOutputStreamTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java

commit 946f165f5b592f4453fd8f2c19766921544d38dd
Author: Jesse Wilson <jessewilson@google.com>
Date:   Tue May 12 15:12:55 2009 -0700

    Strip @Since Android 1.0 from Archive

commit 3498f216d7e826bfc9c4cc7c0da35830ca239367
Author: Jesse Wilson <jessewilson@google.com>
Date:   Tue May 12 15:09:05 2009 -0700

    Dalvik archive

commit 62e9db90bc6aa6b5d1c897cccdd616d812672677
Author: Jesse Wilson <jessewilson@google.com>
Date:   Tue May 12 15:07:51 2009 -0700

    Archive 772995

commit d1bf618681d6badf1b50edaf204a083d3912213d
Author: Jesse Wilson <jessewilson@google.com>
Date:   Tue May 12 15:06:36 2009 -0700

    Archive 527399

15 years agoBump from 1.0.1 to 1.1.0.
Andy McFadden [Tue, 9 Jun 2009 21:15:53 +0000 (14:15 -0700)]
Bump from 1.0.1 to 1.1.0.

Give it a bump for JIT and precise GC.

15 years agoMakes the primary Jit table growable. Also includes a change suggested earlier by...
Bill Buzbee [Tue, 9 Jun 2009 16:20:16 +0000 (09:20 -0700)]
Makes the primary Jit table growable.  Also includes a change suggested earlier by Dan to use a pre-defined mask in the hash function.  Reduce the default JitTable size from 2048 entries to 512 entries.
Update per Ben's comments.

15 years agoMerge change 3531
Android (Google) Code Review [Tue, 9 Jun 2009 17:30:24 +0000 (10:30 -0700)]
Merge change 3531

* changes:
  Fix two codegen problems: out-of-bound PC-relative addresses and missing branch to the chaining cell at the end of non-branch-ending basic blocks.

15 years agoFix two codegen problems: out-of-bound PC-relative addresses and missing branch to...
Ben Cheng [Tue, 9 Jun 2009 01:25:27 +0000 (18:25 -0700)]
Fix two codegen problems: out-of-bound PC-relative addresses and missing branch to the chaining cell at the end of non-branch-ending basic blocks.

15 years agoCorrect instruction width for move-wide/16.
Andy McFadden [Mon, 8 Jun 2009 17:36:02 +0000 (10:36 -0700)]
Correct instruction width for move-wide/16.

We were advancing the PC by 2 code units instead of 3, which made the VM
crash whenever the instruction was used.

15 years ago"resolved conflicts for merge of 3a73bd to master"
Andy McFadden [Fri, 5 Jun 2009 23:47:44 +0000 (16:47 -0700)]
"resolved conflicts for merge of 3a73bd to master"

15 years agoSupport for stopping all threads in a Jit environment.
Bill Buzbee [Fri, 5 Jun 2009 22:36:06 +0000 (15:36 -0700)]
Support for stopping all threads in a Jit environment.

15 years agoMerge change 3378
Android (Google) Code Review [Fri, 5 Jun 2009 23:29:17 +0000 (16:29 -0700)]
Merge change 3378

* changes:
  Swap the meaning of r7 and r8.

15 years agoSwap the meaning of r7 and r8.
Andy McFadden [Fri, 5 Jun 2009 23:19:13 +0000 (16:19 -0700)]
Swap the meaning of r7 and r8.

This swaps rIBASE and rINST, so that we can access rINST with 16-bit
THUMB instructions.

15 years agoremove all references to LogSocket.h
Mathias Agopian [Fri, 5 Jun 2009 22:11:57 +0000 (15:11 -0700)]
remove all references to LogSocket.h

15 years agoFix JNI GetDirectBufferAddress.
Andy McFadden [Fri, 5 Jun 2009 20:36:44 +0000 (13:36 -0700)]
Fix JNI GetDirectBufferAddress.

The GetDirectBufferAddress JNI function was using the buffer's base
address, rather than it's "effective" base address.  The difference
becomes important when you create a direct buffer by "slicing" it off
of another at a nonzero offset.

For internal bug 1898762.

15 years agoHandle profiling buffer underrun.
Andy McFadden [Fri, 5 Jun 2009 00:00:58 +0000 (17:00 -0700)]
Handle profiling buffer underrun.

In rare circumstances it's possible for the thread executing the "stop
profiling" method to start processing the data before all other threads
have finished writing data.  In particular, it's possible for a thread
to be switched out after advancing the offset pointer but before writing
actual data.

This is problematic because the buffer is expected to contain method
pointers.  The fill value (0xee) does not yield a valid pointer.

This adds a short usleep() to reduce the likelihood of the problem
occurring, and adds a buffer scan to detect partial records.  When
encountered, the rest of the log is truncated.

For internal bug 1861898.

15 years agoFix the sim build on systems that have old versions of the glibc headers.
Lorenzo Colitti [Thu, 4 Jun 2009 23:32:29 +0000 (16:32 -0700)]
Fix the sim build on systems that have old versions of the glibc headers.

15 years agoMerge change 3242
Android (Google) Code Review [Thu, 4 Jun 2009 22:52:17 +0000 (15:52 -0700)]
Merge change 3242

* changes:
  Move LOG_TAG above the includes.

15 years agoMove LOG_TAG above the includes.
Andy McFadden [Thu, 4 Jun 2009 22:43:57 +0000 (15:43 -0700)]
Move LOG_TAG above the includes.

This avoids a "LOG_TAG redefined" warning from log.h.

15 years agoMerge change 3222
Android (Google) Code Review [Thu, 4 Jun 2009 22:23:56 +0000 (15:23 -0700)]
Merge change 3222

* changes:
  Unbreak sim build.

15 years agoMerge change 2832
Android (Google) Code Review [Thu, 4 Jun 2009 22:10:51 +0000 (15:10 -0700)]
Merge change 2832

* changes:
  Initial port of the Dalvik JIT enging to the internal repository. Fixed files with trailing spaces. Addressed review comments from Dan. Addressed review comments from fadden. Addressed review comments from Dan x 2. Addressed review comments from Dan x 3.

15 years agoUnbreak sim build.
Lorenzo Colitti [Thu, 4 Jun 2009 21:55:58 +0000 (14:55 -0700)]
Unbreak sim build.

15 years agoInitial port of the Dalvik JIT enging to the internal repository.
Ben Cheng [Mon, 1 Jun 2009 20:00:29 +0000 (13:00 -0700)]
Initial port of the Dalvik JIT enging to the internal repository.
Fixed files with trailing spaces.
Addressed review comments from Dan.
Addressed review comments from fadden.
Addressed review comments from Dan x 2.
Addressed review comments from Dan x 3.

15 years agoRetry on all ADB failures.
Andy McFadden [Wed, 3 Jun 2009 22:53:27 +0000 (15:53 -0700)]
Retry on all ADB failures.

Change 2644 added retries when ADB went away.  The VM occasionally
thinks it has reconnected to adbd as it's dying, which caused a
different type of failure, and the JDWP thread went off to sulk.

This rearranges the failure handling some more, so that all failures
are treated equally (with slight differences in logging).

15 years agoMerge change 2972
Android (Google) Code Review [Wed, 3 Jun 2009 21:28:30 +0000 (14:28 -0700)]
Merge change 2972

* changes:
  Use monotonic clock for HeapWorker trim scheduling.

15 years agoMerge change 2920
Android (Google) Code Review [Wed, 3 Jun 2009 21:26:16 +0000 (14:26 -0700)]
Merge change 2920

* changes:
  Make native socket code address-independent in preparation for IPv6 support.

15 years agoUse monotonic clock for HeapWorker trim scheduling.
Andy McFadden [Tue, 2 Jun 2009 20:42:44 +0000 (13:42 -0700)]
Use monotonic clock for HeapWorker trim scheduling.

We're currently using gettimeofday(), which could get confused if the
wall clock jumps the wrong way.

15 years agoMake native socket code address-independent in preparation for IPv6 support.
Lorenzo Colitti [Tue, 26 May 2009 22:51:50 +0000 (15:51 -0700)]
Make native socket code address-independent in preparation for IPv6 support.

15 years agoFix buffer overrun in DDM heap upload.
Andy McFadden [Wed, 3 Jun 2009 18:32:08 +0000 (11:32 -0700)]
Fix buffer overrun in DDM heap upload.

The HPSG heap upload was using a 4KB buffer.  A test provided by an
external developer is creating massive arrays that need more than 12KB,
so we overran the buffer and trashed the native heap.

This change adds a test to prevent the overrun, and increases the buffer
size to 16KB to accomodate the current maximum heap size.

15 years agoam 29febc56: Merge change 2454 into donut
Android (Google) Code Review [Wed, 3 Jun 2009 09:07:55 +0000 (02:07 -0700)]
am 29febc56: Merge change 2454 into donut

Merge commit '29febc56fd523a7b1684ab04f75d6d213a282f11'

* commit '29febc56fd523a7b1684ab04f75d6d213a282f11':
  Reactivating tests disabled because of ClassLoader loop

15 years agoMerge change 2454 into donut
Android (Google) Code Review [Wed, 3 Jun 2009 09:06:49 +0000 (02:06 -0700)]
Merge change 2454 into donut

* changes:
  Reactivating tests disabled because of ClassLoader loop

15 years agoAdded an explicit "shutting down" flag.
Andy McFadden [Tue, 2 Jun 2009 21:15:22 +0000 (14:15 -0700)]
Added an explicit "shutting down" flag.

Change 2644 made the JdwpAdb stuff retry when the remote side went away.
Unfortunately this also made it retry when the VM wanted to shut down.
Since the JDWP thread is a non-daemon thread, this causes the VM to
stall forever.

This adds an explict flag to allow us to drop out of the retry loop.

15 years agoam 744ab6b4: Merge change 2619 into donut
Android (Google) Code Review [Tue, 2 Jun 2009 07:36:28 +0000 (00:36 -0700)]
am 744ab6b4: Merge change 2619 into donut

Merge commit '744ab6b47555dab886c90dbc720e207e1edefdc0'

* commit '744ab6b47555dab886c90dbc720e207e1edefdc0':
  InetAddress:  Stop logging DNS lookups to logcat.

15 years agoMerge change 2619 into donut
Android (Google) Code Review [Mon, 1 Jun 2009 23:36:01 +0000 (16:36 -0700)]
Merge change 2619 into donut

* changes:
  InetAddress:  Stop logging DNS lookups to logcat.

15 years agoMerge change 2765
Android (Google) Code Review [Mon, 1 Jun 2009 14:25:49 +0000 (07:25 -0700)]
Merge change 2765

* changes:
  Move stuff around in an attempt to make VFP faster.

15 years agoam e406b316: Bug 1844104: Fix buffer overwrite bugs in CharsetEncoderICU and CharsetD...
Mihai Preda [Mon, 1 Jun 2009 13:53:53 +0000 (06:53 -0700)]
am e406b316: Bug 1844104: Fix buffer overwrite bugs in CharsetEncoderICU and CharsetDecoderICU.

Merge commit 'e406b316295f07d40679ce2372051c3b2bce5de4'

* commit 'e406b316295f07d40679ce2372051c3b2bce5de4':
  Bug 1844104: Fix buffer overwrite bugs in CharsetEncoderICU and CharsetDecoderICU.

15 years agoMove stuff around in an attempt to make VFP faster.
Andy McFadden [Fri, 29 May 2009 23:52:17 +0000 (16:52 -0700)]
Move stuff around in an attempt to make VFP faster.

No effect on floating-point benchmarks.  I suspect I've just moving
instructions from one delay slot to another, but I feel a little better
because the delay is in the VFP co-processor instead of the ARM CPU.

15 years agoMerge change 2710
Android (Google) Code Review [Fri, 29 May 2009 20:34:58 +0000 (13:34 -0700)]
Merge change 2710

* changes:
  Rename TARGET_ARCH_VERSION into TARGET_ARCH_VARIANT

15 years agoRename TARGET_ARCH_VERSION into TARGET_ARCH_VARIANT
David 'Digit' Turner [Fri, 29 May 2009 13:23:36 +0000 (15:23 +0200)]
Rename TARGET_ARCH_VERSION into TARGET_ARCH_VARIANT

15 years agoPrevent JDWP thread death when adbd dies.
Andy McFadden [Thu, 28 May 2009 21:55:57 +0000 (14:55 -0700)]
Prevent JDWP thread death when adbd dies.

The handling for "remote side disconnected" was getting folded in with
more severe failures.  This separates the two, returning to the connection
retry loop when adbd disappears.

One side-effect is that the JDWP thread will now wake up every couple of
seconds when adbd isn't running.  Only affects "debuggable" apps.

This also reduces the priority on a couple of log messages.

For internal bug 1844156.

15 years agoInetAddress: Stop logging DNS lookups to logcat.
Mike Lockwood [Thu, 28 May 2009 14:19:17 +0000 (10:19 -0400)]
InetAddress:  Stop logging DNS lookups to logcat.

Logging all DNS lookups system wide raises privacy concerns to me
and might make people less likely to include logs in their bug reports.

Signed-off-by: Mike Lockwood <lockwood@android.com>
15 years agoReactivating tests disabled because of ClassLoader loop
Urs Grob [Wed, 29 Apr 2009 15:01:24 +0000 (17:01 +0200)]
Reactivating tests disabled because of ClassLoader loop

Since ClassLoader.isAncestorOf has been fixed these tests now succeed.
So they can be reactivated.

BUG=1732214

15 years agoCorrect some things in test 068. Add detail to a verification error message.
Andy McFadden [Wed, 27 May 2009 21:40:12 +0000 (14:40 -0700)]
Correct some things in test 068.  Add detail to a verification error message.

15 years agoAnother fix for external bug 2711 (over-eager conflicting class rejection).
Andy McFadden [Wed, 27 May 2009 19:42:38 +0000 (12:42 -0700)]
Another fix for external bug 2711 (over-eager conflicting class rejection).

The validateSuperDescriptors() test also checks for conflicts with
interface classes, and wasn't doing that quite right.  We need to compare
every method declared by an interface against the class' implementation
of it.  Methods implemented by superclasses are now tested in the context
of the superclass, not the current class.

This is a one-word fix + comments and new/updated tests.

15 years agoCorrect handling of certain incompatible class changes.
Andy McFadden [Tue, 26 May 2009 23:56:30 +0000 (16:56 -0700)]
Correct handling of certain incompatible class changes.

Tests 065 and 066 depened on the old behavior of the verifier.  Updating
them to the new behavior wasn't enough, though, because they weren't
reporting the right error.  The verifier's resolution code now examines
the exception to see if the load failure was caused by an incompatible
class change error.

I also updated the description of test 071 to note that it will fail on
the device if you don't have an sdcard.

Added a method to get the exception "cause" field.  It handles the
"uninitialized" state, which I keep forgetting about.

Spruced up dvmDumpObject, which hadn't been used in a while.  Fixed a
warning in Profile.c.

For internal bug 1866729.

15 years agoFix for external bug 2711, over-eager conflicting class rejection.
Andy McFadden [Tue, 26 May 2009 20:39:57 +0000 (13:39 -0700)]
Fix for external bug 2711, over-eager conflicting class rejection.

The validateSuperDescriptors() test added in Cupcake (or thereabouts) was
checking things that didn't need to be checked, and rejecting classes that
didn't need to be rejected.

Expanded test 068 to include a doubled-but-okay test.

Updates FancyLoader to use a single copy of the DexFile.

15 years agoBug 1844104: Fix buffer overwrite bugs in CharsetEncoderICU and CharsetDecoderICU.
Mihai Preda [Mon, 25 May 2009 20:00:34 +0000 (22:00 +0200)]
Bug 1844104: Fix buffer overwrite bugs in CharsetEncoderICU and CharsetDecoderICU.

And add unit test.

15 years agoMerge change 2346
Android (Google) Code Review [Fri, 22 May 2009 19:40:44 +0000 (12:40 -0700)]
Merge change 2346

* changes:
  Ignore missing bootstrap class path jars after printing a warning.

15 years agoIgnore missing bootstrap class path jars after printing a warning.
Andy McFadden [Fri, 22 May 2009 19:27:20 +0000 (12:27 -0700)]
Ignore missing bootstrap class path jars after printing a warning.

Previous behavior was to print an error and halt.  The warning will appear
in the log whenever the VM is started, which means you'll see it on every
"dexopt" invocation but otherwise only once during zygote init.

For internal bug 1812586.

15 years agoam 84938760: Code to reuse PlatformAddress objects. Minimizing garbage creation on...
t.mehrvarz [Thu, 21 May 2009 00:36:01 +0000 (17:36 -0700)]
am 84938760: Code to reuse PlatformAddress objects. Minimizing garbage creation on the framework level and reducing the number of runtime GC-hiccups for OpenGL apps and animations. 2nd version: complete rewrite using 8 bit hash, up to 5 probes, cycle through probes cache replacement. (Thank you MichaelDt for your help.) - 1st amend: applied requested modifications - 2nd amend: comment openers, curly bracket

Merge commit '8493876016e383b59af707cb5184100374f7f353'

* commit '8493876016e383b59af707cb5184100374f7f353':
  Code to reuse PlatformAddress objects. Minimizing garbage creation on the framework level and reducing the number of runtime GC-hiccups for OpenGL apps and animations.

15 years agoCode to reuse PlatformAddress objects. Minimizing garbage creation on the framework...
t.mehrvarz [Sat, 28 Feb 2009 06:25:46 +0000 (07:25 +0100)]
Code to reuse PlatformAddress objects. Minimizing garbage creation on the framework level and reducing the number of runtime GC-hiccups for OpenGL apps and animations.
2nd version: complete rewrite using 8 bit hash, up to 5 probes, cycle through probes cache replacement. (Thank you MichaelDt for your help.)
- 1st amend: applied requested modifications
- 2nd amend: comment openers, curly bracket

15 years agoam d3c6d366: Merge change 1987 into donut
Android (Google) Code Review [Wed, 20 May 2009 00:36:55 +0000 (17:36 -0700)]
am d3c6d366: Merge change 1987 into donut

Merge commit 'd3c6d366379142d0784ab5fe973a939d462aca28'

* commit 'd3c6d366379142d0784ab5fe973a939d462aca28':
  Add tracing of native function calls to Dalvik.

15 years agoMerge change 1987 into donut
Android (Google) Code Review [Wed, 20 May 2009 00:33:25 +0000 (17:33 -0700)]
Merge change 1987 into donut

* changes:
  Add tracing of native function calls to Dalvik.

15 years agoAdd tracing of native function calls to Dalvik.
Jack Veenstra [Tue, 19 May 2009 21:36:48 +0000 (14:36 -0700)]
Add tracing of native function calls to Dalvik.

Dalvik already traces Java method calls but it doesn't trace JNI calls.
This adds new trace records for JNI calls.

15 years agoMerge change 1981
Android (Google) Code Review [Tue, 19 May 2009 22:18:43 +0000 (15:18 -0700)]
Merge change 1981

* changes:
  Added basic VFP support to Dalvik interpreter.

15 years agoAdded basic VFP support to Dalvik interpreter.
Andy McFadden [Mon, 18 May 2009 23:38:01 +0000 (16:38 -0700)]
Added basic VFP support to Dalvik interpreter.

This adds opcode handlers for all instructions that have a VFP equivalent
or (for the compare operations) near-equivalent.

The inclusion of VFP is keyed off of TARGET_ARCH_VERSION, so enabling
this requires setting "TARGET_ARCH_VERSION=armv5te-vfp" in a buildspec.

15 years agoFix up the last handful of FindBugs complaints.
Dan Bornstein [Mon, 18 May 2009 18:17:39 +0000 (11:17 -0700)]
Fix up the last handful of FindBugs complaints.

And again, also do a bit of whitespace cleanup.

15 years agoFix a bunch of little problems noticed by FindBugs, and cleaned up some
Dan Bornstein [Fri, 15 May 2009 21:49:51 +0000 (14:49 -0700)]
Fix a bunch of little problems noticed by FindBugs, and cleaned up some
spacing issues that I happened to notice along the way.

15 years agoDefer reporting of certain verifier failures.
Andy McFadden [Fri, 8 May 2009 23:50:17 +0000 (16:50 -0700)]
Defer reporting of certain verifier failures.

The verifier currently reports all failures immediately.  Certain failures,
such as the failure to resolve a method, or the determination that access
to a field is not allowed, are supposed to deferred until the first time
that executing code does something that could cause the resolution.

With this change, several kinds of verification failures are deferred.
This is done by making a writable copy of the bytecode and replacing the
failing instruction with an "always throw" opcode.

Gory details:
- Added throw-verification-error instruction.  Implemented in "portable"
  and ARM interpreters.  x86 uses portable form through stub.
- Added a function that creates a copy of a DexCode area and makes the
  bytecodes writable.
- Added code that replaces a single instruction with an "always throw".
- Replaced runtime check for abstract/interface in new-instance with a
  check at verification time.
- Added a test to exercise the deferred error mechanism.
- Minor cleanups (replaced tab, bad valgrind command, ...).

15 years agoam 7ccb7a6a: Increase the number of entries set aside for zygote initiating loader...
Andy McFadden [Fri, 15 May 2009 23:25:28 +0000 (16:25 -0700)]
am 7ccb7a6a: Increase the number of entries set aside for zygote initiating loader lists.

Merge commit '7ccb7a6a563396e4b64069dd4e57977d1b5b6180'

* commit '7ccb7a6a563396e4b64069dd4e57977d1b5b6180':
  Increase the number of entries set aside for zygote initiating loader lists.
  Fix handling of "--dev" argument in dalvik tests.

15 years agoIncrease the number of entries set aside for zygote initiating loader lists.
Andy McFadden [Fri, 15 May 2009 20:44:29 +0000 (13:44 -0700)]
Increase the number of entries set aside for zygote initiating loader lists.

The number of classes that are present when the zygote finishes
initializing increased in donut/master, above the 2000 we currently
plan for.  Exceeding the limit reduces zygote sharing efficiency, so
this change raises the limit.

15 years agoCheck object types when native code returns.
Andy McFadden [Wed, 13 May 2009 23:44:34 +0000 (16:44 -0700)]
Check object types when native code returns.

Object references returned by native code were not being type checked,
so it was possible to (for example) return a byte[] when an InetAddress
was expected.  This sort of thing can lead to extremely strange behavior.

Now, when "check JNI" is enabled, we insert another layer in the JNI call
sequence that verifies the type of the returned object.  This makes calls
to native methods returning an object a bit slower on engineering builds,
but the added type safety is helpful.

I found two failures with this.  One fairly harmless one was fixed in
master 1594, the other is filed as internal bug 1851257.  The latter does
not seem to cause problems for anything other than the socks5 app that
uncovered it (but it does render SOCKS less than useful).