OSDN Git Service

android-x86/dalvik.git
14 years agoMinor fix for Adb.waitForNonEmptyDirectory so that waiting for /sdcard after reboot...
Brian Carlstrom [Wed, 24 Feb 2010 00:39:09 +0000 (16:39 -0800)]
Minor fix for Adb.waitForNonEmptyDirectory so that waiting for /sdcard after reboot works again.

14 years agoMerge "Fixed bug 2438465, prevented blocks with move-result from being combined."
Jeff Hao [Tue, 23 Feb 2010 22:49:38 +0000 (14:49 -0800)]
Merge "Fixed bug 2438465, prevented blocks with move-result from being combined."

14 years agoDalvikRunner --tee option to send output to a file or stdout at runtime
Brian Carlstrom [Tue, 23 Feb 2010 19:31:46 +0000 (11:31 -0800)]
DalvikRunner --tee option to send output to a file or stdout at runtime

Added --tee option so we can watch test output while the test is
running, as opposed to waiting until all the output is collected.

As part of this, Command.Builder can now optionally specifiy a
PrintStream via tee (name from tee(1)).

Added ADB.waitForFile to accompany ADB.waitForNonEmptyDirectory

Removed gross bash wait loop hack in Activity Mode by replacing
Mode.buildCommands with Mode.runTestCommand.

Fixed bug that out generated APK package names did not contain a
required "." in all cases.

14 years agoFixed bug 2438465, prevented blocks with move-result from being combined.
jeffhao [Tue, 23 Feb 2010 20:29:47 +0000 (12:29 -0800)]
Fixed bug 2438465, prevented blocks with move-result from being combined.

14 years agoFixed bug 2438465, prevented blocks with move-result from being combined.
jeffhao [Tue, 23 Feb 2010 20:29:47 +0000 (12:29 -0800)]
Fixed bug 2438465, prevented blocks with move-result from being combined.

