OSDN Git Service

android-x86/dalvik.git
14 years agoFix "HttpUrlConnection.addRequestProperty replaces existing properties instead of...
Elliott Hughes [Wed, 24 Feb 2010 00:20:16 +0000 (16:20 -0800)]
Fix "HttpUrlConnection.addRequestProperty replaces existing properties instead of append them".

The bug was actually that the copy constructor wasn't reconstructing the 'props'
list correctly. Upstream has applied the same fix, so I'm also bringing my
earlier change into sync with theirs, whitespace-wise (and removing no longer
necessary 'android-changed' tags).

Bug: http://code.google.com/p/android/issues/detail?id=6722

14 years agoRemove more useless annotations: logging, luni-kernel, and math.
Elliott Hughes [Tue, 23 Feb 2010 22:57:28 +0000 (14:57 -0800)]
Remove more useless annotations: logging, luni-kernel, and math.

(Plus a bonus item: one Android-written test under luni.)

14 years agoRemove useless annotation cruft from tests for: annotation, archive, concurrent,...
Elliott Hughes [Tue, 23 Feb 2010 00:47:08 +0000 (16:47 -0800)]
Remove useless annotation cruft from tests for: annotation, archive, concurrent, and suncompat.

22 files (and 4 modules) down, 1000 to go...

14 years agoUpdate run-core-tests' documentation, remove the leading : from the classpath, and...
Elliott Hughes [Tue, 23 Feb 2010 00:00:27 +0000 (16:00 -0800)]
Update run-core-tests' documentation, remove the leading : from the classpath, and add the json tests to the classpath.

(I did look at replacing this with a bash script we run on the host, but adb
turns out to have a command-line limit of 1024 bytes, and our classpath alone
is ~850 bytes long!)

14 years agoFix a stupid mistake in my earlier change.
Elliott Hughes [Mon, 22 Feb 2010 23:01:55 +0000 (15:01 -0800)]
Fix a stupid mistake in my earlier change.

(I removed the unused parameter from the wrong macro!)

14 years agoAdapt jesse's new json tests to the new build scheme.
Elliott Hughes [Mon, 22 Feb 2010 20:45:26 +0000 (12:45 -0800)]
Adapt jesse's new json tests to the new build scheme.

14 years agoMerge remote branch 'goog/master' into mm
Elliott Hughes [Mon, 22 Feb 2010 20:09:51 +0000 (12:09 -0800)]
Merge remote branch 'goog/master' into mm

Conflicts:
libcore/JavaLibrary.mk

14 years agoMerge "Resync a load of tests with upstream, make our build faster." into dalvik-dev
Elliott Hughes [Mon, 22 Feb 2010 19:15:21 +0000 (11:15 -0800)]
Merge "Resync a load of tests with upstream, make our build faster." into dalvik-dev

14 years agoFix build breakage.
Barry Hayes [Mon, 22 Feb 2010 17:39:10 +0000 (09:39 -0800)]
Fix build breakage.
the "HeapChunk" abstraction was removed almost everywhere; but not here
until now.

14 years agoMerge " Add the "-Xgc:[no]overwritefree" flags. When set, the GC will clobber the...
Barry Hayes [Mon, 22 Feb 2010 17:13:28 +0000 (09:13 -0800)]
Merge " Add the "-Xgc:[no]overwritefree" flags. When set, the GC will clobber the memory of freed objects." into dalvik-dev

14 years agoMerge "Removing dead code from BigInt"
Jesse Wilson [Sat, 20 Feb 2010 19:12:12 +0000 (11:12 -0800)]
Merge "Removing dead code from BigInt"

14 years agoMerge "More XML DOM v3 APIs."
Jesse Wilson [Sat, 20 Feb 2010 19:11:40 +0000 (11:11 -0800)]
Merge "More XML DOM v3 APIs."

14 years agoMore XML DOM v3 APIs.
Jesse Wilson [Sat, 20 Feb 2010 18:20:55 +0000 (10:20 -0800)]
More XML DOM v3 APIs.

This adds the following APIs and tests:
- Node.isDefaultNamespace
- DomImplementation.hasFeature
- Node.isSupported
- Node.getFeature
- Node.isEqualNode

14 years agoRemoving dead code from BigInt
Jesse Wilson [Sat, 20 Feb 2010 18:35:21 +0000 (10:35 -0800)]
Removing dead code from BigInt

14 years agoRemove external/jsr305, external/guava, and external/caliper.
Elliott Hughes [Sat, 20 Feb 2010 06:14:19 +0000 (22:14 -0800)]
Remove external/jsr305, external/guava, and external/caliper.

14 years agoMerge "Disable JIT for armv5te for A/B tests."
Ben Cheng [Fri, 19 Feb 2010 23:30:16 +0000 (15:30 -0800)]
Merge "Disable JIT for armv5te for A/B tests."

14 years agoDisable JIT for armv5te for A/B tests.
Ben Cheng [Fri, 19 Feb 2010 22:49:44 +0000 (14:49 -0800)]
Disable JIT for armv5te for A/B tests.

