OSDN Git Service

android-x86/dalvik.git
14 years agoam 50f82ad4: am 08e0023c: Merge change I42d17725 into eclair-mr2
Dan Egnor [Wed, 18 Nov 2009 01:01:37 +0000 (17:01 -0800)]
am 50f82ad4: am 08e0023c: Merge change I42d17725 into eclair-mr2

Merge commit '50f82ad4f2c4047382029560fd09d1907518adc8'

* commit '50f82ad4f2c4047382029560fd09d1907518adc8':
  Cache NumberFormat and DecimalFormatSymbols objects in a ThreadLocal,

14 years agoam 239e94f6: am 28ac5b8c: Merge change I77af8135 into eclair-mr2
Elliott Hughes [Wed, 18 Nov 2009 01:01:32 +0000 (17:01 -0800)]
am 239e94f6: am 28ac5b8c: Merge change I77af8135 into eclair-mr2

Merge commit '239e94f6a7d54bf13c78171d841582557b5fdd38'

* commit '239e94f6a7d54bf13c78171d841582557b5fdd38':
  Fix Formatter.format's handling of Formattable.

14 years agoam 08e0023c: Merge change I42d17725 into eclair-mr2
Dan Egnor [Wed, 18 Nov 2009 00:58:01 +0000 (16:58 -0800)]
am 08e0023c: Merge change I42d17725 into eclair-mr2

Merge commit '08e0023c59828a443d993c7e6cb43bf9d197506a' into eclair-mr2-plus-aosp

* commit '08e0023c59828a443d993c7e6cb43bf9d197506a':
  Cache NumberFormat and DecimalFormatSymbols objects in a ThreadLocal,

14 years agoam 28ac5b8c: Merge change I77af8135 into eclair-mr2
Elliott Hughes [Wed, 18 Nov 2009 00:57:57 +0000 (16:57 -0800)]
am 28ac5b8c: Merge change I77af8135 into eclair-mr2

Merge commit '28ac5b8cfd52d1902a132a5faf8f102a8b33d6c2' into eclair-mr2-plus-aosp

* commit '28ac5b8cfd52d1902a132a5faf8f102a8b33d6c2':
  Fix Formatter.format's handling of Formattable.

14 years agoMerge change I42d17725 into eclair-mr2
Android (Google) Code Review [Wed, 18 Nov 2009 00:55:29 +0000 (16:55 -0800)]
Merge change I42d17725 into eclair-mr2

* changes:
  Cache NumberFormat and DecimalFormatSymbols objects in a ThreadLocal, so they can be reused between multiple instances of Formatter on the same thread.  This speeds up my unscientific benchmark (a number of printouts involved in a debugging diagnostics output) by 3x, and should have a similar impact on anyone who uses String.format(), PrintWriter.format(), and the like.

14 years agoMerge change I77af8135 into eclair-mr2
Android (Google) Code Review [Wed, 18 Nov 2009 00:54:48 +0000 (16:54 -0800)]
Merge change I77af8135 into eclair-mr2

* changes:
  Fix Formatter.format's handling of Formattable.

14 years agoam 52d2e5f4: am 08c24984: Merge change I0ee370b9 into eclair-mr2
Elliott Hughes [Wed, 18 Nov 2009 00:46:57 +0000 (16:46 -0800)]
am 52d2e5f4: am 08c24984: Merge change I0ee370b9 into eclair-mr2

Merge commit '52d2e5f4e7f75e3a2b38b0373158b7dff13e72cf'

* commit '52d2e5f4e7f75e3a2b38b0373158b7dff13e72cf':
  Consistently use Formatter's cached NumberFormat.

14 years agoam 08c24984: Merge change I0ee370b9 into eclair-mr2
Elliott Hughes [Wed, 18 Nov 2009 00:42:52 +0000 (16:42 -0800)]
am 08c24984: Merge change I0ee370b9 into eclair-mr2

Merge commit '08c24984fd3cb3e927c9a97b8413843b4b215dc5' into eclair-mr2-plus-aosp

* commit '08c24984fd3cb3e927c9a97b8413843b4b215dc5':
  Consistently use Formatter's cached NumberFormat.

14 years agoMerge change I0ee370b9 into eclair-mr2
Android (Google) Code Review [Wed, 18 Nov 2009 00:40:01 +0000 (16:40 -0800)]
Merge change I0ee370b9 into eclair-mr2

* changes:
  Consistently use Formatter's cached NumberFormat.

14 years agoCache NumberFormat and DecimalFormatSymbols objects in a ThreadLocal,
Dan Egnor [Tue, 17 Nov 2009 23:56:11 +0000 (15:56 -0800)]
Cache NumberFormat and DecimalFormatSymbols objects in a ThreadLocal,
so they can be reused between multiple instances of Formatter on the
same thread.  This speeds up my unscientific benchmark (a number of
printouts involved in a debugging diagnostics output) by 3x, and
should have a similar impact on anyone who uses String.format(),
PrintWriter.format(), and the like.

14 years agoam d3864b20: am dced7947: Reduce logging.
Andy McFadden [Tue, 17 Nov 2009 23:10:55 +0000 (15:10 -0800)]
am d3864b20: am dced7947: Reduce logging.