14 years agoAdd a test case for the jsr / invoke bug. (See the included
Dan Bornstein [Tue, 23 Feb 2010 00:08:53 +0000 (16:08 -0800)]
Add a test case for the jsr / invoke bug. (See the included
info.txt for more details.)

Change-Id: I6ae5266e3f3371406c366d4f4644a445875adf95

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

14 years agoMerge "Jit: Phase 1 of register utility cleanup/rewrite - the great renaming"
Bill Buzbee [Tue, 9 Feb 2010 20:56:57 +0000 (12:56 -0800)]
Merge "Jit: Phase 1 of register utility cleanup/rewrite - the great renaming"

14 years agoJit: Phase 1 of register utility cleanup/rewrite - the great renaming
Bill Buzbee [Tue, 9 Feb 2010 19:16:15 +0000 (11:16 -0800)]
Jit: Phase 1 of register utility cleanup/rewrite - the great renaming

Renaming of all of those register utilities which used to be local because
of our include mechanism to the standard dvmCompiler prefix scheme.

14 years agoMerge "DalvikRunner can run a test as an android.app.Activity & PathClassLoader.toStr...
Brian Carlstrom [Tue, 9 Feb 2010 19:10:04 +0000 (11:10 -0800)]
Merge "DalvikRunner can run a test as an android.app.Activity & PathClassLoader.toString change"

14 years agoDalvikRunner can run a test as an android.app.Activity & PathClassLoader.toString...
Brian Carlstrom [Fri, 5 Feb 2010 19:05:20 +0000 (11:05 -0800)]
DalvikRunner can run a test as an android.app.Activity & PathClassLoader.toString change

SUMMARY:
- PathClassLoader.toString prints path
- DalvikRunner --mode activity now working
- new DalvikRunner --no-clean vs --no-clean-after behavior

DETAILS

Dalvik runtime change
    Changed PathClassLoader.toString to print the class loaders path
    Also fixed variable name in commented out debug code
libcore/dalvik/src/main/java/dalvik/system/PathClassLoader.java

Dalvik Runner changes

    Mode is the new abstract superclass of the existing Vm
    class. ActivityMode is for the new Mode of running as a Activity
    on the device. Vm is now a subclass of Mode and its JavaVm and
    DeviceDalvikVm still exist although some code has been refactored
    into the new Environment clases (see below)

libcore/tools/runner/java/dalvik/runner/Mode.java
libcore/tools/runner/java/dalvik/runner/ActivityMode.java
libcore/tools/runner/java/dalvik/runner/DeviceDalvikVm.java
libcore/tools/runner/java/dalvik/runner/JavaVm.java
libcore/tools/runner/java/dalvik/runner/Vm.java

    Environment and its subclasses EnvironmentHost and
    EnvironmentDevice allow us to reuse some common code between the
    two different device modes (ActivityMode and
    DeviceDalvikVm). Basically code that was more about where and how
    to do things based on where the code was running as opposed to how
    the code was running moved to the Environment classes. For
    example, prepare() logic for /sdcard/ and ADB code in general.

libcore/tools/runner/java/dalvik/runner/DeviceDalvikVm.java
libcore/tools/runner/java/dalvik/runner/Environment.java
libcore/tools/runner/java/dalvik/runner/EnvironmentDevice.java
libcore/tools/runner/java/dalvik/runner/EnvironmentHost.java
libcore/tools/runner/java/dalvik/runner/JavaVm.java
libcore/tools/runner/java/dalvik/runner/Vm.java

    Adding new files
libcore/tools/runner/Android.mk

    Aapt is a wrapper for "aapt" similar to Adb and Dx
libcore/tools/runner/java/dalvik/runner/Aapt.java

    Added Adb.install and Adb.uninstall methods
    Changed from using File.toString to File.getPath for clarity
libcore/tools/runner/java/dalvik/runner/Adb.java

    CodeFinder has been extended so that Driver can ask finders what
    they need to build and run, specifically through the new
    getRunnerJava and getRunnerClasspath. (As part of this
    NamingPatternCodeFinder's runnerClass was changed to
    getRunnerClass for consistency with the superclass.) This was
    important for running as an Activity because we want to minimize
    what we pack into the APK file because of the "dx --dex" runtime
    and not just pull in all possible runners and supporting
    libraries. TestRun objects also hold onto this information from
    their finders.

libcore/tools/runner/java/dalvik/runner/Driver.java
libcore/tools/runner/java/dalvik/runner/CodeFinder.java
libcore/tools/runner/java/dalvik/runner/CaliperFinder.java
libcore/tools/runner/java/dalvik/runner/JUnitFinder.java
libcore/tools/runner/java/dalvik/runner/JtregFinder.java
libcore/tools/runner/java/dalvik/runner/MainFinder.java
libcore/tools/runner/java/dalvik/runner/NamingPatternCodeFinder.java
libcore/tools/runner/java/dalvik/runner/TestRun.java

    TestRunner TestRunner's className is now testClass to clarifiy it
    from the runnerClass.

libcore/tools/runner/java/dalvik/runner/TestRunner.java
libcore/tools/runner/java/dalvik/runner/CaliperRunner.java
libcore/tools/runner/java/dalvik/runner/JUnitRunner.java
libcore/tools/runner/java/dalvik/runner/JtregRunner.java
libcore/tools/runner/java/dalvik/runner/MainRunner.java

    Classpath now has a Collection.of and Collection.addAll that take
    a Collection<File> instead if just a File...

libcore/tools/runner/java/dalvik/runner/Classpath.java

    Added Command.args(File arg) to avoid a lot of
    args(file.getPath())

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

     Option --clean has expanded to --clean-before, --clean-after, and
     --clean. Now --no-clean will remove nothing as Elliot
     requested. --no-clean-after is now what is useful for
     DalvikRunner debuggin. Default is still to clean before and
     after.

libcore/tools/runner/java/dalvik/runner/DalvikRunner.java

    Moved Vm.DALVIK_RUNNER_HOME to DalvikRunner.HOME.
    /tmp/<UUID> paths are now /tmp/dalvikrunner/<UUID> paths are easier cleanup.

libcore/tools/runner/java/dalvik/runner/DalvikRunner.java

    Driver was changed to use a ExecutorCompletionService around the
    ExecutorService so that exceptions from the execute threads could
    be reported on the main thread.

libcore/tools/runner/java/dalvik/runner/Driver.java

    We now build the testrunner before the test so that its classes
    will be around to be packed into APK files.

libcore/tools/runner/java/dalvik/runner/Driver.java

    Dx.dex now takes File arguments instread of Strings.  Dx.dex also
    needs to pass additional memory arguments to not run out of memory
    building the big dex for the APK. The values I used where from the
    build/core/definitions.mk

libcore/tools/runner/java/dalvik/runner/Dx.java

    postCompile was split into postCompileTestRunner and
    postCompileTest because the packaging requires are very different
    in each case for ActivityMode. Specifically, the test runner is
    not post-packaged seperately, but packaged in the APK with each
    test.

libcore/tools/runner/java/dalvik/runner/ActivityMode.java
libcore/tools/runner/java/dalvik/runner/DeviceDalvikVm.java
libcore/tools/runner/java/dalvik/runner/JavaVm.java
libcore/tools/runner/java/dalvik/runner/Vm.java

    Changed testClass to test to avoid collision with new superclass field

libcore/tools/runner/java/dalvik/runner/JtregRunner.java
libcore/tools/runner/java/dalvik/runner/MainRunner.java

    Added @SuppressWarnings("unchecked")

libcore/tools/runner/java/dalvik/runner/OptionParser.java

    New android.app.Activity based on Elliot's TestAPK. It encapsulates an
    ActivityRunner that invokes the appropriate TestRunner based on test.properties.

libcore/tools/runner/java/dalvik/runner/TestActivity.java

    New class that shared contains (old and some new) between the
    DalvikRunner and the TestRunner.

libcore/tools/runner/java/dalvik/runner/TestProperties.java

    Regression test script for debugging the matrix of various
    DalvikRunner modes and test types:

libcore/tools/runner/test-dalvik-runner.sh

14 years agoFree the memory associated with the trace descriptor of dropped JIT work orders.
Ben Cheng [Tue, 9 Feb 2010 04:57:59 +0000 (20:57 -0800)]
Free the memory associated with the trace descriptor of dropped JIT work orders.

14 years agoJit: Startup/Shutdown cleanup
Bill Buzbee [Tue, 9 Feb 2010 01:08:15 +0000 (17:08 -0800)]
Jit: Startup/Shutdown cleanup

A legacy of early parallel Jit development was separate Startup & Shutdown
code for the interpreter half of the jit (dvmJitStartup/dvmJitShutdown)
and the compiler half (dvmCompilerStartup/dvmCompilerShutdown).  This cl
eliminates the dvmJit pair.  Additionally, guard coded added to the
framework callback to return immediately if the Jit isn't active.

14 years agoJit: Remove references to interpState from C interpreter
Bill Buzbee [Mon, 8 Feb 2010 18:41:32 +0000 (10:41 -0800)]
Jit: Remove references to interpState from C interpreter

Fix for Issue 2157987:
   Eventual isssue with interpState->jitState in <dalvik/vm/mterp/c/header.c

14 years agoEnable JIT parameters to be initialized in an architecture dependent way.
Ben Cheng [Fri, 5 Feb 2010 00:15:59 +0000 (16:15 -0800)]
Enable JIT parameters to be initialized in an architecture dependent way.

The search for optimial value is still ongoing. The current settings are:

                         v5    v7
JIT profile table       512  2048
JIT code cache         512K    1M
JIT threshold           200    40

14 years agoMerge "JIT: Replace missing ending comment marker MONITOR_ENTER template"
Bill Buzbee [Sat, 6 Feb 2010 00:14:51 +0000 (16:14 -0800)]
Merge "JIT: Replace missing ending comment marker MONITOR_ENTER template"

14 years agoJIT: Replace missing ending comment marker MONITOR_ENTER template
Bill Buzbee [Sat, 6 Feb 2010 00:08:38 +0000 (16:08 -0800)]
JIT: Replace missing ending comment marker MONITOR_ENTER template

...which, luckily, was followed by a debug version of the same handler
so everything magically worked anyway.  I should buy a lottery ticket today.

14 years agoMerge "Cleaned up uninitialized variable use warnings in Self Verification mode."
Jeff Hao [Fri, 5 Feb 2010 23:41:57 +0000 (15:41 -0800)]
Merge "Cleaned up uninitialized variable use warnings in Self Verification mode."

14 years agoCleaned up uninitialized variable use warnings in Self Verification mode.
jeffhao [Fri, 5 Feb 2010 23:08:23 +0000 (15:08 -0800)]
Cleaned up uninitialized variable use warnings in Self Verification mode.

14 years agoMerge "Improve dexdeps output."
Andy McFadden [Fri, 5 Feb 2010 23:18:59 +0000 (15:18 -0800)]
Merge "Improve dexdeps output."

14 years agoImprove dexdeps output.
Andy McFadden [Fri, 5 Feb 2010 23:05:03 +0000 (15:05 -0800)]
Improve dexdeps output.

This adds the list of referenced classes to the output.  Previously it
only emitted fields and methods, so classes that were referenced by type
only (e.g. some dalvik annotation classes) weren't visible.

The XML output now more closely resembles the API files, having
distinct package/class tags.  We no longer emit a return type for
constructors.

14 years agoJit: Start the Jit when framework signals on first screen draw
Bill Buzbee [Fri, 5 Feb 2010 00:09:55 +0000 (16:09 -0800)]
Jit: Start the Jit when framework signals on first screen draw

Cleanup of delayed start - introduce dvmRelativeCondWait in Sync.c.
Additionally, support for deadman timer to start Jit when no screen draws
happen, and to start immediately when running stand-alone.

Fixed bug in assert variant of libdvm - recent MONITOR change had neglected
to add a new type of exit to the exit stats.

14 years agoam adbe0586: am 217f8ef4: reconcile main tree with open-source eclair
The Android Open Source Project [Fri, 5 Feb 2010 22:12:51 +0000 (14:12 -0800)]
am adbe0586: am 217f8ef4: reconcile main tree with open-source eclair

Merge commit 'adbe0586957a71d2aa9f100646882dbca1c78f12'

* commit 'adbe0586957a71d2aa9f100646882dbca1c78f12':
  android-2.1_r1 snapshot

14 years agoam 217f8ef4: reconcile main tree with open-source eclair
The Android Open Source Project [Fri, 5 Feb 2010 16:40:23 +0000 (08:40 -0800)]
am 217f8ef4: reconcile main tree with open-source eclair

Merge commit '217f8ef4c1c151c63382dc0785edd960c233f62e' into eclair-plus-aosp

* commit '217f8ef4c1c151c63382dc0785edd960c233f62e':
  android-2.1_r1 snapshot

14 years agoreconcile main tree with open-source eclair
The Android Open Source Project [Fri, 5 Feb 2010 16:09:32 +0000 (08:09 -0800)]
reconcile main tree with open-source eclair

14 years agoMerge "Made Self Verification mode's memory interface less intrusive."
Jeff Hao [Thu, 4 Feb 2010 23:34:14 +0000 (15:34 -0800)]
Merge "Made Self Verification mode's memory interface less intrusive."

14 years agoMade Self Verification mode's memory interface less intrusive.
jeffhao [Wed, 3 Feb 2010 18:24:05 +0000 (10:24 -0800)]
Made Self Verification mode's memory interface less intrusive.

14 years agoMerge "Add two TrustCenter roots: - TC TrustCenter Class 2 CA II - TC TrustCenter...
Nagendra Modadugu [Thu, 4 Feb 2010 21:08:57 +0000 (13:08 -0800)]
Merge "Add two TrustCenter roots: - TC TrustCenter Class 2 CA II - TC TrustCenter Universal CA I"

14 years agoAdd two TrustCenter roots:
Nagendra Modadugu [Thu, 4 Feb 2010 19:31:38 +0000 (11:31 -0800)]
Add two TrustCenter roots:
- TC TrustCenter Class 2 CA II
- TC TrustCenter Universal CA I

14 years agoJit: Fix deadlock in method tracing.
Bill Buzbee [Thu, 4 Feb 2010 02:13:57 +0000 (18:13 -0800)]
Jit: Fix deadlock in method tracing.

14 years agoIncrease the size of the stack reserved area.
Andy McFadden [Wed, 3 Feb 2010 20:54:00 +0000 (12:54 -0800)]
Increase the size of the stack reserved area.

This increases the size of the "reserved" area, used for handling stack
overflows, from 512 to 768 bytes.  There will be a corresponding
reduction in the amount of stack space available to interpreted threads
(which currently default to 12KB).

It turns out 512 bytes isn't quite enough space when class lookup throws
an exception while resolving "catch" block classes during a stack
overflow error.

For bug 2398031.

14 years agoFix stack overflow edge case.
Andy McFadden [Wed, 3 Feb 2010 15:21:14 +0000 (07:21 -0800)]
Fix stack overflow edge case.

When a stack overflows, Dalvik allows the stack to expand into a
"reserved" area, so that it has enough room to create and initialize the
StackOverflowError object.  While the stack is expanded we also do the
search for an appropriate "catch" block, which may require resolving
some exception classes.

As it happens, things go badly when the "catch" resolution throws an
exception.  The VM tries to shrink the stack back down after the second
exception is finished, rather than waiting for the initial SOE to
finish.  Since we still have some additional frames on the stack, we're
still occupying the "reserved" area, and the VM aborts when it detects
the situation.

This changes the stack cleanup to wait until the SOE is being dealt
with.

For bug 2398031.

14 years agoFix performance issues related to chaining and unchaining.
Ben Cheng [Wed, 27 Jan 2010 00:46:15 +0000 (16:46 -0800)]
Fix performance issues related to chaining and unchaining.

1) Patching requests for predicted chaining cells (used by virtual/interface
methods) are now batched in a queue and processed when the VM is paused for GC.

