OSDN Git Service

android-x86/dalvik.git
14 years agoRemove tests.api.java.io.FileTest#test_delete as known failure.
Brett Chabot [Sun, 20 Sep 2009 22:25:29 +0000 (15:25 -0700)]
Remove tests.api.java.io.FileTest#test_delete as known failure.

BUG 2133089

14 years agoEach time we start an SSL session, we have to find the trust anchor. This used to...
Bob Lee [Wed, 26 Aug 2009 05:32:37 +0000 (22:32 -0700)]
Each time we start an SSL session, we have to find the trust anchor. This used to be an O(N) operation. If the trust anchor we're looking for was close to N, finding it could take a couple seconds. This change makes the operation O(1).

14 years agoExposed default trust manager.
Bob Lee [Fri, 21 Aug 2009 00:34:58 +0000 (17:34 -0700)]
Exposed default trust manager.

14 years agoCleanup CTS core failing tests.
Brett Chabot [Fri, 14 Aug 2009 04:37:47 +0000 (21:37 -0700)]
Cleanup CTS core failing tests.

BUG 2053939

14 years agoFix an issue where we're adding 4x the intended offset.
Jesse Wilson [Tue, 28 Jul 2009 23:49:40 +0000 (16:49 -0700)]
Fix an issue where we're adding 4x the intended offset.

We were doing pointer arithmetic of mixed types (jint* and jint),
and the type conversion ended up causing the offset to be converted
an extra time.

14 years agoRemoving MD2
Urs Grob [Wed, 22 Jul 2009 18:06:03 +0000 (20:06 +0200)]
Removing MD2

14 years agoJNI direct buffer function speedup, part 3.
Andy McFadden [Fri, 24 Jul 2009 22:28:16 +0000 (15:28 -0700)]
JNI direct buffer function speedup, part 3.

This caches the effective address in a new field in the base Buffer
object.  The first time something calls through one of the various
getEffectiveAddress calls, the value is set.  (This seemed easier than
chasing down the constructors and factories, and also prevents bit rot
on the "slow path" in the VM.)

14 years agoJNI direct buffer function speedup, part 2.
Andy McFadden [Fri, 24 Jul 2009 00:47:18 +0000 (17:47 -0700)]
JNI direct buffer function speedup, part 2.

This converts the three direct buffer functions from JNI to internal VM
calls.  As a bonus, we grab PlatformAddress.osaddr directly instead of
retrieving it with PlatformAddress.toLong().

We're still calling through getEffectiveAddress(), which is where most
of the complexity lies.

Nudged a couple of comments.

14 years agoMerge change 8258 into donut
Android (Google) Code Review [Wed, 22 Jul 2009 22:34:57 +0000 (15:34 -0700)]
Merge change 8258 into donut

* changes:
  Minor fixes to CheckJNI.

14 years agoMinor fixes to CheckJNI.
Andy McFadden [Wed, 22 Jul 2009 22:20:08 +0000 (15:20 -0700)]
Minor fixes to CheckJNI.