14 years agoDOM setTextContent() tests and implementation fixes.
Jesse Wilson [Fri, 19 Feb 2010 19:18:41 +0000 (11:18 -0800)]
DOM setTextContent() tests and implementation fixes.

14 years agoResync a load of tests with upstream, make our build faster.
Elliott Hughes [Fri, 19 Feb 2010 01:20:15 +0000 (17:20 -0800)]
Resync a load of tests with upstream, make our build faster.

I started off with a mission to remove uses of dalvik.annotation.* (stuff
like @TestTargetNew and other useless junk that just makes it harder to
stay in sync with upstream). I wrote a script to go through tests showing
me the diff between what we have and what upstream has, thinking that in
cases where upstream has also added tests, I may as well pull them in at
the same time...

...but I didn't realize how close we were to having dx fill its 1.5GiB heap.

After trying various alternatives, I decided to bite the bullet and break
core-tests up into one .jar per module. This adds parallelism back into this,
the slowest part of our build. (I can do even better, but I'll do that in a
separate patch, preferably after we've merged recent changes from master.)

Only a couple of dependencies were problematic: the worthless TestSuiteFactory
which already contained a comment suggesting we get rid of it, and the fact
that some tests -- most notably the concurrent ones -- also contained main
methods that started the JUnit tty-based TestRunner.

(In the long run, we want to be running the harmony tests directly from a
pristine "svn co" of upstream, using DalvikRunner. But this will be a big
help in the meantime, and starts the work of getting our current copy of
the tests into a state where we can start to extract any meaningful
changes/additions we've made.)

14 years agoMerge "Removing bogus check to permit on-host debugging."
Jesse Wilson [Fri, 19 Feb 2010 17:30:04 +0000 (09:30 -0800)]
Merge "Removing bogus check to permit on-host debugging."

14 years agoRemoving bogus check to permit on-host debugging.
Jesse Wilson [Fri, 19 Feb 2010 17:28:57 +0000 (09:28 -0800)]
Removing bogus check to permit on-host debugging.

14 years agoMerge "Adding JSON tests to the complete test suite."
Jesse Wilson [Fri, 19 Feb 2010 17:28:28 +0000 (09:28 -0800)]
Merge "Adding JSON tests to the complete test suite."

14 years agoAdding JSON tests to the complete test suite.
Jesse Wilson [Fri, 19 Feb 2010 17:27:27 +0000 (09:27 -0800)]
Adding JSON tests to the complete test suite.

14 years agoMerge "Filling in some gaps in our XML DOM v3 API."
Jesse Wilson [Fri, 19 Feb 2010 17:27:00 +0000 (09:27 -0800)]
Merge "Filling in some gaps in our XML DOM v3 API."

14 years agoFilling in some gaps in our XML DOM v3 API.
Jesse Wilson [Fri, 19 Feb 2010 17:22:21 +0000 (09:22 -0800)]
Filling in some gaps in our XML DOM v3 API.

Specifically, these methods on Node:
 - setTextContent()
 - isSameNode()
 - lookupPrefix()
 - lookupNamespaceURI()
In order to implement the last 2 I needed to fix our KXml parser
to include namespace attributes (ie. xmlns) in the pulled document.
Previously these were being elided.

Added a new testcase to verify our behaviour. It passes the RI. On
Dalvik we have a small issue with entity declarations.

Added a new testcase to verify Node.getBaseURI(). This test fails
because the method isn't implemented. Part of this test required
moving a method out to Support_Resources.java; in order to verify
the BaseURI the XML must be read from a file and not a stream (so
that path information exists).

Also...
 - Style cleanup: changing static calls to look like static calls.
 - Efficiency: avoiding concatenating with "" when unnecessary
 - Duplication: sharing prefix validation between attributes and elements
 - Renaming NodeTests to NodeTest for vogar-friendliness

Outstanding:
 - I need to write a test for setTextContent().

14 years agoMore DalvikRunner cleanup.
Elliott Hughes [Thu, 18 Feb 2010 23:18:41 +0000 (15:18 -0800)]
More DalvikRunner cleanup.

Remove the now-unnecessary jsr305 and guava build dependencies.

Move TestActivity.java -- which is only needed at *run* time -- out into
lib/, which lets us simplify the makefile.

Pass the dalvik.annotation.* source files to javac(1) (at *run* time) so
we don't need the run-time dependency on core-intermediates [that I'd
already removed in a successful attempt to find out why we had the
dependency].

We need to remove all uses of those useless annotations from the harmony
tests so we can get back in sync with upstream, but now also so that we
can clean up this part of DalvikRunner.

14 years agoAdd a simple MD5-based cache to DalvikRunner.
Elliott Hughes [Thu, 18 Feb 2010 01:44:31 +0000 (17:44 -0800)]
Add a simple MD5-based cache to DalvikRunner.

This makes the new simpler scheme pretty much free.

I've also made a start on simplifying the make rules, though there's more we
can do, and I'll look at that next.

14 years agoMerge "Make DalvikRunner work on production devices too."
Elliott Hughes [Thu, 18 Feb 2010 00:25:06 +0000 (16:25 -0800)]
Merge "Make DalvikRunner work on production devices too."

14 years agoMerge "Add a general-purpose scoped pointer for libcore JNI."
Elliott Hughes [Wed, 17 Feb 2010 23:53:05 +0000 (15:53 -0800)]
Merge "Add a general-purpose scoped pointer for libcore JNI."

14 years agoMerge "HTTP headers should be case-insensitive but case-preserving." into dalvik-dev
Elliott Hughes [Wed, 17 Feb 2010 23:51:36 +0000 (15:51 -0800)]
Merge "HTTP headers should be case-insensitive but case-preserving." into dalvik-dev

14 years agoMake DalvikRunner work on production devices too.
Elliott Hughes [Wed, 17 Feb 2010 23:46:05 +0000 (15:46 -0800)]
Make DalvikRunner work on production devices too.

Place pre-built .jar files in our lib/ directory, and dex/push them on demand.

Change DalvikRunner to somewhat reduce the number of different classpaths in
play. My feeling is that we just want one true classpath: we should build with
it on the host, we should run with it on the host, we should dex everything on
it, we should upload everything to the device, and we should run with it on the
device.

Also add a convenience script for running DalvikRunner. ("Vogar" is the
proposed open source name for DalvikRunner, which really isn't as
dalvikvm-specific as the name might imply.)

There's a noticeable performance regression here, so my next change will be to
add a cache.

14 years ago Add the "-Xgc:[no]overwritefree" flags. When set, the GC will clobber the
Barry Hayes [Tue, 2 Feb 2010 22:07:37 +0000 (14:07 -0800)]
 Add the "-Xgc:[no]overwritefree" flags. When set, the GC will clobber the
memory of freed objects.

14 years agoMerge "Eliminate the heap chunk abstraction. This temporarily breaks the hprof featu...
Carl Shapiro [Wed, 17 Feb 2010 22:52:59 +0000 (14:52 -0800)]
Merge "Eliminate the heap chunk abstraction.  This temporarily breaks the hprof feature that allows stack traces to be associated with objects." into dalvik-dev

14 years agoEliminate the heap chunk abstraction. This temporarily breaks the
Carl Shapiro [Wed, 17 Feb 2010 01:40:19 +0000 (17:40 -0800)]
Eliminate the heap chunk abstraction.  This temporarily breaks the
hprof feature that allows stack traces to be associated with objects.

14 years agoMerge "Detect system-wide safe mode and configure the VM accordingly." into dalvik-dev
Ben Cheng [Wed, 17 Feb 2010 20:47:35 +0000 (12:47 -0800)]
Merge "Detect system-wide safe mode and configure the VM accordingly." into dalvik-dev

14 years agoDetect system-wide safe mode and configure the VM accordingly.
Ben Cheng [Mon, 15 Feb 2010 00:17:36 +0000 (16:17 -0800)]
Detect system-wide safe mode and configure the VM accordingly.

Use pthread_cond_wait instead of timed wait for the system_server process to
wait on the go-ahead JIT signal. If the phone is booted under system-wide safe
mode, such signal will never come so all VM instances (including the system
server) will run in the interpreter-only mode.

Bug: 2267590

14 years agoHTTP headers should be case-insensitive but case-preserving.
Elliott Hughes [Wed, 17 Feb 2010 20:18:59 +0000 (12:18 -0800)]
HTTP headers should be case-insensitive but case-preserving.

Bug: http://code.google.com/p/android/issues/detail?id=6684

14 years agoMerge "Densely allocate mspaces. New heaps are started on the page following the...
Carl Shapiro [Wed, 17 Feb 2010 20:15:19 +0000 (12:15 -0800)]
Merge "Densely allocate mspaces.  New heaps are started on the page following the break of the previously allocated heap.  In addition, we shrink the reported size of the previous object bitmap so it covers only the committed range of the heap.  We now separately track the size of the bitmap virtual memory reservation so we may unmap it all at shutdown time." into dalvik-dev

14 years agoFixing packages for JSON tests
Jesse Wilson [Wed, 17 Feb 2010 18:44:11 +0000 (10:44 -0800)]
Fixing packages for JSON tests

14 years agoMerge "First round of tests for the subset of the org.json in Android."
Jesse Wilson [Wed, 17 Feb 2010 18:10:36 +0000 (10:10 -0800)]
Merge "First round of tests for the subset of the org.json in Android."

14 years agoFirst round of tests for the subset of the org.json in Android.
Jesse Wilson [Tue, 16 Feb 2010 21:50:32 +0000 (13:50 -0800)]
First round of tests for the subset of the org.json in Android.

14 years agoMerge "Detect system-wide safe mode and configure the VM accordingly."
Ben Cheng [Wed, 17 Feb 2010 06:28:11 +0000 (22:28 -0800)]
Merge "Detect system-wide safe mode and configure the VM accordingly."

14 years agoMerge "Removing unnecessary org.w3c.dom subpackages"
Jesse Wilson [Wed, 17 Feb 2010 05:58:11 +0000 (21:58 -0800)]
Merge "Removing unnecessary org.w3c.dom subpackages"

14 years agoJit: Monitor exit, possible fix for Issue 2396073
Bill Buzbee [Tue, 16 Feb 2010 22:40:01 +0000 (14:40 -0800)]
Jit: Monitor exit, possible fix for Issue 2396073

Two problems with monitor-exit:
   1.  The Jit code wasn't checking for exception thrown following
       unlocks of fat locks using dvmUnlockObject().
   2.  The mterp interpreter unlock code branched to handle exceptions
       thrown during dvmUnlockObject() with the wrong dalvik PC (the
       dPC of the unlock, rather than the instruction following the unlock).

Similar issue with the x86 interpreter fixed.  Also, deleted armv7-a
MONITOR_ENTER template, which turned out to be identical to the armv5te
one.

14 years agoRemoving unnecessary org.w3c.dom subpackages
Jesse Wilson [Fri, 12 Feb 2010 00:08:33 +0000 (16:08 -0800)]
Removing unnecessary org.w3c.dom subpackages

14 years agoMerge "Jit: Monitor exit, possible fix for Issue 2396073"
Bill Buzbee [Wed, 17 Feb 2010 00:12:55 +0000 (16:12 -0800)]
Merge "Jit: Monitor exit, possible fix for Issue 2396073"

14 years agoFix FindBugs' "high" warnings about java.lang.Class.
Elliott Hughes [Wed, 17 Feb 2010 00:06:37 +0000 (16:06 -0800)]
Fix FindBugs' "high" warnings about java.lang.Class.

14 years agoJit: Monitor exit, possible fix for Issue 2396073
Bill Buzbee [Tue, 16 Feb 2010 22:40:01 +0000 (14:40 -0800)]
Jit: Monitor exit, possible fix for Issue 2396073

Two problems with monitor-exit:
   1.  The Jit code wasn't checking for exception thrown following
       unlocks of fat locks using dvmUnlockObject().
   2.  The mterp interpreter unlock code branched to handle exceptions
       thrown during dvmUnlockObject() with the wrong dalvik PC (the
       dPC of the unlock, rather than the instruction following the unlock).

Similar issue with the x86 interpreter fixed.  Also, deleted armv7-a
MONITOR_ENTER template, which turned out to be identical to the armv5te
one.

14 years agoDetect system-wide safe mode and configure the VM accordingly.
Ben Cheng [Mon, 15 Feb 2010 00:17:36 +0000 (16:17 -0800)]
Detect system-wide safe mode and configure the VM accordingly.

Use pthread_cond_wait instead of timed wait for the system_server process to
wait on the go-ahead JIT signal. If the phone is booted under system-wide safe
mode, such signal will never come so all VM instances (including the system
server) will run in the interpreter-only mode.

Bug: 2267590

14 years agoMerge "Reverting our test runner's background building behaviour."
Jesse Wilson [Tue, 16 Feb 2010 22:57:30 +0000 (14:57 -0800)]
Merge "Reverting our test runner's background building behaviour."

14 years agoReverting our test runner's background building behaviour.
Jesse Wilson [Tue, 16 Feb 2010 22:30:31 +0000 (14:30 -0800)]
Reverting our test runner's background building behaviour.

Our continuous build has been failing to complete lately. See:
http://jwilson.mtv.corp.google.com:8080/job/master_passion/274/consoleFull

In addition to this problem the continuous build is compiling many
more tests ahead-of-time than we were originally - previously we
would only have up to 4 tests ready-to-run at any given time. With
this change the ExecutorCompletionService was building and installing
all of the tests eagerly.

I believe the problem might be a mismatch between how the BlockingQueue
and the ExecutorCompletionService select which order to return futures.
By removing the ExecutorCompletionService I remove the opportunity for
such a conflict!

14 years agoFlan -> Froyo
Andy McFadden [Tue, 16 Feb 2010 22:08:29 +0000 (14:08 -0800)]
Flan -> Froyo

14 years agoDensely allocate mspaces. New heaps are started on the page following
Carl Shapiro [Mon, 15 Feb 2010 02:40:47 +0000 (18:40 -0800)]
Densely allocate mspaces.  New heaps are started on the page following
the break of the previously allocated heap.  In addition, we shrink
the reported size of the previous object bitmap so it covers only the
committed range of the heap.  We now separately track the size of the
bitmap virtual memory reservation so we may unmap it all at shutdown
time.

14 years agoEliminate unused variable warnings in the alloc code. In the places
Carl Shapiro [Mon, 15 Feb 2010 07:11:47 +0000 (23:11 -0800)]
Eliminate unused variable warnings in the alloc code.  In the places
where unused attributes have been added, arguably, the return code
should be passed up to the caller or, if the return code indicates an
error, we should fast-fail.

14 years agoMerge "Fix a few of our FindBugs "high" warnings." into dalvik-dev
Elliott Hughes [Sat, 13 Feb 2010 03:52:42 +0000 (19:52 -0800)]
Merge "Fix a few of our FindBugs "high" warnings." into dalvik-dev

14 years agoFix a few of our FindBugs "high" warnings.
Elliott Hughes [Sat, 13 Feb 2010 02:10:26 +0000 (18:10 -0800)]
Fix a few of our FindBugs "high" warnings.

RuleBasedBreakIterator was breaking the equals/hashCode contract.

Various classes were calling toString on arrays, which isn't very useful.

GregorianCalendar was missing a null/instanceof check. (FindBugs complained about
the former, but the super.equals would actually take care of that. The lack of
the explicit "instanceof" did mean that we could throw ClassCastException if you
had a Calendar that wasn't a GregorianCalendar, though. [Not easily testable,
and I hope we'll replace our calendars with ICU4J's before we actually have
another Calendar subclass.])