Merge commit 'd3864b207e6f6b090accd41a977ad23e18bdcf01'

* commit 'd3864b207e6f6b090accd41a977ad23e18bdcf01':
  Reduce logging.

14 years agoFix Formatter.format's handling of Formattable.
Elliott Hughes [Tue, 22 Sep 2009 21:38:18 +0000 (14:38 -0700)]
Fix Formatter.format's handling of Formattable.

This doesn't make much difference to performance, but it is
slightly faster and I think it reads better too. Proof of the
latter is the fact that the rewritten form accidentally fixed
bug 1767: the old code was storing up literal text until after
handling the next format specifier, which is wrong if the
format specifier has side effects caused by the use of
Formattable.

(I don't plan on doing any more on the performance bug for now,
though I note that %g allocates and manipulates BigDecimal
instances, which would be worth looking at when we get round to
the bug that causes it to fail a harmony test.)

Bug: 1476, 1767

14 years agoConsistently use Formatter's cached NumberFormat.
Elliott Hughes [Mon, 21 Sep 2009 21:08:38 +0000 (14:08 -0700)]
Consistently use Formatter's cached NumberFormat.

%f is a lot more expensive than it should be because we're not using the cached
NumberFormat (as we are for %d). Running the microbenchmark I added to the
bug (times in ms, on a Cortex A8):

                                old       new
      new Formatter %f         1732       811
      String.format %d          635       651
      String.format %f         1752       900
      reuse Formatter %f       1521       188
      Double.toString +         149       148
      Double.toString append     33        33
      StringBuilder.append      143       139

Bug: 1476

14 years agoam dced7947: Reduce logging.
Andy McFadden [Tue, 17 Nov 2009 22:05:42 +0000 (14:05 -0800)]
am dced7947: Reduce logging.

Merge commit 'dced79474902ffa57fbd48121eb794aad7d24ddc' into eclair-mr2-plus-aosp

* commit 'dced79474902ffa57fbd48121eb794aad7d24ddc':
  Reduce logging.

14 years agoMerge change I49b05da2
Android (Google) Code Review [Tue, 17 Nov 2009 21:47:34 +0000 (13:47 -0800)]
Merge change I49b05da2

* changes:
  Various XML fixes.

14 years agoReduce logging.
Andy McFadden [Tue, 17 Nov 2009 21:13:34 +0000 (13:13 -0800)]
Reduce logging.

This cuts out some unnecessarily verbose dalvikvm chatter, notably:

  Trying to load lib /system/lib/librs_jni.so 0x0
  Added shared lib /system/lib/librs_jni.so 0x0

These messages can be useful for people trying to get their apps to
work with the NDK, so I'm only suppressing them when the path starts
with "/system".  The result is that you can boot the system and run all
standard apps without seeing them, but we'll still see app-private libs
being loaded.

Also LOGI->LOGV for "Debugger thread not active, ignoring DDM send",
which seemed to be firing on startup for APp NaMe events.  Ditto for
"Splitting out new zygote heap", which only happens once, but doesn't
strike me as a particularly useful thing to log.

14 years agoVarious XML fixes.
Elliott Hughes [Tue, 17 Nov 2009 05:23:11 +0000 (21:23 -0800)]
Various XML fixes.

Add tests for bug 2487, exploring the situations where "]]>" is and isn't
allowed. Fix the bug by changing KXmlParser so it pays attention to
whether it's dealing with normal text or text in an attribute value and
reports errors appropriately.

In order to pass the new tests, we also need to fix DocumentBuilder to
pay attention to its DocumentBuilderFactory's "coalescing" setting: whether
or not adjacent text/CDATA nodes should be coalesced.

This in turn fixes a @KnownFailure in DocumentBuilderFactoryTest: previously
we didn't allow the caller to turn "coalescing" off (though until my
previous patch, we didn't actually coalesce anyway). Now we support both,
and I've made coalescing the default, because bug reports tell us that's
what users want. It's how the RI behaves, too.

Bug: 2487

14 years agoMerge change I117408b2
Android (Google) Code Review [Tue, 17 Nov 2009 15:19:49 +0000 (07:19 -0800)]
Merge change I117408b2

* changes:
  Restore support for DEX on FAT.

14 years agoMerge change Id8a539c6
Android (Google) Code Review [Tue, 17 Nov 2009 05:41:20 +0000 (21:41 -0800)]
Merge change Id8a539c6

* changes:
  Suppressing an invalid test that's checking implementation details.

14 years agoSuppressing an invalid test that's checking implementation details.
Jesse Wilson [Tue, 17 Nov 2009 02:31:15 +0000 (18:31 -0800)]
Suppressing an invalid test that's checking implementation details.

14 years agoRestore support for DEX on FAT.
Andy McFadden [Tue, 17 Nov 2009 00:14:54 +0000 (16:14 -0800)]
Restore support for DEX on FAT.

The recent change to mmap(read-write)+mprotect(read-only) doesn't seem
to work on FAT filesystems like /sdcard.  This caused problems for the
code that opens Zip files and the code that opens DEX files.

This change splits the "map file" function into "read only" and
"writable read only" versions, using the former for Zip and the latter
for DEX.  Further, failure to mprotect(read-only) is now considered a
soft failure and only causes a warning.