2) When the code cache is full the reset operation is also conducted at the
end of GC pauses so this totally eliminates the need for the compiler thread
to issue suspend-all requests. This is a very rare event and when happening it
takes less than 5ms to finish.

3) Change the initial value of the branch in a predicted chaining cell from 0
(ie lsl r0, r0, #0) to 0xe7fe (ie branch to self) so that initializing a
predicted chaining cell doesn't need to suspend all threads. Together with 1)
seeing 20% speedup on some benchmarks.

4) Add TestCompability.c where defining "TEST_VM_IN_ECLAIR := true" in
buildspec.mk will activate dummy symbols needed to run libdvm.so in older
releases.

Bug: 2397689
Bug: 2396513
Bug: 2331313

14 years agoMerge "Jit: Rework monitor enter/exit to simplify thread suspension"
Bill Buzbee [Wed, 3 Feb 2010 18:23:38 +0000 (10:23 -0800)]
Merge "Jit: Rework monitor enter/exit to simplify thread suspension"

14 years agoMerge "Fix a long standing bug within dvmHeapSourceGetObjectBitmaps. All callers...
Carl Shapiro [Wed, 3 Feb 2010 02:18:13 +0000 (18:18 -0800)]
Merge "Fix a long standing bug within dvmHeapSourceGetObjectBitmaps.  All callers of this function assign the return value to an unsigned value even though this function returns -1 in the error case.  This causes the error checks to succeed in cases where it should otherwise fail. Rather than return -1 on error, I have elected to return 0 instead which just happens to be compatible with all current uses."