Collator's cache was broken, but luckily never had anything inserted into it
anyway.

14 years agoMerge "Use one method to create a Locale from a String." into dalvik-dev
Elliott Hughes [Sat, 13 Feb 2010 01:49:41 +0000 (17:49 -0800)]
Merge "Use one method to create a Locale from a String." into dalvik-dev

14 years agoThrow IllegalArgumentException if Currency.getInstance is given an invalid currency...
Elliott Hughes [Sat, 13 Feb 2010 00:51:53 +0000 (16:51 -0800)]
Throw IllegalArgumentException if Currency.getInstance is given an invalid currency code.

This fixes an existing harmony DecimalFormatSymbolsTest failure, but I've added
an explicit test for clarity (and to reduce the likelihood of regression).

14 years agoUse one method to create a Locale from a String.
Elliott Hughes [Fri, 12 Feb 2010 23:33:53 +0000 (15:33 -0800)]
Use one method to create a Locale from a String.

Bug: 2392157

14 years agoMerge "Remove some potential test flakiness." into dalvik-dev
Elliott Hughes [Fri, 12 Feb 2010 21:43:14 +0000 (13:43 -0800)]
Merge "Remove some potential test flakiness." into dalvik-dev

14 years agoRemove some potential test flakiness.
Elliott Hughes [Fri, 12 Feb 2010 19:23:05 +0000 (11:23 -0800)]
Remove some potential test flakiness.