The only apps that will be affected by this are those using /sdcard to
hold optimized DEX data for "plugin" APKs.

Also: moved the non-HAVE_POSIX_FILEMAP implementation of file mapping
into a shared function.  (Could probably go away entirely.)

Also: fixed the expected output for test 071.

14 years agoMerge change I4c0dedfd
Android (Google) Code Review [Mon, 16 Nov 2009 23:10:01 +0000 (15:10 -0800)]
Merge change I4c0dedfd

* changes:
  Jit: string's compareTo performance improvement.

14 years agoSpecifying the /tmp directory and other properties for test runs.
Jesse Wilson [Mon, 16 Nov 2009 22:22:02 +0000 (14:22 -0800)]
Specifying the /tmp directory and other properties for test runs.

This fixes 2 broken tests in RandomAccessFile, and possibly others.

14 years agoJit: string's compareTo performance improvement.
Bill Buzbee [Mon, 16 Nov 2009 20:51:22 +0000 (12:51 -0800)]
Jit: string's compareTo performance improvement.

Changed compareTo handler to call __memcmp16() for strings >= 32 chars.
However, even for those strings, the first two chars are done in the
handler (to catch early-out cases).

Comparisons were done with micro-benchmarks comparing 10 and 200-char
strings.

The strings were:
    equal -> Q
    not equal at start -> S
    not equal at end -> E

The test configurations were handler (H) [the previous handler], subroutine (S)
[memcmp16()} and blended (B) [this commit]

       H         S          B
10E   60        138        65
10S   32         70        30
10Q    9          9         9
100E 745        708       716

In short, the small string cases were twice as fast with the existing
handler compared to memcmp16, but memcmp16 was ~5% faster for long
strings.

14 years agoChange the way breakpoints work.
Andy McFadden [Thu, 29 Oct 2009 00:39:02 +0000 (17:39 -0700)]
Change the way breakpoints work.

This replaces the breakpoint mechanism with a more efficient approach.
We now insert breakpoint instructions into the bytecode stream instead of
maintaining a table.  This requires mapping DEX files as private instead
of shared, which allows copy-on-write to work.  mprotect() is used to
guard the pages against inadvertent writes.

Unused opcode EC is now OP_BREAKPOINT.  It's not recognized by dexdump or
any interpreter except portdbg, but it can be encountered by the bytecode
verifier (the debugger can request breakpoints in unverified code).
Breakpoint changes are blocked while the verifier runs to avoid races.