14 years agoJit: Rework monitor enter/exit to simplify thread suspension
Bill Buzbee [Tue, 2 Feb 2010 19:04:33 +0000 (11:04 -0800)]
Jit: Rework monitor enter/exit to simplify thread suspension

The Jit must stop all threads in order to flush the translation cache (and
other tables).  Threads which are blocked in a monitor wait cause some
headache here because they effectively hold a references to the translation
cache (though the return address on the native stack).  The new model
introduced in this CL is that for the fast path of monitor enter, control
is allowed to resume in the translation cache.  However, if we need to do a
heavyweight lock (which may cause us to block) control does not return to the
translation cache but instead bails out to the interpreter.  This allows us to
safely clear the code cache even if some threads are in THREAD_MONITOR state.

14 years agoFix a long standing bug within dvmHeapSourceGetObjectBitmaps. All
Carl Shapiro [Tue, 2 Feb 2010 21:47:59 +0000 (13:47 -0800)]
Fix a long standing bug within dvmHeapSourceGetObjectBitmaps.  All
callers of this function assign the return value to an unsigned value
even though this function returns -1 in the error case.  This causes
the error checks to succeed in cases where it should otherwise fail.
Rather than return -1 on error, I have elected to return 0 instead
which just happens to be compatible with all current uses.