Bug: 2441548

14 years agoMerge "Do not include assert.h in places where it may shadow the definition provided...
Carl Shapiro [Fri, 12 Feb 2010 19:07:52 +0000 (11:07 -0800)]
Merge "Do not include assert.h in places where it may shadow the definition provided by Common.h if WITH_DALVIK_ASSERTS is defined.  The include from HeapBitmap.h was notable as it redefined the Dalvik friendly assert macro with the useless libc macro across all of the GC sources." into dalvik-dev

14 years agoUse HAVE_ANDROID_OS to conditionally include files on a device target.
Dan Bornstein [Fri, 12 Feb 2010 18:04:14 +0000 (10:04 -0800)]
Use HAVE_ANDROID_OS to conditionally include files on a device target.

14 years agoDo not include assert.h in places where it may shadow the definition
Carl Shapiro [Fri, 12 Feb 2010 06:36:02 +0000 (22:36 -0800)]
Do not include assert.h in places where it may shadow the definition
provided by Common.h if WITH_DALVIK_ASSERTS is defined.  The include
from HeapBitmap.h was notable as it redefined the Dalvik friendly
assert macro with the useless libc macro across all of the GC sources.

14 years agoUse ashmem to create the JIT code cache.
Ben Cheng [Thu, 11 Feb 2010 23:03:00 +0000 (15:03 -0800)]
Use ashmem to create the JIT code cache.