This eliminates method->debugBreakpointCount, which is no longer needed.
(Also, it clashed with LinearAlloc's read-only mode.)

The deferred verification error mechanism was using a code-copying
approach to modify the bytecode stream.  That has been changed to use
the same copy-on-write modification mechanism.

Also, normalized all PAGE_SIZE/PAGESIZE references to a single
SYSTEM_PAGE_SIZE define.

Simple Fibonacci computation test times (opal-eng):
  JIT, no debugger: 10.6ms
  Fast interp, no debugger: 36ms
  Portable interp, no debugger: 43.8ms

  ORIG debug interp, no breakpoints set: 458ms
  ORIG debug interp, breakpoint set nearby: 697ms

  NEW debug interp, no breakpoints set: 341ms
  NEW debug interp, breakpoints set nearby: 341ms

Where "nearby" means there's a breakpoint in the method doing the
computation that isn't actually hit -- the VM had an optimization where
it flagged methods with breakpoints and skipped some of the processing
when possible.

The bottom line is that code should run noticeably faster while a
debugger is attached.

14 years agoMerge change I690f0051
Android (Google) Code Review [Mon, 16 Nov 2009 19:25:30 +0000 (11:25 -0800)]
Merge change I690f0051

* changes:
  Fixing a simple concurrency issue in the jtreg runner.

14 years agoFixing a simple concurrency issue in the jtreg runner.
Jesse Wilson [Mon, 16 Nov 2009 19:00:19 +0000 (11:00 -0800)]
Fixing a simple concurrency issue in the jtreg runner.

14 years agoMerge change If8e2929a
Android (Google) Code Review [Mon, 16 Nov 2009 18:30:41 +0000 (10:30 -0800)]
Merge change If8e2929a

* changes:
  Don't allocate arbitrary-length buffers on the stack.

14 years agoMerge change Id979947d
Android (Google) Code Review [Mon, 16 Nov 2009 18:25:08 +0000 (10:25 -0800)]
Merge change Id979947d

* changes:
  Remove org.kxml2.wap.

14 years agoam d829c399: merge from open-source master
Jean-Baptiste Queru [Sun, 15 Nov 2009 23:02:20 +0000 (15:02 -0800)]
am d829c399: merge from open-source master

Merge commit 'd829c39941df81efe05eb3e974cfc048ce2d47f2'

* commit 'd829c39941df81efe05eb3e974cfc048ce2d47f2':
  eclair snapshot

14 years agomerge from open-source master
Jean-Baptiste Queru [Sun, 15 Nov 2009 22:55:05 +0000 (14:55 -0800)]
merge from open-source master

14 years agomerge from open-source master
Jean-Baptiste Queru [Sun, 15 Nov 2009 22:05:56 +0000 (14:05 -0800)]
merge from open-source master

Merge commit 'goog/stage-korg-master' into HEAD

14 years agoJit: fix for compareTo handler.
Bill Buzbee [Sun, 15 Nov 2009 21:37:18 +0000 (13:37 -0800)]
Jit: fix for compareTo handler.

Note to self: Units tests are much more effective when the test main actually
calls them.

14 years agomerge from eclair
Jean-Baptiste Queru [Sun, 15 Nov 2009 20:05:35 +0000 (12:05 -0800)]
merge from eclair

14 years agoMerge change I07accb25
Android (Google) Code Review [Sun, 15 Nov 2009 19:24:58 +0000 (11:24 -0800)]
Merge change I07accb25

* changes:
  Fix CHECK_CAST problem in the Jit.

14 years agoFix CHECK_CAST problem in the Jit.
Bill Buzbee [Fri, 13 Nov 2009 01:07:16 +0000 (17:07 -0800)]
Fix CHECK_CAST problem in the Jit.

The Jit has previously (and wrongly) assumed that because any CHECK_CAST
operation had previously succeeded in the interpreter, that the class
that check cast's object was being check against would already be resolved.
However, if the object being checked is NULL, no attempt is made to resolve
the class.  First bug flushed out by the Jit's stress mode (woohoo).

14 years agoRemove org.kxml2.wap.
Elliott Hughes [Sat, 14 Nov 2009 02:10:06 +0000 (18:10 -0800)]
Remove org.kxml2.wap.

(Not to be submitted before d2944c35 in packages/apps/Email.)

Bug: 2249953

14 years agoDon't allocate arbitrary-length buffers on the stack.
Elliott Hughes [Sat, 14 Nov 2009 01:07:00 +0000 (17:07 -0800)]
Don't allocate arbitrary-length buffers on the stack.

A new LocalArray C++ class lets us specify a "reasonable" amount of stack to
use, but transparently fall back to using the heap if we need more space.

The three places I've chosen to use LocalArray in this patch are fairly
random; all they have in common is that they're the places where we call
GetStringUTFRegion. There are more places LocalArray will be useful: the
java.io.File JNI in particular.

Bug: 2257819

14 years agoMerge change I716b2844
Android (Google) Code Review [Fri, 13 Nov 2009 22:53:06 +0000 (14:53 -0800)]
Merge change I716b2844

* changes:
  Suppressing BufferedReader jtreg tests we're better off not passing.

14 years agoSuppressing BufferedReader jtreg tests we're better off not passing.
Jesse Wilson [Fri, 13 Nov 2009 22:24:18 +0000 (14:24 -0800)]
Suppressing BufferedReader jtreg tests we're better off not passing.

14 years agoIf we have a Class object in the "monitors held:" output, show which class.
Elliott Hughes [Fri, 13 Nov 2009 19:20:15 +0000 (11:20 -0800)]
If we have a Class object in the "monitors held:" output, show which class.

Bug: 2187020

14 years agoMerge change Iaf8fd5ec
Android (Google) Code Review [Fri, 13 Nov 2009 06:43:32 +0000 (22:43 -0800)]
Merge change Iaf8fd5ec

* changes:
  Fix HttpURLConnection's chunked encoding behavior.

14 years agoFix HttpURLConnection's chunked encoding behavior.
Elliott Hughes [Thu, 12 Nov 2009 22:05:59 +0000 (14:05 -0800)]
Fix HttpURLConnection's chunked encoding behavior.

A third-party developer who wasn't reading to the end of the stream found that
their next connection would return junk, which turned out to be the tail of
the first response (thanks to connection recycling). Make sure we clean up
a chunked-encoding stream before allowing the connection to be reused.

Enhance our test web server to implement chunked encoding properly, with
configurable chunk sizes, rather than just responding with a single chunk.

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

14 years agoeclair snapshot
Jean-Baptiste Queru [Fri, 13 Nov 2009 02:45:15 +0000 (18:45 -0800)]
eclair snapshot

14 years agoMerge change I200886b4
Android (Google) Code Review [Thu, 12 Nov 2009 23:53:25 +0000 (15:53 -0800)]
Merge change I200886b4

* changes:
  Make cacerts.bks available to the simulator too.

14 years agoMake cacerts.bks available to the simulator too.
Elliott Hughes [Thu, 12 Nov 2009 22:51:57 +0000 (14:51 -0800)]
Make cacerts.bks available to the simulator too.

This lets you successfully run more tests on a sim-eng build than otherwise,
by bringing us in line with the normal on-device configuration.

14 years agoRemove OSNetworkSystem.oneTimeInitialization.
Elliott Hughes [Thu, 12 Nov 2009 20:23:05 +0000 (12:23 -0800)]
Remove OSNetworkSystem.oneTimeInitialization.

Do this work at JNI registration time, as we do for almost everything else.
(I did this to rule out a warning from the dalvikvm deadlock prediction
code, which doesn't like the unusual lock ordering at initialization time,
and although it didn't make any difference to that, I prefer to have a
defined static order of initialization.)

14 years agoMerge change Ica2d0b8c
Android (Google) Code Review [Thu, 12 Nov 2009 20:01:23 +0000 (12:01 -0800)]
Merge change Ica2d0b8c

* changes:
  Fix a buffer overrun in OSNetworkSystem.

14 years agoFix a buffer overrun in OSNetworkSystem.
Elliott Hughes [Thu, 12 Nov 2009 05:55:42 +0000 (21:55 -0800)]
Fix a buffer overrun in OSNetworkSystem.

Given an IPv6 address in a non-standard (Java-specific) form, we used to
overrun an on-stack buffer that was assuming the standard (shorter) form.
Make the buffer large enough for both forms, and reject anything that's
still too large.

Found by Inet6AddressTest.

14 years agoMerge change Id726991b
Android (Google) Code Review [Thu, 12 Nov 2009 17:30:38 +0000 (09:30 -0800)]
Merge change Id726991b

* changes:
  Jit stress mode: translate everything we can and self verify.

14 years agoFix typos in the XmlPullParser documentation.
Elliott Hughes [Thu, 12 Nov 2009 01:22:45 +0000 (17:22 -0800)]
Fix typos in the XmlPullParser documentation.

14 years agoJit stress mode: translate everything we can and self verify.
Bill Buzbee [Tue, 10 Nov 2009 22:31:32 +0000 (14:31 -0800)]
Jit stress mode: translate everything we can and self verify.

This represents a general clean-up of some existing command-line
options: -Xjitthreshold:num and -Xjitblocking.  The jit threshold
controls how quickly we treat a Dalvik address as a potential trace
head.  Normally this is set around 200 (and the range is 0..255, where
0 is in effect 256 and 1 means begin trace selection on first visit).

-Xjitblocking forces the system to pause execution whenever a translation
request is made and resume when that translation is complete.  Normally
the system make a request but continues execution (to avoid jitter).

Additionally, if WITH_SELF_VERIFICATION is defined, we force blocking
to be true, and set the threshold to 1.  And finally, we treat
threshold==1 as a special case and disable the 2nd-level trace-building
filter - which causes the system to immediately start trace selection.

14 years agoFix DOM parsing of character references/entities.
Elliott Hughes [Tue, 10 Nov 2009 21:20:43 +0000 (13:20 -0800)]
Fix DOM parsing of character references/entities.

Our DOM parser didn't support { or š character references,
and didn't merge adjacent text nodes into one (so "a&b" would be
three text nodes rather than one; SAX allows the former, but DOM
guarantees the latter).