14 years agoMerge "A new test suite for our XSLT transforms."
Jesse Wilson [Tue, 2 Feb 2010 20:48:06 +0000 (12:48 -0800)]
Merge "A new test suite for our XSLT transforms."

14 years agoA new test suite for our XSLT transforms.
Jesse Wilson [Tue, 2 Feb 2010 02:33:00 +0000 (18:33 -0800)]
A new test suite for our XSLT transforms.

Currently the test suite isn't wired-in to run automatically. Before
that can happen I need to devise a way for the device to grab the
OASIS test .zip from the Internet (or distribute it with Android).

In the interim the test can be run by hand by manually copying the
test suite to the device ("adb push") and running the test suite's
main method. This approach might be workable in our continuous
build.

Note that the RI does horribly at this test suite - in my run it
reports the following:
   FAILURES!!!
   Tests run: 3173,  Failures: 338,  Errors: 730

14 years agoRestore our ability to parse an XML Document given a File argument
Jesse Wilson [Tue, 2 Feb 2010 19:18:33 +0000 (11:18 -0800)]
Restore our ability to parse an XML Document given a File argument
directly, rather than via a stream.

When I updated DocumentBuilder but not its subclass DocumentBuilderImpl,
some of the assumptions by DocumentBuilderImpl were violated.

14 years agoMerge "Move a test I wrote under our wing."
Elliott Hughes [Tue, 2 Feb 2010 17:02:51 +0000 (09:02 -0800)]
Merge "Move a test I wrote under our wing."

14 years agoReduce VM shutdown verbosity.
Andy McFadden [Tue, 2 Feb 2010 00:56:53 +0000 (16:56 -0800)]
Reduce VM shutdown verbosity.

Adds -verbose:shutdown flag, defaulted to "false".  Cuts out most of the
log noise associated with shell commands.

14 years agoMove a test I wrote under our wing.
Elliott Hughes [Tue, 2 Feb 2010 03:45:41 +0000 (19:45 -0800)]
Move a test I wrote under our wing.

I put this in amongst the harmony tests before we started our own little
tree of tests.