14 years agoFree memory associated with the trace descriptor of ALL dropped JIT work orders
Ben Cheng [Thu, 11 Feb 2010 01:21:39 +0000 (17:21 -0800)]
Free memory associated with the trace descriptor of ALL dropped JIT work orders

To further reduce the memory consumption only enable the method vs trace
compile size stats when WITH_JIT_TUNING is configured.

14 years agoMerge "Support per-application switch to execute the VM in safe mode." into dalvik-dev
Ben Cheng [Fri, 12 Feb 2010 00:01:57 +0000 (16:01 -0800)]
Merge "Support per-application switch to execute the VM in safe mode." into dalvik-dev

14 years agoMerge "Minor dexdeps touchups."
Andy McFadden [Thu, 11 Feb 2010 23:59:02 +0000 (15:59 -0800)]
Merge "Minor dexdeps touchups."

14 years agoMinor dexdeps touchups.
Andy McFadden [Tue, 9 Feb 2010 21:30:57 +0000 (13:30 -0800)]
Minor dexdeps touchups.

Made XML output the default.
Added a couple of blank lines in the "brief" output.
Added version number (1.1) and a copyright one-liner.

14 years agoMerge "Use ashmem to create the JIT code cache."
Ben Cheng [Thu, 11 Feb 2010 23:39:52 +0000 (15:39 -0800)]
Merge "Use ashmem to create the JIT code cache."