This patch fixes both bugs, and adds tests.

Bug: 2607 (and duplicates)

14 years agoBring our kxml2 up to date with upstream.
Elliott Hughes [Tue, 10 Nov 2009 00:06:42 +0000 (16:06 -0800)]
Bring our kxml2 up to date with upstream.

Much of this is spurious whitespace changes, but there's some increased
"relaxation". I deliberately lost the Android-specific change that was
avoiding Runtime, since we do now have Runtime. I've added an Android-specific
change to comment out some System.out logging that's been added upstream.

I'd tell you the upstream revision number, but they're still using CVS, so
there isn't one.

14 years agoam 216438fc: (-s ours) am 83859891: am 3dc6a811: (-s ours) DO NOT MERGE. CTS test...
Brett Chabot [Mon, 9 Nov 2009 21:49:10 +0000 (13:49 -0800)]
am 216438fc: (-s ours) am 83859891: am 3dc6a811: (-s ours) DO NOT MERGE. CTS test cleanup. Mark tests as KnownFailures and BrokenTests.

Merge commit '216438fc405d78069b1042cc21fc43dc85f860a9'

* commit '216438fc405d78069b1042cc21fc43dc85f860a9':
  DO NOT MERGE. CTS test cleanup. Mark tests as KnownFailures and BrokenTests.

14 years agoMerge change Ie65d9758
Android (Google) Code Review [Mon, 9 Nov 2009 20:43:42 +0000 (12:43 -0800)]
Merge change Ie65d9758

* changes:
  Introduce "just interpret" chainable pseudo-translation.

14 years agoIntroduce "just interpret" chainable pseudo-translation.
Bill Buzbee [Sun, 8 Nov 2009 22:31:20 +0000 (14:31 -0800)]
Introduce "just interpret" chainable pseudo-translation.

This is the first step towards enabling translation & self-cosim stress modes.
When trace selection begins, the trace head address is pinned and
remains in a limbo state until the translation is complete.  Previously,
if the trace selected aborted for any reason, the trace head would remain
forever in limbo.  This was not a correctness problem, but caused some
small performance anomolies and made life more difficult for self-cosimulation
mode.

This CL introduces a pseudo-translation that simply routes control to
the interpreter.  When we detect that a trace selection attempt has
failed, the trace head is associated with this fully-chainable
pseudo-translation.  This also has the benefit for self-cosimulation that
we are guaranteed forward progress.

14 years agoam 83859891: am 3dc6a811: (-s ours) DO NOT MERGE. CTS test cleanup. Mark tests as...
Brett Chabot [Mon, 9 Nov 2009 20:14:35 +0000 (12:14 -0800)]
am 83859891: am 3dc6a811: (-s ours) DO NOT MERGE. CTS test cleanup. Mark tests as KnownFailures and BrokenTests.

Merge commit '838598912874c49de45aba3baac644d177920115' into eclair-mr2-plus-aosp