We weren't always switching to "running" mode before playing with
objects.  Now checkObject() always changes modes, and things that called
checkObject while in "running" mode now do so after switching back to
"native" (which shouldn't matter now, but I don't want to require nested
switching to work if I don't have to).

Vaguely related to internal bug 1943379, since I think we want to do
some updates to CheckJNI there.

14 years agoJNI direct buffer function speedup, part 1.
Andy McFadden [Wed, 22 Jul 2009 22:07:27 +0000 (15:07 -0700)]
JNI direct buffer function speedup, part 1.

This is a fairly straightforward improvement to GetDirectBufferAddress,
caching classes and methodIDs instead of looking them up on every call.
This is the best we can do without making the function more vulnerable
to internal changes to Harmony's NIO implementation.

It looks like we need to take this farther, but this way we have a
relatively fast and relatively safe version to fall back on.

For internal bug 1943379.

14 years agoMerge change 7410 into donut
Android (Google) Code Review [Wed, 15 Jul 2009 21:18:58 +0000 (14:18 -0700)]
Merge change 7410 into donut

* changes:
  Fix bug: Arrays.deepToSting renders "[null]" as "null"; "[[]]" as "[]"; etc.

14 years agoFix bug: Arrays.deepToSting renders "[null]" as "null"; "[[]]" as "[]"; etc.
Joshua Bloch [Wed, 15 Jul 2009 18:29:28 +0000 (11:29 -0700)]
Fix bug: Arrays.deepToSting renders "[null]" as "null"; "[[]]" as "[]"; etc.

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

Do not merge to master -- this is 57ea16e8 from there.

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.

14 years agoRemove races from JNI_OnLoad invocation.
Andy McFadden [Fri, 10 Jul 2009 00:01:04 +0000 (17:01 -0700)]
Remove races from JNI_OnLoad invocation.

Do not merge to master.  (This was copied from there to donut.)

The current implementation just calls JNI_OnLoad and returns a failure
result if that goes badly.  If a second load attempt is made after
dlopen() finishes but before JNI_OnLoad completes, it will succeed
immediately.

This is bad because (a) we might not have finished the initialization
steps in JNI_OnLoad, and (b) it's possible JNI_OnLoad will fail.  We now
wait for an in-progress JNI_OnLoad to complete before returning.  (This
also requires recognizing and handling recursive invocation.)

14 years agoMerge change 4595 into donut
Android (Google) Code Review [Fri, 10 Jul 2009 10:36:41 +0000 (03:36 -0700)]
Merge change 4595 into donut

* changes:
  Reactivating test that failed with a extensive gref count increase

14 years agoMerge change 6098 into donut
Android (Google) Code Review [Thu, 2 Jul 2009 18:42:32 +0000 (11:42 -0700)]
Merge change 6098 into donut

* changes:
  Commented out invalid test.

14 years agoCommented out invalid test.
crazybob [Thu, 2 Jul 2009 18:35:18 +0000 (13:35 -0500)]
Commented out invalid test.

14 years agoMerge change 5967 into donut
Android (Google) Code Review [Thu, 2 Jul 2009 17:17:51 +0000 (10:17 -0700)]
Merge change 5967 into donut

* changes:
  Modifies OpenSSLSocketImpl to use a different lock for the instance count. It was using the same lock when use around native methods meaning that the finalizer could be blocked unnecessarily resulting in a VM crash.

14 years agoMerge change 5991 into donut
Android (Google) Code Review [Thu, 2 Jul 2009 16:41:19 +0000 (09:41 -0700)]
Merge change 5991 into donut

* changes:
  Reduce VM aborts during high CPU stress.

14 years agoMerge change 5990 into donut
Android (Google) Code Review [Thu, 2 Jul 2009 16:41:09 +0000 (09:41 -0700)]
Merge change 5990 into donut

* changes:
  Pull 138592-p9 from master to donut.

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

(This was cherry-picked from master 2aa43610 for internal bug 1952616.)

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.

14 years agoPull 138592-p9 from master to donut.
Andy McFadden [Wed, 1 Jul 2009 21:52:13 +0000 (14:52 -0700)]
Pull 138592-p9 from master to donut.

Switch from VMWAIT to RUNNING when executing code on behalf of the
debugger.  Reset the thread-suspend lock timeout if we have to suspend
while trying to acquire it.

Also, clear any pending exception before calling interpreted code.

Reworked some log messages to make them easier to decipher.

(For internal bug 1952616.)

14 years agoModifies OpenSSLSocketImpl to use a different lock for the instance count. It was...
crazybob [Wed, 1 Jul 2009 20:30:58 +0000 (15:30 -0500)]
Modifies OpenSSLSocketImpl to use a different lock for the instance count. It was using the same lock when use around native methods meaning that the finalizer could be blocked unnecessarily
resulting in a VM crash.

14 years agoFixes deadlock in Runtime.exec(). We can't malloc() or free() after fork() because...
crazybob [Thu, 18 Jun 2009 22:19:04 +0000 (17:19 -0500)]
Fixes deadlock in Runtime.exec(). We can't malloc() or free() after fork() because the heap lock may be held by a thread that is no longer running.

14 years agodalvik: thread: Set the control group of a thread to the background group
San Mehat [Fri, 26 Jun 2009 15:36:16 +0000 (08:36 -0700)]
dalvik: thread: Set the control group of a thread to the background group
if the priority is logically-lower than ANDROID_PRIORITY_BACKGROUND

Signed-off-by: San Mehat <san@google.com>
14 years agoMerge change 5286 into donut
Android (Google) Code Review [Thu, 25 Jun 2009 14:23:43 +0000 (07:23 -0700)]
Merge change 5286 into donut

* changes:
  Check for failure in GetDirectBufferAddress.

14 years agoCheck for failure in GetDirectBufferAddress.
Andy McFadden [Wed, 24 Jun 2009 23:56:06 +0000 (16:56 -0700)]
Check for failure in GetDirectBufferAddress.

We now check for a null result or a pending exception in the JNI
GetDirectBufferAddress function.  This prevents a VM crash when somebody
tries to get the address of a non-direct buffer.

For internal bug 1926596.

14 years agoAdd FileDescriptor variation of startMethodTracing().
Dianne Hackborn [Wed, 24 Jun 2009 02:21:10 +0000 (19:21 -0700)]
Add FileDescriptor variation of startMethodTracing().

This is for bug #1829561 ("am profile" with bad filename kills process), which
will allow the am command to take care of opening the file and handing the
resulting fd over to the process to be profiled.

14 years agoMerge 137552-p9 to donut.
Andy McFadden [Tue, 23 Jun 2009 23:27:45 +0000 (16:27 -0700)]
Merge 137552-p9 to donut.

Since we're apparently using these calls now, we probably ought to pull
the bug fix over.  It's been in master for more than 3 months so it
should be safe.  It'll also make future merges easier.

Prequel to fix for internal bug #1926596.

14 years agoReactivating test that failed with a extensive gref count increase
Urs Grob [Thu, 18 Jun 2009 12:09:08 +0000 (14:09 +0200)]
Reactivating test that failed with a extensive gref count increase

The cause for this failure was fixed. So this test can be reactivated.
BUG=1814539

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

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

14 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

14 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

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

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

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

14 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

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

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

14 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 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 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 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 agoFix handling of "--dev" argument in dalvik tests.
Andy McFadden [Wed, 13 May 2009 17:43:08 +0000 (10:43 -0700)]
Fix handling of "--dev" argument in dalvik tests.

This was originally part of p9-144240, which was only made in "master".

15 years agoMerge change 1400 into donut
Android (Google) Code Review [Mon, 11 May 2009 21:49:39 +0000 (14:49 -0700)]
Merge change 1400 into donut

* changes:
  Increase default stack size from 8K to 12K.

15 years agoIncrease default stack size from 8K to 12K.
Andy McFadden [Mon, 11 May 2009 21:39:13 +0000 (14:39 -0700)]
Increase default stack size from 8K to 12K.

For internal bug 1844105.

15 years agoam 64b928e: AI 148694: Manually copied from cupcake_dcm CL 148669-p9. W
Andy Stadler [Mon, 11 May 2009 21:15:32 +0000 (14:15 -0700)]
am 64b928e: AI 148694: Manually copied from cupcake_dcm CL 148669-p9.  W

Merge commit '64b928e82a3b91b339ff9ee980c4a0c020daa251' into donut

* commit '64b928e82a3b91b339ff9ee980c4a0c020daa251':
  AI 148694: Manually copied from cupcake_dcm CL 148669-p9.  When resetting the

15 years agoAI 148694: Manually copied from cupcake_dcm CL 148669-p9. When resetting the
Andy Stadler [Mon, 11 May 2009 21:03:58 +0000 (14:03 -0700)]
AI 148694: Manually copied from cupcake_dcm CL 148669-p9.  When resetting the
  mode of the encoder, clear the leftover input & output buffers.
  This claims to fix buffer overwriting we're seeing during account
  sync and message download.
  BUG=1822859

Automated import of CL 148694

15 years agoam 974cdcd: AI 148692: Merge change #148679 into Cupcake, since we proba
Dan Bornstein [Mon, 11 May 2009 20:40:57 +0000 (13:40 -0700)]
am 974cdcd: AI 148692: Merge change #148679 into Cupcake, since we proba

Merge commit '974cdcdc22ce05a0574bf7f2559a175c8d9434e9' into donut

* commit '974cdcdc22ce05a0574bf7f2559a175c8d9434e9':
  AI 148692: Merge change #148679 into Cupcake, since we probably want to

15 years agoAI 148692: Merge change #148679 into Cupcake, since we probably want to
Dan Bornstein [Mon, 11 May 2009 20:39:31 +0000 (13:39 -0700)]
AI 148692: Merge change #148679 into Cupcake, since we probably want to
  take it for rel if there's an opportunity. Original
  description:
  Fix InputStreamReader to not drop input on buffer boundaries.
  This fix takes the salient code from Harmony tip-of-tree,
  though it's not a wholesale replacement of the file. In
  particular, I left in the old encoding name handling as well
  as one remaining "FIXME" that I don't think would have been
  addressed.
  BUG=1836908

Automated import of CL 148692

15 years agoMerge change 1369 into donut
Android (Google) Code Review [Mon, 11 May 2009 17:46:25 +0000 (10:46 -0700)]
Merge change 1369 into donut

* changes:
  Updated a comment.

15 years agoUpdated a comment.
Andy McFadden [Mon, 11 May 2009 17:44:52 +0000 (10:44 -0700)]
Updated a comment.

15 years agoam 2de2459: AI 148670: More tests that need to be marked broken, since
Jorg Pleumann [Mon, 11 May 2009 17:12:32 +0000 (10:12 -0700)]
am 2de2459: AI 148670: More tests that need to be marked broken, since

Merge commit '2de2459caf88698400b7bcadaf87b5767b22f81e' into donut

* commit '2de2459caf88698400b7bcadaf87b5767b22f81e':
  AI 148670: More tests that need to be marked broken, since

15 years agoAI 148670: More tests that need to be marked broken, since
Jorg Pleumann [Mon, 11 May 2009 17:10:42 +0000 (10:10 -0700)]
AI 148670: More tests that need to be marked broken, since
  they behave differently in CTS and plain VM.
  Hopefully the last ones...
  BUG=1285921

Automated import of CL 148670

15 years agoPull the useful part of p9-132414 over to "donut".
Andy McFadden [Fri, 8 May 2009 22:26:33 +0000 (15:26 -0700)]
Pull the useful part of p9-132414 over to "donut".

This was inspired by some valgrind complaints marcone noticed.  The change
is already part of "master".

(I just noticed that the comment isn't quite right, but hopefully if I leave
it alone it'll merge trivially and I can fix it up in a subsequent change.)

15 years agoam c423b40: AI 148447: Marking some more tests as broken, because they
Jorg Pleumann [Thu, 7 May 2009 16:25:18 +0000 (09:25 -0700)]
am c423b40: AI 148447: Marking some more tests as broken, because they

Merge commit 'c423b4096a09b1c1eae05b8ef37e7e3c428e0b92' into donut

* commit 'c423b4096a09b1c1eae05b8ef37e7e3c428e0b92':
  AI 148447: Marking some more tests as broken, because they

15 years agoAI 148447: Marking some more tests as broken, because they
Jorg Pleumann [Thu, 7 May 2009 16:22:59 +0000 (09:22 -0700)]
AI 148447: Marking some more tests as broken, because they
  don't work properly in the CTS environment for
  some reason.
  BUG=1285921

Automated import of CL 148447

15 years agoam 2f563a4: AI 148431: Marking as broken a couple of tests
Jorg Pleumann [Thu, 7 May 2009 08:36:27 +0000 (01:36 -0700)]
am 2f563a4: AI 148431: Marking as broken a couple of tests

Merge commit '2f563a4590c4a0e54177906c47d50f4ef454eba5' into donut

* commit '2f563a4590c4a0e54177906c47d50f4ef454eba5':
  AI 148431: Marking as broken a couple of tests

15 years agoAI 148431: Marking as broken a couple of tests
Jorg Pleumann [Thu, 7 May 2009 08:35:52 +0000 (01:35 -0700)]
AI 148431: Marking as broken a couple of tests
  that tend to fail in the CTS host.
  BUG=1285921

Automated import of CL 148431

15 years agoMerge change 1003 into donut
Android (Google) Code Review [Wed, 6 May 2009 23:38:16 +0000 (16:38 -0700)]
Merge change 1003 into donut

* changes:
  Add support for tracing Java method entry/exit in emulator.

15 years agoAdd support for tracing Java method entry/exit in emulator.
Jack Veenstra [Tue, 5 May 2009 18:29:51 +0000 (11:29 -0700)]
Add support for tracing Java method entry/exit in emulator.

This is part of a larger change and depends on changes to the
kernel and the emulator tracing code.  The code used to work by
by writing to a "magic page" which the emulator would notice
because it watches every load and store.  But the emulator lost
the ability to watch every load and store with the latest update
to qemu.  So the new code sets up a memory-mapped page that the
emulator watches.  This is cleaner and more efficient anyway.

15 years agoMerge change 1055 into donut
Android (Google) Code Review [Wed, 6 May 2009 18:41:05 +0000 (11:41 -0700)]
Merge change 1055 into donut

* changes:
  Fix issue 1687880.

15 years agoFix issue 1687880.
Jing Yu [Wed, 6 May 2009 03:34:38 +0000 (20:34 -0700)]
Fix issue 1687880.

Change argument va_list to a standard representation.

15 years agoAdded XML output mode for dexdump.
Andy McFadden [Tue, 5 May 2009 23:52:10 +0000 (16:52 -0700)]
Added XML output mode for dexdump.

This adds an output mode that looks similar to the "current.xml" we
generate for our public APIs.  There are a number of differences in
content.  The original ("plain") output has not been altered.

I pulled in the bad checksum handling change (internal 142686) since
it's small, has turned out to be useful, and might make the merge of
this to master slightly easier.

This also renames a buffer in the ongoing temp file variable saga.

15 years agoMerge change 993 into donut
Android (Google) Code Review [Tue, 5 May 2009 18:15:46 +0000 (11:15 -0700)]
Merge change 993 into donut

* changes:
  Pull fix from master branch, and correct filename juggling.

15 years agoPull fix from master branch, and correct filename juggling.
Andy McFadden [Tue, 5 May 2009 17:45:51 +0000 (10:45 -0700)]
Pull fix from master branch, and correct filename juggling.

The original fix was in p4 144906.  This also corrects some problems that
arise when the temp file is specified.

15 years agoMerge change 945 into donut
Android (Google) Code Review [Mon, 4 May 2009 20:32:58 +0000 (13:32 -0700)]
Merge change 945 into donut

* changes:
  Moved the context class loader init down a bit to ensure proper init.

15 years agoMoved the context class loader init down a bit to ensure proper init.
Andy McFadden [Mon, 4 May 2009 20:29:30 +0000 (13:29 -0700)]
Moved the context class loader init down a bit to ensure proper init.

Since we're executing interpreted code it's best if we set the context
class loader as late as possible in this function.  I also updated a few
comments while I was in there.

15 years agoMerge change 944 into donut
Android (Google) Code Review [Mon, 4 May 2009 19:58:07 +0000 (12:58 -0700)]
Merge change 944 into donut

* changes:
  Set the main thread's context class loader to the system class loader.

15 years agoSet the main thread's context class loader to the system class loader.
Andy McFadden [Mon, 4 May 2009 19:52:57 +0000 (12:52 -0700)]
Set the main thread's context class loader to the system class loader.

15 years agoTest for null object in the Get<Type>Field and Set<Type>Field JNI functions.
Andy McFadden [Mon, 4 May 2009 19:28:51 +0000 (12:28 -0700)]
Test for null object in the Get<Type>Field and Set<Type>Field JNI functions.

Also adds some "return" calls after abortMaybe(), since it won't actually
abort if "warnonly" is set.

15 years agoMerge change 891 into donut
Android (Google) Code Review [Fri, 1 May 2009 19:27:34 +0000 (12:27 -0700)]
Merge change 891 into donut

* changes:
  Corrected behavior of Constructor.newInstance on abstract classes.

15 years agoCorrected behavior of Constructor.newInstance on abstract classes.
Andy McFadden [Fri, 1 May 2009 00:47:50 +0000 (17:47 -0700)]
Corrected behavior of Constructor.newInstance on abstract classes.

The VM now throws an exception when somebody tries to create an instance
of an abstract class through a Constructor object.  It also ensures that
the class is initialized before attempting to create an instance.

This change adds some Constructor tests to the 042-new-instance VM test.
(It also pulls in some additions that were made to the 042 test back
in March, on the p4 master branch.)

15 years agoMerge change 818 into donut
Android (Google) Code Review [Fri, 1 May 2009 18:31:23 +0000 (11:31 -0700)]
Merge change 818 into donut

* changes:
  Changed the way we check the magic number in guard pages.

15 years agoChanged the way we check the magic number in guard pages.
Andy McFadden [Thu, 30 Apr 2009 20:25:59 +0000 (13:25 -0700)]
Changed the way we check the magic number in guard pages.

Use memcmp instead of "==" so that, if the pointer is unaligned on a
platform where alignment matters, we fail with a nice warning instead
of a bus error.

Found while tracking down bug 1823434.

15 years agoImprove zygote heap sharing.
Barry Hayes [Mon, 6 Apr 2009 17:03:48 +0000 (10:03 -0700)]
Improve zygote heap sharing.

[ This is bhayes change 9488 in external "master" ]

Lots of ClassObject structures are unshared [and thus make whole pages
unshared]. A big contributor to this is the initializing class loader
logic, which has two writable words in a ClassObject and does indeed
seem to write them a lot.

Class which are created "early" have a low serial number and are
probably being created by the zygote, and would benefit from better
sharing. This change move the two words for classes with a low serial
number to a global, making the two words in those ClassObjects unused,
and thus more likely to be shared across apps.

Measured increase in sharing is c 100K per app, at a cost of c 32K
increase in unshared globals.

This might be better as a Set<Pair<Class,ClassLoader>> or
something. Many ClassObjects have zero loaders, and the typical count
seems to be very small. It should be possible to remove the two words
from the ClassObject and at the same time have a smaller global data
structure.

Respond to reviewer's comments.
Moved the "external" InitiatingLoaderList[] from gDvm to allocated storage.
Made the warning for the "const" go away.
Remove "vm/Init.c" from the commit
Revert Globals.h to not contain ZYGOTE_CLASS_CUTOFF
Use calloc rather than malloc/clear

15 years agoam 14da4cc: AI 147896: Some more fixes for tests that failed in
Jorg Pleumann [Wed, 29 Apr 2009 04:53:13 +0000 (21:53 -0700)]
am 14da4cc: AI 147896: Some more fixes for tests that failed in

Merge commit '14da4ccdd69d8db7cef00b2ae5aabd32b6e1bdb4' into donut

* commit '14da4ccdd69d8db7cef00b2ae5aabd32b6e1bdb4':
  AI 147896: Some more fixes for tests that failed in

15 years agoam ef71222: AI 147838: A couple of fixes for making the
Jorg Pleumann [Wed, 29 Apr 2009 04:53:12 +0000 (21:53 -0700)]
am ef71222: AI 147838: A couple of fixes for making the

Merge commit 'ef7122278207e33b724c6360945f9eae1f9a5a58' into donut

* commit 'ef7122278207e33b724c6360945f9eae1f9a5a58':
  AI 147838: A couple of fixes for making the

15 years agoam 4645b7c: AI 147732: fix broken links
Scott Main [Wed, 29 Apr 2009 04:53:12 +0000 (21:53 -0700)]
am 4645b7c: AI 147732: fix broken links

Merge commit '4645b7c3a461769281a0b2b846a26c79e806aaa0' into donut

* commit '4645b7c3a461769281a0b2b846a26c79e806aaa0':
  AI 147732: fix broken links

15 years agoam 210c512: AI 147726: Getting rid of tests.luni.AllTests and
Jorg Pleumann [Wed, 29 Apr 2009 04:53:12 +0000 (21:53 -0700)]
am 210c512: AI 147726: Getting rid of tests.luni.AllTests and

Merge commit '210c51215f36a78183de70a19987dc2ece2fda30' into donut

* commit '210c51215f36a78183de70a19987dc2ece2fda30':
  AI 147726: Getting rid of tests.luni.AllTests and

15 years agoam 7cc0301: AI 147723: This should have been deleted a while ago, since
Jorg Pleumann [Wed, 29 Apr 2009 04:53:11 +0000 (21:53 -0700)]
am 7cc0301: AI 147723: This should have been deleted a while ago, since

Merge commit '7cc03015bd1bcc14fcc5a0d4ad8b235b24992de2' into donut

* commit '7cc03015bd1bcc14fcc5a0d4ad8b235b24992de2':
  AI 147723: This should have been deleted a while ago, since

15 years agoam 3fb3946: AI 147687: Several fixes for failing tests in the cts host.
Urs Grob [Wed, 29 Apr 2009 04:53:11 +0000 (21:53 -0700)]
am 3fb3946: AI 147687: Several fixes for failing tests in the cts host.

Merge commit '3fb3946640bdc1294131417ac6593a789373090d' into donut

* commit '3fb3946640bdc1294131417ac6593a789373090d':
  AI 147687: Several fixes for failing tests in the cts host. also tests that timeout

15 years agoam 119c75d: AI 147660: Fixes for tests in the security module.
Urs Grob [Wed, 29 Apr 2009 04:53:11 +0000 (21:53 -0700)]
am 119c75d: AI 147660: Fixes for tests in the security module.

Merge commit '119c75dad5494ac611c74599747e4bdc071eced1' into donut

* commit '119c75dad5494ac611c74599747e4bdc071eced1':
  AI 147660: Fixes for tests in the security module.

15 years agoam 2b828ef: AI 147464: Some small bugfixes for the core tests.
Jorg Pleumann [Wed, 29 Apr 2009 04:53:10 +0000 (21:53 -0700)]
am 2b828ef: AI 147464: Some small bugfixes for the core tests.

Merge commit '2b828ef0e241e67319349a30285ee7b812173040' into donut

* commit '2b828ef0e241e67319349a30285ee7b812173040':
  AI 147464: Some small bugfixes for the core tests.

15 years agoAI 147896: Some more fixes for tests that failed in
Jorg Pleumann [Tue, 28 Apr 2009 17:12:13 +0000 (10:12 -0700)]
AI 147896: Some more fixes for tests that failed in
  the CTS, but worked fine in run-core-tests:
  - One cert test needs isolation, because
  it destroys the security provider.
  - The Thread.sleep() tests were too flaky.
  - Tests that tried to open a temporary DEX
  file failed in the CTS because we do not
  have access to the system DEX cache. We
  are now simply creating our own.
  The Java plan in the CTS should now pass
  fully. Yippie!
  BUG=1285921

Automated import of CL 147896

15 years agoFix an infinite loop in ClassLoader.isAncestorOf()
Urs Grob [Tue, 28 Apr 2009 16:20:31 +0000 (18:20 +0200)]
Fix an infinite loop in ClassLoader.isAncestorOf()

The current version loops endlessly if the callers ClassLoader
is not the same as the system ClassLoader. The cause for this is
a loop variable that is not changed during the loop.

BUG=1732214

15 years agoAI 147838: A couple of fixes for making the
Jorg Pleumann [Mon, 27 Apr 2009 16:15:18 +0000 (09:15 -0700)]
AI 147838: A couple of fixes for making the
  core tests work better in the CTS
  environment. Some tests had to be
  marked broken either because they
  either expose different behavior
  than in run-core-tests or they
  take too much time (beyond the
  CTS' timeout).
  BUG=1285921

Automated import of CL 147838

15 years agoFix for excessive GREF use in gethostbyaddr.
Urs Grob [Mon, 27 Apr 2009 10:53:09 +0000 (12:53 +0200)]
Fix for excessive GREF use in gethostbyaddr.

Each call to gethostbyaddr in java_net_InetAddress.cpp increases the
GREF by one. After calling the method around 1800 times the vm
crashes because of excessive global references.

15 years agoAI 147732: fix broken links
Scott Main [Fri, 24 Apr 2009 20:41:43 +0000 (13:41 -0700)]
AI 147732: fix broken links
  BUG=1810005

Automated import of CL 147732

15 years agoAI 147726: Getting rid of tests.luni.AllTests and
Jorg Pleumann [Fri, 24 Apr 2009 20:09:44 +0000 (13:09 -0700)]
AI 147726: Getting rid of tests.luni.AllTests and
  corresponding CTS packages. The test
  suite contains mostly duplicate tests.
  Two tests would be better placed in the
  StrictMath test suite. Don't know where
  to put the ThreadsTest, which seems to
  actually test the com.sun.Unsafe class,
  so it stays orphaned for now.
  BUG=1285921

Automated import of CL 147726

15 years agoAI 147723: This should have been deleted a while ago, since
Jorg Pleumann [Fri, 24 Apr 2009 20:07:06 +0000 (13:07 -0700)]
AI 147723: This should have been deleted a while ago, since
  it's a dupe class.
  BUG=1285921

Automated import of CL 147723

15 years agoAI 147687: Several fixes for failing tests in the cts host. also tests that timeout
Urs Grob [Fri, 24 Apr 2009 10:21:36 +0000 (03:21 -0700)]
AI 147687: Several fixes for failing tests in the cts host. also tests that timeout
  are now marked with BrokenTest to exclude them for the time being until
  we have a way to execute them.
  BUG=1285921

Automated import of CL 147687

15 years agoAI 147660: Fixes for tests in the security module.
Urs Grob [Fri, 24 Apr 2009 08:47:22 +0000 (01:47 -0700)]
AI 147660: Fixes for tests in the security module.
  Some tests are still failing in the cts host environment. This CL fixes most of them in the security module
  BUG=1285921

Automated import of CL 147660

15 years agovm: Replace a reference to TARGET_BUILD_TYPE with DEBUG_DALVIK_VM
Dave Bort [Thu, 23 Apr 2009 22:06:59 +0000 (15:06 -0700)]
vm: Replace a reference to TARGET_BUILD_TYPE with DEBUG_DALVIK_VM

We're soon going to stop using TARGET_BUILD_TYPE==debug to debug
native modules.

Signed-off-by: Dave Bort <dbort@android.com>
15 years agoMerge change 374 into donut
Android (Google) Code Review [Thu, 23 Apr 2009 16:46:13 +0000 (09:46 -0700)]
Merge change 374 into donut

* changes:
  vm: Add support for changing the scheduler group for a thread. Also temporarily bumps the scheduler group for background threads while performing GC

15 years agovm: Add support for changing the scheduler group for a thread.
San Mehat [Tue, 21 Apr 2009 21:03:06 +0000 (14:03 -0700)]
vm: Add support for changing the scheduler group for a thread.
Also temporarily bumps the scheduler group for background threads while performing GC

Signed-off-by: San Mehat <san@google.com>