14 years agoUse ashmem to create the JIT code cache.
Ben Cheng [Thu, 11 Feb 2010 23:03:00 +0000 (15:03 -0800)]
Use ashmem to create the JIT code cache.

14 years agoJit: Minor codegen tuning.
Bill Buzbee [Thu, 11 Feb 2010 22:04:53 +0000 (14:04 -0800)]
Jit: Minor codegen tuning.

14 years agoMerge "Jit: Minor codegen tuning."
Bill Buzbee [Thu, 11 Feb 2010 22:35:57 +0000 (14:35 -0800)]
Merge "Jit: Minor codegen tuning."

14 years agoMerge "Allocate a contiguous region of virtual memory to be subdivided among the...
Carl Shapiro [Thu, 11 Feb 2010 22:20:39 +0000 (14:20 -0800)]
Merge "Allocate a contiguous region of virtual memory to be subdivided among the various heaps managed by the garbage collector.  Because we cannot tell how far the break has been advanced by morecore, we over allocate virtual memory and grain each heap on a multiple of the maximum heap size.  If we could reckon the position of the break, we could allocate just as many pages as required.  This requires exporting more state from mspace.c, a refinement I will reserve for a future change list." into dalvik-dev

14 years agoJit: Minor codegen tuning.
Bill Buzbee [Thu, 11 Feb 2010 22:04:53 +0000 (14:04 -0800)]
Jit: Minor codegen tuning.

14 years agoFixing problems with the test runner's ability to parse expected results files.
Jesse Wilson [Thu, 11 Feb 2010 20:40:50 +0000 (12:40 -0800)]
Fixing problems with the test runner's ability to parse expected results files.

It appears that the original authors of this testing framework didn't really
know whether these files were supposed to be XML or HTML, UTF-8 or UTF-16, and
so there's quite a mess of processing in order to canonicalize them.

14 years agoMerge "Fixing some of our XSLT implementation issues."
Jesse Wilson [Thu, 11 Feb 2010 20:38:08 +0000 (12:38 -0800)]
Merge "Fixing some of our XSLT implementation issues."

14 years agoam a38780c9: merge from open-source master
The Android Open Source Project [Thu, 11 Feb 2010 19:20:09 +0000 (11:20 -0800)]
am a38780c9: merge from open-source master

Merge commit 'a38780c9858aee807a52ad5615da4d32a4bafca0'

* commit 'a38780c9858aee807a52ad5615da4d32a4bafca0':
  Fix a couple minor bugs (bug 2404859) in TraceDump.c
  Added support for filter in dmtracedump tool, along with some test cases.
  Fix for unmatched entry/exit points in test traces

14 years agoMake DalvikRunner more resilient to running immediately after device reboot
Brian Carlstrom [Thu, 11 Feb 2010 07:07:32 +0000 (23:07 -0800)]
Make DalvikRunner more resilient to running immediately after device reboot

    Changed EnvironmentDevice.prepare to waitForDevice and
    waitForNonEmptyDirectory("/sdcard") before proceeding to fix problem with
    running immediately after "fastboot flashall"

dalvik/libcore/tools/runner/java/dalvik/runner/EnvironmentDevice.java

    Added Adb.waitForDevice and Adb.waitForNonEmptyDirectory

dalvik/libcore/tools/runner/java/dalvik/runner/Adb.java

    Added Command.executeWithTimeout based on code refactored from Mode.java

dalvik/libcore/tools/runner/java/dalvik/runner/Command.java
dalvik/libcore/tools/runner/java/dalvik/runner/Mode.java

14 years agoAllocate a contiguous region of virtual memory to be subdivided among
Carl Shapiro [Wed, 10 Feb 2010 00:26:30 +0000 (16:26 -0800)]
Allocate a contiguous region of virtual memory to be subdivided among
the various heaps managed by the garbage collector.  Because we cannot
tell how far the break has been advanced by morecore, we over allocate
virtual memory and grain each heap on a multiple of the maximum heap
size.  If we could reckon the position of the break, we could allocate
just as many pages as required.  This requires exporting more state
from mspace.c, a refinement I will reserve for a future change list.

14 years agoAdded LDMIA/STMIA support to Self Verification mode.
jeffhao [Wed, 10 Feb 2010 18:51:02 +0000 (10:51 -0800)]
Added LDMIA/STMIA support to Self Verification mode.

14 years agomerge from open-source master
The Android Open Source Project [Thu, 11 Feb 2010 18:02:33 +0000 (10:02 -0800)]
merge from open-source master

14 years agoAdd a general-purpose scoped pointer for libcore JNI.
Elliott Hughes [Wed, 3 Feb 2010 02:24:57 +0000 (18:24 -0800)]
Add a general-purpose scoped pointer for libcore JNI.