* commit '838598912874c49de45aba3baac644d177920115':
  DO NOT MERGE. CTS test cleanup. Mark tests as KnownFailures and BrokenTests.

14 years agoam 3dc6a811: (-s ours) DO NOT MERGE. CTS test cleanup. Mark tests as KnownFailures...
Brett Chabot [Mon, 9 Nov 2009 19:58:12 +0000 (11:58 -0800)]
am 3dc6a811: (-s ours) DO NOT MERGE. CTS test cleanup. Mark tests as KnownFailures and BrokenTests.

Merge commit '3dc6a81182178a8ac9570a7679cf24b6a2665a0b' into eclair-mr2

* commit '3dc6a81182178a8ac9570a7679cf24b6a2665a0b':
  DO NOT MERGE. CTS test cleanup. Mark tests as KnownFailures and BrokenTests.

14 years agoam 3dc6a811: DO NOT MERGE. CTS test cleanup. Mark tests as KnownFailures and BrokenTests.
Brett Chabot [Mon, 9 Nov 2009 19:48:49 +0000 (11:48 -0800)]
am 3dc6a811: DO NOT MERGE. CTS test cleanup. Mark tests as KnownFailures and BrokenTests.

Merge commit '3dc6a81182178a8ac9570a7679cf24b6a2665a0b' into eclair-plus-aosp

* commit '3dc6a81182178a8ac9570a7679cf24b6a2665a0b':
  DO NOT MERGE. CTS test cleanup. Mark tests as KnownFailures and BrokenTests.

14 years agoList -lcrypto when building for host darwin-x86, as that's part of
Dan Bornstein [Mon, 9 Nov 2009 01:46:20 +0000 (17:46 -0800)]
List -lcrypto when building for host darwin-x86, as that's part of
OpenSSL (in addition to -lssl, which was already listed).

Change-Id: Iddc53ee474dae030755395266a35f472f9b568b5

14 years agoDO NOT MERGE. CTS test cleanup. Mark tests as KnownFailures and BrokenTests.
Brett Chabot [Thu, 5 Nov 2009 18:52:02 +0000 (10:52 -0800)]
DO NOT MERGE. CTS test cleanup. Mark tests as KnownFailures and BrokenTests.

14 years agoMerge change I16a7c847
Android (Google) Code Review [Fri, 6 Nov 2009 22:06:32 +0000 (17:06 -0500)]
Merge change I16a7c847

* changes:
  Our XML serializer permits \0, resulting in malformed documents.

14 years agoMerge change I52b6299c
Android (Google) Code Review [Fri, 6 Nov 2009 22:04:06 +0000 (17:04 -0500)]
Merge change I52b6299c

* changes:
  Sanitize text before emitting to XML.

14 years agoSanitize text before emitting to XML.
Jesse Wilson [Fri, 6 Nov 2009 19:41:32 +0000 (11:41 -0800)]
Sanitize text before emitting to XML.

This is the absolute least amount of sanitization that will work.
I'll consider adding more as necessary; currently I'm not too
interested in spending the time to make this perfect.

14 years agoOur XML serializer permits \0, resulting in malformed documents.
Jesse Wilson [Fri, 6 Nov 2009 19:09:08 +0000 (11:09 -0800)]
Our XML serializer permits \0, resulting in malformed documents.

This failing test demonstrates the problem. It also adds AllTests
plumbing for this test and some missing ones.

14 years agoMerge change I2d4116b7
Android (Google) Code Review [Fri, 6 Nov 2009 17:40:03 +0000 (12:40 -0500)]
Merge change I2d4116b7

* changes:
  Clean up sieb.[ch], including changing a reference to <malloc.h> to instead be the more standard <stdlib.h>.

14 years agoMerge change I364c9428
Android (Google) Code Review [Fri, 6 Nov 2009 01:27:23 +0000 (20:27 -0500)]
Merge change I364c9428

* changes:
  Remove 'GTE CyberTrust Root', which expired on 2/23/06.

14 years agoRemove 'GTE CyberTrust Root', which expired on 2/23/06.
Nagendra Modadugu [Fri, 6 Nov 2009 01:17:29 +0000 (17:17 -0800)]
Remove 'GTE CyberTrust Root', which expired on 2/23/06.

14 years agoClean up sieb.[ch], including changing a reference to <malloc.h> to instead
Dan Bornstein [Fri, 6 Nov 2009 00:53:48 +0000 (16:53 -0800)]
Clean up sieb.[ch], including changing a reference to <malloc.h> to instead
be the more standard <stdlib.h>.

I have no idea what "sieb" means (stands for?), and it looks like these
files may want to be placed in the nearest recycling receptacle, but I'm
not ready to go there today.

Change-Id: I2d4116b742e61018fdbea127070154545ff82dbd

14 years agoMore OSNetworkSystem cleanup.
Elliott Hughes [Thu, 5 Nov 2009 21:50:06 +0000 (13:50 -0800)]
More OSNetworkSystem cleanup.

Handle select(2) errors by throwing exceptions from native code (which is
simpler and provides more useful detail messages).

Factor out exception throwing commonality. This is probably ready for JNIHelp.h
now.

Remove sockSelect. Simplify selectWait by observing that it's only ever called
with a "read" fdset.

Remove a little more SOCKERR_* cruft.

Remove a few unused #defines.

14 years agoMerge change I5cae54d2
Android (Google) Code Review [Thu, 5 Nov 2009 19:27:49 +0000 (14:27 -0500)]
Merge change I5cae54d2

* changes:
  More OSNetworkSystem cleanup.

14 years agoMerge change Iefbd3c5e
Android (Google) Code Review [Thu, 5 Nov 2009 18:48:34 +0000 (13:48 -0500)]
Merge change Iefbd3c5e

* changes:
  Fix DEADLOCK_DETECTION mode for the Jit.

14 years agoMerge change I7b302183
Android (Google) Code Review [Thu, 5 Nov 2009 18:23:43 +0000 (13:23 -0500)]
Merge change I7b302183

* changes:
  Remove cruft in the default libdvm.so and add 3 more special targets.

14 years agoMore OSNetworkSystem cleanup.
Elliott Hughes [Thu, 5 Nov 2009 18:00:02 +0000 (10:00 -0800)]
More OSNetworkSystem cleanup.

Fix danfuzz's BSD woes by removing uses of non-standard s6_addr32,
replace isMappedAddress with IN6_IS_ADDR_V4MAPPED, and change
convertMappedToIpv4 to reduce duplication in its callers.

Remove the TODO suggesting we consider inet_ntop instead of
getnameinfo; Ulrich Drepper says there's never any reason to
do that: http://people.redhat.com/drepper/userapi-ipv6.html

Remove our last use of sockaddr_in in favor of sockaddr_storage,
so we never have to wonder "is that big enough?" again.

Explain why we convert IPv4-mapped addresses to IPv4 addresses
when there's no obvious reason to do so.

Fix another user of the SOCKERR_* cruft.

Address the FD_ISSET and what-exception-to-throw-on-BSD comments
from danfuzz's last patch.

14 years agoFix DEADLOCK_DETECTION mode for the Jit.
Bill Buzbee [Thu, 5 Nov 2009 06:18:40 +0000 (22:18 -0800)]
Fix DEADLOCK_DETECTION mode for the Jit.

14 years agoMerge change Ic5176ecb
Android (Google) Code Review [Thu, 5 Nov 2009 01:22:15 +0000 (20:22 -0500)]
Merge change Ic5176ecb

* changes:
  Remove deadlock-prone thread pool.

14 years agoRemove deadlock-prone thread pool.
Elliott Hughes [Thu, 5 Nov 2009 00:00:06 +0000 (16:00 -0800)]
Remove deadlock-prone thread pool.

This is only test code, so let's not make it any more complicated than it
needs to be.

(The code sometimes locked the Vector before the individual Worker, and
sometimes the other way round.)

14 years agoOnly compile in multicast support on Linux, for the time being.
Dan Bornstein [Wed, 4 Nov 2009 23:34:14 +0000 (15:34 -0800)]
Only compile in multicast support on Linux, for the time being.

The calls and structs provided by the underlying platform for
multicast aren't yet exactly well-established POSIX standards, and the
current Linux code is still not considered to be super-robust, and as
such it isn't a good idea to try to duplicate its functionality for
other platforms. We will revisit the issue once the Linux side has
matured a bit.

Change-Id: I630086e22f6980726fd4523cb60dfc8c9fb9b011

14 years agoMerge change Id9fcfa6d
Android (Google) Code Review [Wed, 4 Nov 2009 22:56:07 +0000 (17:56 -0500)]
Merge change Id9fcfa6d

* changes:
  Fix for inline string indexof; added regression tests

14 years agoFix for inline string indexof; added regression tests
Bill Buzbee [Wed, 4 Nov 2009 00:52:53 +0000 (16:52 -0800)]
Fix for inline string indexof; added regression tests

14 years agoRemove cruft in the default libdvm.so and add 3 more special targets.
Ben Cheng [Wed, 4 Nov 2009 00:19:11 +0000 (16:19 -0800)]
Remove cruft in the default libdvm.so and add 3 more special targets.

The idea is similar to having libc.so as the default/optimal build and
libc_debug.so at a handy place.

libdvm.so       : default build to be installed with JIT on and assertion off.
libdvm_interp.so: JIT statically compiled out and assertion off.
libdvm_assert.so: assert/JIT-tuning enabled.
libdvm_sv.so    : assert/JIT-self-verification enabled.

Compile time of "mmm dalvik" from clean build with -j1:

real    2m36.144s
user    2m23.029s
sys     0m12.253s

Compile time of "mmm dalvik" from touching Interp.c with -j1:

real    0m8.493s
user    0m7.416s
sys     0m1.280s

Code size:

638152 Nov  3 16:17 libdvm.so
785604 Nov  3 16:17 libdvm_assert.so
556888 Nov  3 16:17 libdvm_interp.so
793804 Nov  3 16:17 libdvm_sv.so

14 years agoMerge change Ib62b9223
Android (Google) Code Review [Wed, 4 Nov 2009 21:29:46 +0000 (16:29 -0500)]
Merge change Ib62b9223

* changes:
  Emitting JUnit+Ant style XML from the jtreg test runner.

14 years agoMerge change I6b080ffc
Android (Google) Code Review [Wed, 4 Nov 2009 20:16:35 +0000 (15:16 -0500)]
Merge change I6b080ffc