This is a functional equivalent of C++0x's std::unique_ptr.

(I'm not planning to use this in froyo, but I want it there in case I have to
backport changes from dalvik-dev.)

14 years agoSupport per-application switch to execute the VM in safe mode.
Ben Cheng [Tue, 9 Feb 2010 00:03:42 +0000 (16:03 -0800)]
Support per-application switch to execute the VM in safe mode.

This is the implementation on the VM side to consume the android:safeMode=true
attribute and force the application to run in interpreter-only mode (the
current safe mode).

Bug: 2267583

14 years agoFree memory associated with the trace descriptor of ALL dropped JIT work orders
Ben Cheng [Thu, 11 Feb 2010 01:21:39 +0000 (17:21 -0800)]
Free memory associated with the trace descriptor of ALL dropped JIT work orders

To further reduce the memory consumption only enable the method vs trace
compile size stats when WITH_JIT_TUNING is configured.

14 years agoAdded missing break statements and improved debugging in SelfVerification.
jeffhao [Tue, 9 Feb 2010 22:55:47 +0000 (14:55 -0800)]
Added missing break statements and improved debugging in SelfVerification.

14 years agoFixing some of our XSLT implementation issues.
Jesse Wilson [Tue, 2 Feb 2010 19:39:05 +0000 (11:39 -0800)]
Fixing some of our XSLT implementation issues.

These changes move our XSLT code to passing 1898/3173 of the OASIS tests.
To contrast, the RI passes 2105/3173 tests.

Highlights:
  - Implementing getTextContent() for nodes
  - Removing validation during transforms. We don't support validation!
  - Fixing attribute constraints to match the spec
  - Fixing test suite to not confuse BaseURI from NamespaceURI

14 years agoMerge "Support per-application switch to execute the VM in safe mode."
Ben Cheng [Wed, 10 Feb 2010 22:49:59 +0000 (14:49 -0800)]
Merge "Support per-application switch to execute the VM in safe mode."

14 years agoMerge "Added LDMIA/STMIA support to Self Verification mode."
Jeff Hao [Wed, 10 Feb 2010 22:34:14 +0000 (14:34 -0800)]
Merge "Added LDMIA/STMIA support to Self Verification mode."

14 years agoMerge "Add a setHandshakeTimeout() to OpenSSLSocketImpl, which sets a read timeout...
Dan Egnor [Wed, 10 Feb 2010 22:32:15 +0000 (14:32 -0800)]
Merge "Add a setHandshakeTimeout() to OpenSSLSocketImpl, which sets a read timeout that only applies to the SSL handshake step."

14 years agoAdd a setHandshakeTimeout() to OpenSSLSocketImpl, which sets
Dan Egnor [Wed, 10 Feb 2010 19:48:08 +0000 (11:48 -0800)]
Add a setHandshakeTimeout() to OpenSSLSocketImpl, which sets
a read timeout that only applies to the SSL handshake step.

Bug: 2362543

14 years agoFix NamingPatternCodeFinder to detect final classes
Brian Carlstrom [Wed, 10 Feb 2010 20:34:01 +0000 (12:34 -0800)]
Fix NamingPatternCodeFinder to detect final classes

14 years agoSupport per-application switch to execute the VM in safe mode.
Ben Cheng [Tue, 9 Feb 2010 00:03:42 +0000 (16:03 -0800)]
Support per-application switch to execute the VM in safe mode.

This is the implementation on the VM side to consume the android:safeMode=true
attribute and force the application to run in interpreter-only mode (the
current safe mode).

Bug: 2267583

14 years agoAdded LDMIA/STMIA support to Self Verification mode.
jeffhao [Wed, 10 Feb 2010 18:51:02 +0000 (10:51 -0800)]
Added LDMIA/STMIA support to Self Verification mode.

14 years agoMerge "Remove TestRunner.success field / Make postCompileTest return void"
Brian Carlstrom [Wed, 10 Feb 2010 18:32:11 +0000 (10:32 -0800)]
Merge "Remove TestRunner.success field / Make postCompileTest return void"

14 years agoRemove TestRunner.success field / Make postCompileTest return void
Brian Carlstrom [Wed, 10 Feb 2010 07:28:11 +0000 (23:28 -0800)]
Remove TestRunner.success field / Make postCompileTest return void

SUMMARY:
- Change TestRunner subclasses to instead implement a Runner interface
- Cleanup runtime classpath generation
- Misc improvements

DETAILS:

Change TestRunner subclasses to instead implement a Runner interface

    *Runner classes now implement the new Runner interface instead of
    extending TestRunner. prepareTest/test now take a "Class
    testClass" instead of accessing a "String testClass" from the
    superclass. This also means that all their "static void main"
    methods are removed and replaced with a single main method in
    TestRunner. TestActivity can now instantiate a TestRunner and call
    its "boolean run()" method to execute tests and retrieve their
    SUCCESS/FAILURE status via the return value, allowing the removeal
    of TestRunner.success. Mode now needs to explicitly include
    TestRunner.java in the list of code to compile because it no
    longer is implicitly found by compiling its former subclasses.