* changes:
  Another couple of tweaks to deal with the ragged end of standardization.

14 years agoMerge change I7e695ea9
Android (Google) Code Review [Wed, 4 Nov 2009 19:45:16 +0000 (14:45 -0500)]
Merge change I7e695ea9

* changes:
  Remove duplication in OpenSSLSocket/OpenSSLServerSocket.

14 years agoAnother couple of tweaks to deal with the ragged end of standardization.
Dan Bornstein [Tue, 3 Nov 2009 23:10:26 +0000 (15:10 -0800)]
Another couple of tweaks to deal with the ragged end of standardization.

Change-Id: I6b080ffcc1832a902e21f5137f42e4d860c407f0

14 years agoEmitting JUnit+Ant style XML from the jtreg test runner.
Jesse Wilson [Wed, 4 Nov 2009 19:18:01 +0000 (11:18 -0800)]
Emitting JUnit+Ant style XML from the jtreg test runner.

This change adds some unfortunate code duplication between
the jtreg runner and the CoreTestSuite runner. I'd like to
eventually loop back and create a unified test runner for
either type of test.

14 years agoMerge change I71684d91
Android (Google) Code Review [Wed, 4 Nov 2009 02:01:55 +0000 (21:01 -0500)]
Merge change I71684d91

* changes:
  CharsetDecoderICU/CharsetEncoderICU should take arrayOffset into account.

14 years agoMerge change Ic80147bd
Android (Google) Code Review [Wed, 4 Nov 2009 01:46:08 +0000 (20:46 -0500)]
Merge change Ic80147bd

* changes:
  Adding timeouts to jtreg runner.

14 years agoAdding timeouts to jtreg runner.
Jesse Wilson [Wed, 4 Nov 2009 00:45:07 +0000 (16:45 -0800)]
Adding timeouts to jtreg runner.

Also fixing some problems with the Android.mk which was
pointing at an old version of the Run class.

14 years agoRemove duplication in OpenSSLSocket/OpenSSLServerSocket.
Elliott Hughes [Wed, 4 Nov 2009 00:36:49 +0000 (16:36 -0800)]
Remove duplication in OpenSSLSocket/OpenSSLServerSocket.

14 years agoCharsetDecoderICU/CharsetEncoderICU should take arrayOffset into account.
Elliott Hughes [Tue, 3 Nov 2009 23:52:10 +0000 (15:52 -0800)]
CharsetDecoderICU/CharsetEncoderICU should take arrayOffset into account.

CharsetDecoderICU and CharsetEncoderICU special-case array-backed ByteBuffers
and CharBuffers for performance reasons, but they shouldn't assume that the
backing array always has offset 0.

An external user hit this while using the jAudioTagger library.

Test cases from user submission:
http://code.google.com/p/android/issues/detail?id=4237

See also: 2234697

14 years agoRemove more @KnownFailures now I've run tests.AllTests.
Elliott Hughes [Tue, 3 Nov 2009 21:32:16 +0000 (13:32 -0800)]
Remove more @KnownFailures now I've run tests.AllTests.

A lunchtime run of the full suite turned up more.

14 years agoHide JIT-specific constants when JIT is not configured.
Ben Cheng [Tue, 3 Nov 2009 20:20:28 +0000 (12:20 -0800)]
Hide JIT-specific constants when JIT is not configured.

14 years agoMerge change Ia61d31e2
Android (Google) Code Review [Tue, 3 Nov 2009 19:52:25 +0000 (14:52 -0500)]
Merge change Ia61d31e2

* changes:
  Remove @KnownFailure from a bunch of tests that now pass.

14 years agoRemove @KnownFailure from a bunch of tests that now pass.
Elliott Hughes [Tue, 3 Nov 2009 19:44:56 +0000 (11:44 -0800)]
Remove @KnownFailure from a bunch of tests that now pass.

Looks like we got some of our Locales back.

14 years agoImplement chaining up to the first 64 cases in a switch statement.
Ben Cheng [Thu, 29 Oct 2009 21:39:18 +0000 (14:39 -0700)]
Implement chaining up to the first 64 cases in a switch statement.

14 years agoBack out inline string optimizations until cause of instability tracked down.
Bill Buzbee [Tue, 3 Nov 2009 16:06:02 +0000 (08:06 -0800)]
Back out inline string optimizations until cause of instability tracked down.

14 years agoEnsure dalvikvm sets "user.name" to "root" for our tests.
Elliott Hughes [Tue, 3 Nov 2009 02:16:19 +0000 (18:16 -0800)]
Ensure dalvikvm sets "user.name" to "root" for our tests.

dalvikvm sets "user.name" to $USER, but that environment variable isn't set
when we run the tests. I was looking at our DatagramSocketTest failure, and
it turns out it's another instance of "root can do stuff other users can't".
The typical way harmony tests check whether they're running as root is to
compare "user.name" against "root", but from run-core-tests they see "".

14 years agoMerge change I22212019
Android (Google) Code Review [Tue, 3 Nov 2009 00:51:25 +0000 (19:51 -0500)]
Merge change I22212019

* changes:
  Kill OSNetworkSystem.inheritedChannelImpl.