java/dalvik/runner/TestRunner.java
java/dalvik/runner/Runner.java
java/dalvik/runner/CaliperRunner.java
java/dalvik/runner/JUnitRunner.java
java/dalvik/runner/JtregRunner.java
java/dalvik/runner/MainRunner.java
java/dalvik/runner/Mode.java

    CodeFinder.getRunnerClass now returns a Runner, not a TestRunner

java/dalvik/runner/CodeFinder.java
java/dalvik/runner/JUnitFinder.java
java/dalvik/runner/CaliperFinder.java
java/dalvik/runner/JtregFinder.java
java/dalvik/runner/MainFinder.java

    Similarly, TestRun.runnerClass is now a Runner, not a TestRunner

java/dalvik/runner/TestRun.java

    Move logic to run a test based on TestProperties.RUNNER_CLASS from
    TestActivity to TestRunner since its now used in all cases, not
    just the Activity case. TestActivity.ActivityRunner remains the
    one subclass of TestRunner, accessing the TestRunner.run(...)
    logic via super.run(...), allowing it to maintain its special
    result file writing logic.

java/dalvik/runner/TestActivity.java
java/dalvik/runner/TestRunner.java

    Moved writing of TestProperties.RUNNER_CLASS from ActivityMode now
    that it is used for all Modes.

java/dalvik/runner/ActivityMode.java
java/dalvik/runner/Mode.java

    Since CaliperRunner now has a "Class testClass", it uses the more
    strongly typed Runner.main(Class<? extends Benchmark>, ...)  API.

java/dalvik/runner/CaliperRunner.java

    Fixing javadoc TestRunner->Runner
java/dalvik/runner/TestProperties.java

    Adding new Runner class to the build.

Android.mk

Cleanup runtime classpath generation

    Changed Mode.postCompileTest to return void instead of Classpath
    to match Most.postCompileTestRunner. Removed passing test
    classpath from compile to run via TestRun.testClasspath. Instead,
    Vm.getRuntimeSupportClasspath now is used to compute full
    classpath, instead of using the old TestRun.getTestClasspath in
    Mode. Mode.compileTest now uses a boolean to indicate compilation
    success, instead of null/non-null Classpath. TestRun.testClasspath
    is now replaced with TestRun.testCompiled which is used to track
    compilation success. In retrospect, it seems like using the
    absense of a Classpath as an indication of compilation
    success/failure seems like somewhat of a hack.

java/dalvik/runner/Mode.java
java/dalvik/runner/ActivityMode.java
java/dalvik/runner/DeviceDalvikVm.java
java/dalvik/runner/JavaVm.java
java/dalvik/runner/TestRun.java

    New deviceDexFile to make sure dex file name generation stays
    consistent between build time and compile time.

java/dalvik/runner/DeviceDalvikVm.java

    Changed MainRunner implementation to more closely match JtregRunner
java/dalvik/runner/MainRunner.java

Misc improvements

    Changed TestActivity to use a shutdown hook to catch when a test
    calls System.exit so we can be sure to write a result file and not
    simply wait for the timeout to catch our failure to return.

java/dalvik/runner/TestActivity.java

    Changed Mkdir.mkdirs to use new Command().execute to get automatic
    logging of command execution with --verbose

java/dalvik/runner/Mkdir.java

    Improved javadoc

java/dalvik/runner/Mode.java

    Fixed apparently misplaced @SuppressWarnings("unchecked")
java/dalvik/runner/OptionParser.java

    Enabling warnings as errors and turning on unchecked warnings.

Android.mk

    Made sure test script works with fresh device and improved logging

test-dalvik-runner.sh

14 years agoAdded missing break statements and improved debugging in SelfVerification.
jeffhao [Tue, 9 Feb 2010 22:55:47 +0000 (14:55 -0800)]
Added missing break statements and improved debugging in SelfVerification.

14 years agoFix a couple minor bugs (bug 2404859) in TraceDump.c
Jack Veenstra [Thu, 28 Jan 2010 23:57:02 +0000 (15:57 -0800)]
Fix a couple minor bugs (bug 2404859) in TraceDump.c

1. A switch statement was missing a "break" after option letter "f".
2. The heavily-used function "lookupMethod()" had an expression using mod (%) instead of bitwise-and (&).

14 years agoAdded support for filter in dmtracedump tool, along with some test cases.
Rodrigo Ipince [Fri, 18 Dec 2009 02:07:28 +0000 (18:07 -0800)]
Added support for filter in dmtracedump tool, along with some test cases.

Some corner cases are still not handled in the code, but will be eventually.

14 years agoFix for unmatched entry/exit points in test traces
Rodrigo Ipince [Thu, 22 Oct 2009 20:21:02 +0000 (13:21 -0700)]
Fix for unmatched entry/exit points in test traces

Added support for the creation of test traces with unmatched entries/exits (current implementation segfaulted in some cases)