OSDN Git Service

android-x86/dalvik.git
14 years agoSeparately sweep the monitor list before sweeping the heap. Required
Carl Shapiro [Fri, 8 Jan 2010 05:35:50 +0000 (21:35 -0800)]
Separately sweep the monitor list before sweeping the heap.  Required
for the copying collector so we can abandon objects without examining
their headers.  There is a liminal reduction in sweep time when using
the non-moving collector.  In addition, this change uncomments a call
to free to reclaim the monitor when its owning object is unmarked.

14 years agoInvert a conditional to make it correctly specified. Without this
Carl Shapiro [Wed, 6 Jan 2010 04:38:03 +0000 (20:38 -0800)]
Invert a conditional to make it correctly specified.  Without this
inversion the errant conditional would cause waitSetCheck to return a
false positive for certain non-circular lists that, in turn, lead to
VM aborts in builds with assertions enabled.

14 years agoLast bunch of NumberFormat speedups.
Elliott Hughes [Tue, 5 Jan 2010 19:24:56 +0000 (11:24 -0800)]
Last bunch of NumberFormat speedups.

Don't mess around with setCurrency in DecimalFormat.copySymbols when we're
going to override any effect that call will have had in the next few lines:
we always call setCurrencySymbol and setInternationalCurrencySymbol, so
setCurrency is just wasting time.

Replaces the NativeDecimalFormat.UNumberFormatSymbol enum -- which was only used
for getting ints to pass to native code, using Enum.ordinal -- with ints.

Adds a constructor to the java.text DecimalFormat so we can avoid cloning the
DecimalFormatSymbols object we create for its private use.

This is another 10% shaved off.

I've also removed an unused local from the icu4jni DecimalFormat, so I can
remove a then-unused getLocale method from the ICU DecimalFormatSymbols.

I've rewritten the icu4jni DecimalFormatSymbols.clone to remove the scary
constructor that took an arbitrary int and treated it as a uintptr_t when
talking to native code.

14 years agoMerge "Remove references to the old wait implementation in various comments. Also...
Carl Shapiro [Tue, 5 Jan 2010 18:18:30 +0000 (10:18 -0800)]
Merge "Remove references to the old wait implementation in various comments. Also, move the waitMutex above the values it guards to improve the readability of the Thread structure."

14 years agoFix a broken test.
Elliott Hughes [Tue, 5 Jan 2010 01:15:49 +0000 (17:15 -0800)]
Fix a broken test.

This test assumed Integer.toString has no caching.

14 years agoMerge "Speed up DecimalFormatSymbols."
Elliott Hughes [Tue, 5 Jan 2010 01:09:54 +0000 (17:09 -0800)]
Merge "Speed up DecimalFormatSymbols."

14 years agoRemove references to the old wait implementation in various comments.
Carl Shapiro [Tue, 5 Jan 2010 00:50:00 +0000 (16:50 -0800)]
Remove references to the old wait implementation in various comments.
Also, move the waitMutex above the values it guards to improve the
readability of the Thread structure.

14 years agoSpeed up DecimalFormatSymbols.
Elliott Hughes [Mon, 4 Jan 2010 23:23:25 +0000 (15:23 -0800)]
Speed up DecimalFormatSymbols.

We don't need to create temporary String objects; we can just pass a char
directly. We also don't need to initialize aspects of our native peer if
we know we're going to overwrite them straight away, and making copying
into ICU the responsibility of the icu4jni class rather than the java.text
is slightly cleaner.

Together, these changes make creating a new NumberFormat about 20% faster.

14 years agoMerge "Remove the case where we make it hard to tell that a GC takes a long time."
Barry Hayes [Tue, 5 Jan 2010 00:17:36 +0000 (16:17 -0800)]
Merge "Remove the case where we make it hard to tell that a GC takes a long time."

14 years agoRemove the case where we make it hard to tell that a GC takes a long time.
Barry Hayes [Tue, 5 Jan 2010 00:10:09 +0000 (16:10 -0800)]
Remove the case where we make it hard to tell that a GC takes a long time.

14 years agoMerge "New implementation of wait, notify, and notifyAll. Uses an explicit queue...
Carl Shapiro [Tue, 5 Jan 2010 00:08:53 +0000 (16:08 -0800)]
Merge "New implementation of wait, notify, and notifyAll.  Uses an explicit queue to represent the wait set instead of the implicit queue within the monitor condition variable."

14 years agoMerge "Percolate the reason for a GC up far enough to print out in logging messages."
Barry Hayes [Tue, 5 Jan 2010 00:02:35 +0000 (16:02 -0800)]
Merge "Percolate the reason for a GC up far enough to print out in logging messages."

14 years agoPercolate the reason for a GC up far enough to print out in logging messages.
Barry Hayes [Mon, 4 Jan 2010 18:33:46 +0000 (10:33 -0800)]
Percolate the reason for a GC up far enough to print out in logging messages.

14 years agoNew implementation of wait, notify, and notifyAll. Uses an explicit
Carl Shapiro [Fri, 25 Dec 2009 03:56:53 +0000 (19:56 -0800)]
New implementation of wait, notify, and notifyAll.  Uses an explicit
queue to represent the wait set instead of the implicit queue within
the monitor condition variable.

14 years agoFix build (accidental API leak).
Elliott Hughes [Mon, 4 Jan 2010 22:06:25 +0000 (14:06 -0800)]
Fix build (accidental API leak).

Move a couple of methods into LocaleData -- where they should have been from
the beginning -- so they're automatically hidden from our users.

14 years agoMerge "Stop using ResourceBundle for locale data."
Elliott Hughes [Mon, 4 Jan 2010 21:32:11 +0000 (13:32 -0800)]
Merge "Stop using ResourceBundle for locale data."

14 years agoStop using ResourceBundle for locale data.
Elliott Hughes [Wed, 23 Dec 2009 01:20:44 +0000 (17:20 -0800)]
Stop using ResourceBundle for locale data.

This offers an additional speed increase and gets rid of a lot of native code.

14 years agoI did not reconcile my change to remove the Lock structure from Object
Carl Shapiro [Wed, 23 Dec 2009 05:21:41 +0000 (21:21 -0800)]
I did not reconcile my change to remove the Lock structure from Object
after the JIT code generator was updated to accomodate the new format
of the lock work.  This change incorporates the changes that should
and would have gone it had I merged everything correctly.

14 years agoSupersede the Lock union type with a word-sized integer in the object
Carl Shapiro [Tue, 22 Dec 2009 04:23:45 +0000 (20:23 -0800)]
Supersede the Lock union type with a word-sized integer in the object
instance header.  An object's lock member is now just a bit-field.

14 years agoMerge change I71938023
Android (Google) Code Review [Wed, 23 Dec 2009 01:19:20 +0000 (17:19 -0800)]
Merge change I71938023

* changes:
  Assert that the incoming thread and monitor objects are not NULL.  The old implementation allowed monitors to be NULL when they were unlocked and otherwise unowned.  With the new lock word format, a NULL monitor object can only mean that an invariant has been lost.  Also, nix some trailing whitespace that crept into a comment.

14 years agoMerge change Ic4433c3d
Android (Google) Code Review [Wed, 23 Dec 2009 00:59:21 +0000 (16:59 -0800)]
Merge change Ic4433c3d

* changes:
  Jit: Update monitor lock/unlock to reflect thinlock changes (I34b20f49)

14 years agoJit: Update monitor lock/unlock to reflect thinlock changes (I34b20f49)
Bill Buzbee [Wed, 23 Dec 2009 00:15:39 +0000 (16:15 -0800)]
Jit: Update monitor lock/unlock to reflect thinlock changes (I34b20f49)

14 years agoMerge change I47ec52f4
Android (Google) Code Review [Tue, 22 Dec 2009 23:17:26 +0000 (15:17 -0800)]
Merge change I47ec52f4

* changes:
  The FANCY_REFERENCE_SUBCLASS code is based on a misconception of what the VM is permitted to do, and it would be buggy to ever turn it on.

14 years agoam d3b06457: am 6cdbef55: Merge change I1d9b205f into eclair
Brett Chabot [Tue, 22 Dec 2009 22:10:16 +0000 (14:10 -0800)]
am d3b06457: am 6cdbef55: Merge change I1d9b205f into eclair

Merge commit 'd3b0645772fd3364575b93c74428ae19f88c4238'

* commit 'd3b0645772fd3364575b93c74428ae19f88c4238':
  Skip locale dependent libcore tests if required locales are not present.

14 years agoam 6cdbef55: Merge change I1d9b205f into eclair
Brett Chabot [Tue, 22 Dec 2009 22:06:21 +0000 (14:06 -0800)]
am 6cdbef55: Merge change I1d9b205f into eclair

Merge commit '6cdbef55a948dffbeff211fb4e78066c053ecc2e' into eclair-plus-aosp

* commit '6cdbef55a948dffbeff211fb4e78066c053ecc2e':
  Skip locale dependent libcore tests if required locales are not present.

14 years agoMerge change I1d9b205f into eclair
Android (Google) Code Review [Tue, 22 Dec 2009 22:02:50 +0000 (14:02 -0800)]
Merge change I1d9b205f into eclair

* changes:
  Skip locale dependent libcore tests if required locales are not present.

14 years agoAssert that the incoming thread and monitor objects are not NULL. The
Carl Shapiro [Tue, 22 Dec 2009 21:49:53 +0000 (13:49 -0800)]
Assert that the incoming thread and monitor objects are not NULL.  The
old implementation allowed monitors to be NULL when they were unlocked
and otherwise unowned.  With the new lock word format, a NULL monitor
object can only mean that an invariant has been lost.  Also, nix some
trailing whitespace that crept into a comment.

14 years agoSkip locale dependent libcore tests if required locales are not present.
Brett Chabot [Fri, 18 Dec 2009 23:32:59 +0000 (15:32 -0800)]
Skip locale dependent libcore tests if required locales are not present.

Previously these tests were marked as KnownFailures - which is undesirable since
they can pass if the right Locale's are present on target.

Bug 2335906

Change-Id: I1d9b205f740b71880c57b48f069c302c5cec8792

14 years agoThe FANCY_REFERENCE_SUBCLASS code is based on a misconception of what the VM
Barry Hayes [Tue, 22 Dec 2009 19:01:38 +0000 (11:01 -0800)]
The FANCY_REFERENCE_SUBCLASS code is based on a misconception of what the VM
is permitted to do, and it would be buggy to ever turn it on.

14 years agoMerge change I23ada0f9
Android (Google) Code Review [Tue, 22 Dec 2009 18:46:45 +0000 (10:46 -0800)]
Merge change I23ada0f9

* changes:
  More ICU cleanup.

14 years agoMerge change I06f254ec
Android (Google) Code Review [Tue, 22 Dec 2009 05:49:54 +0000 (21:49 -0800)]
Merge change I06f254ec

* changes:
  Clean up some misunderstanding about what mspaces are: They are already pointers.

14 years agoMerge change I72a49a6f
Android (Google) Code Review [Tue, 22 Dec 2009 04:57:27 +0000 (20:57 -0800)]
Merge change I72a49a6f

* changes:
  Initialize the arg variables to avoid an uninitialized use compiler warning.  While this effects performance, with the native interpreter the speed of the portable interpreter is of diminished importance.

14 years agoInitialize the arg variables to avoid an uninitialized use compiler
Carl Shapiro [Tue, 22 Dec 2009 02:34:11 +0000 (18:34 -0800)]
Initialize the arg variables to avoid an uninitialized use compiler
warning.  While this effects performance, with the native interpreter
the speed of the portable interpreter is of diminished importance.

14 years agoMore ICU cleanup.
Elliott Hughes [Tue, 22 Dec 2009 04:24:12 +0000 (20:24 -0800)]
More ICU cleanup.

Don't duplicate SimpleDateFormat.patternChars in native code when we can just
access it directly.

Also remove a bit more duplication in the native code, and remove the early
scope closure in getCurrencyCodeNative. If we're going to waste space in
that function, let's waste it on an explanation of why a seemingly useless
assignment is actually totally necessary.

14 years agoMerge change I88786692
Android (Google) Code Review [Tue, 22 Dec 2009 02:34:06 +0000 (18:34 -0800)]
Merge change I88786692

* changes:
  Fix leaks in ICU JNI.

14 years agoMerge change I8cf2b8be
Android (Google) Code Review [Tue, 22 Dec 2009 02:25:06 +0000 (18:25 -0800)]
Merge change I8cf2b8be

* changes:
  Remove dead code from the garbage collector.  A previous commit eliminated all of the referencing code.

14 years agoMerge change I6f22b22e
Android (Google) Code Review [Tue, 22 Dec 2009 02:19:18 +0000 (18:19 -0800)]
Merge change I6f22b22e

* changes:
  Fixing BigDecimal.stripLeadingZeroes on "0e100", as discovered by jtreg.

14 years agoRemove dead code from the garbage collector. A previous commit
Carl Shapiro [Tue, 22 Dec 2009 02:05:29 +0000 (18:05 -0800)]
Remove dead code from the garbage collector.  A previous commit
eliminated all of the referencing code.

14 years agoFixing BigDecimal.stripLeadingZeroes on "0e100", as discovered by jtreg.
Jesse Wilson [Tue, 22 Dec 2009 01:59:46 +0000 (17:59 -0800)]
Fixing BigDecimal.stripLeadingZeroes on "0e100", as discovered by jtreg.

Plus other jtreg test scrubbing.

14 years agoRemove conditionally compiled code for monitor-only locks.
Carl Shapiro [Tue, 22 Dec 2009 00:40:06 +0000 (16:40 -0800)]
Remove conditionally compiled code for monitor-only locks.

14 years agoFix leaks in ICU JNI.
Elliott Hughes [Tue, 22 Dec 2009 00:36:28 +0000 (16:36 -0800)]
Fix leaks in ICU JNI.

Consistently use RAII to ensure we always clean up our UResourceBundle*s.

Remove redundant allocation/copying from the UnicodeString to jstring
conversion.

Also simplify a few other repetitive bits of code.

Note that getContentImpl is still in the old style because that function
contains gotos. The right fix for that function involves changing the Java
side to work with a class containing a field for each item, rather than the
current Object[].

14 years agoMerge change I34b20f49
Android (Google) Code Review [Mon, 21 Dec 2009 23:49:25 +0000 (15:49 -0800)]
Merge change I34b20f49

* changes:
  Repurpose bits 1 and 2 of the lockword for encoding the hash state of an object.  Invert the meaning of the shape bit to match the encoding scheme described in Bacon's paper.  Consequently, monitor pointers must have the lower 3 bits stripped before they may be dereferenced.

14 years agoRepurpose bits 1 and 2 of the lockword for encoding the hash state of
Carl Shapiro [Mon, 21 Dec 2009 19:42:59 +0000 (11:42 -0800)]
Repurpose bits 1 and 2 of the lockword for encoding the hash state of
an object.  Invert the meaning of the shape bit to match the encoding
scheme described in Bacon's paper.  Consequently, monitor pointers
must have the lower 3 bits stripped before they may be dereferenced.

14 years agoMerge change Iaa2af1ad
Android (Google) Code Review [Mon, 21 Dec 2009 23:21:30 +0000 (15:21 -0800)]
Merge change Iaa2af1ad

* changes:
  Speed up the way we access ICU's locale data.

14 years agoSpeed up the way we access ICU's locale data.
Elliott Hughes [Mon, 21 Dec 2009 18:52:53 +0000 (10:52 -0800)]
Speed up the way we access ICU's locale data.

This patch makes creating a new NumberFormat or new SimpleDateFormat 2x faster.

Basically, the ResourceBundle mechanism is really expensive in several ways:

1. The two-level caching is unnecessary for locale data, and expensive because
   it burns through a lot of temporary objects.
2. The PrivilegedAction stuff is unnecessary and expensive because it too burns
   quite a few temporary objects (including an ArrayList for each call; should
   we consider removing support for SecurityManager so we can remove this cruft
   from our code?).
3. The caching in most cases doesn't cache anything useful; the ResourceBundles
   simply forward all questions straight to native code anyway, all we're
   caching is an unnecessary forwarding object (in a cache where lookups cost
   more than just creating a new unnecessary forwarding object would cost).

I've left CurrencyResourceBundle on the slow (ResourceBundle.getBundle) path
because I'm not yet sure how much of that path's semantics it relies on.

I still return LocaleResourceBundle instances (albeit via a much faster path)
but we should fix that. The native code returns an array which ResourceBundle
stuffs into a Hashtable and the calling code accesses via hash table lookups.
This despite the fact that the keys are a small fixed set known in advance.
We could make the native layer and the calling layer simpler and faster by
using a "struct", and doing so would make the middle layer go away completely.

14 years agoresolved conflicts for merge of 4923840c to master
Scott Main [Mon, 21 Dec 2009 21:44:07 +0000 (13:44 -0800)]
resolved conflicts for merge of 4923840c to master

14 years agoresolved conflicts for merge of ed7b1e77 to eclair-plus-aosp
Scott Main [Mon, 21 Dec 2009 20:33:18 +0000 (12:33 -0800)]
resolved conflicts for merge of ed7b1e77 to eclair-plus-aosp

14 years agoMerge change I0ffa1dd4 into eclair
Android (Google) Code Review [Mon, 21 Dec 2009 19:57:14 +0000 (11:57 -0800)]
Merge change I0ffa1dd4 into eclair

* changes:
  doc change: fix a broken link in class summary

14 years agodoc change: fix a broken link in class summary
Scott Main [Mon, 21 Dec 2009 19:53:59 +0000 (11:53 -0800)]
doc change: fix a broken link in class summary

14 years agoMore expectations for our test runs
Jesse Wilson [Mon, 21 Dec 2009 19:31:14 +0000 (11:31 -0800)]
More expectations for our test runs

14 years agoFixing the XML emitter to honor the expectations file.
Jesse Wilson [Sun, 20 Dec 2009 22:17:37 +0000 (14:17 -0800)]
Fixing the XML emitter to honor the expectations file.

14 years agoFix CurrencyTest's expectation for CAD in fr_FR.
Elliott Hughes [Sun, 20 Dec 2009 17:57:21 +0000 (09:57 -0800)]
Fix CurrencyTest's expectation for CAD in fr_FR.

Fix this harmony test which we've been failing since our ICU update:

  Default Locale is: ja_JP. For locale fr_FR the Canadian Dollar currency
  returned $CA. Expected was one of these: [CA$, CAD, $, Can$, $Ca]

The upstream harmony test (which has diverged quite a bit) tests for "$CA"
instead of "$Ca".

14 years agoMerge change Ic3780383
Android (Google) Code Review [Sun, 20 Dec 2009 17:55:50 +0000 (09:55 -0800)]
Merge change Ic3780383

* changes:
  Fix Long.toBinaryString, Long.toHexString, and Long.toOctalString for negative values.

14 years agoFixing a busted regex in the expectations file. Also doing regex checking upfront.
Jesse Wilson [Sun, 20 Dec 2009 07:48:33 +0000 (23:48 -0800)]
Fixing a busted regex in the expectations file. Also doing regex checking upfront.

14 years agoFix Long.toBinaryString, Long.toHexString, and Long.toOctalString for negative values.
Elliott Hughes [Sun, 20 Dec 2009 07:39:53 +0000 (23:39 -0800)]
Fix Long.toBinaryString, Long.toHexString, and Long.toOctalString for negative values.

Although (int) -1 == (long) -1, Integer.toXString produces a shorter result than
Long.toXString should.

14 years agoAdding expectations for a bunch of jtreg tests.
Jesse Wilson [Sat, 19 Dec 2009 01:21:50 +0000 (17:21 -0800)]
Adding expectations for a bunch of jtreg tests.

Although tedious, we found a real bug in the mix. This also removes some
of the noise from our test results.

14 years agoMerge change I1e941570
Android (Google) Code Review [Fri, 18 Dec 2009 18:40:43 +0000 (10:40 -0800)]
Merge change I1e941570

* changes:
  Depessimize string conversions.

14 years agoDepessimize string conversions.
Elliott Hughes [Fri, 18 Dec 2009 05:09:08 +0000 (21:09 -0800)]
Depessimize string conversions.

Why does this idiom persist? It's ugly, and it's the least efficient way to do
it. (I found the ones in DecimalFormatSymbols while invesigating why
"new SimpleDateFormat()" burns through so many StringBuilders. grep(1) found
the rest.)

The DocumentBuilderImpl removes an unnecessary level of indirection, since we
implement Character.toString in terms of String.valueOf. (I wouldn't have
bothered except this was the only use of Character.toString in the core
libraries, and I added it myself a few weeks ago.)

14 years agoMerge change I60383632
Android (Google) Code Review [Fri, 18 Dec 2009 18:17:03 +0000 (10:17 -0800)]
Merge change I60383632

* changes:
  Update luni package to Harmony r888752.

14 years agoMerge change I1ecd9dcd
Android (Google) Code Review [Fri, 18 Dec 2009 15:20:11 +0000 (07:20 -0800)]
Merge change I1ecd9dcd

* changes:
  Use writev() for DDMS packets.

14 years agoMerge change I83849e4a
Android (Google) Code Review [Fri, 18 Dec 2009 05:02:25 +0000 (21:02 -0800)]
Merge change I83849e4a

* changes:
  Improve our java.util.Locale documentation.

14 years agoImprove our java.util.Locale documentation.
Elliott Hughes [Thu, 17 Dec 2009 21:53:47 +0000 (13:53 -0800)]
Improve our java.util.Locale documentation.

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

14 years agoRename dalvik_jtreg to dalvik_runner.
Jesse Wilson [Fri, 18 Dec 2009 02:54:54 +0000 (18:54 -0800)]
Rename dalvik_jtreg to dalvik_runner.

Now that it runs caliper and JUnit, the old name was awful clumsy.

14 years agoFixing clean to use rm -rf so it won't fail if the directory wasn't ever created.
Jesse Wilson [Fri, 18 Dec 2009 02:10:17 +0000 (18:10 -0800)]
Fixing clean to use rm -rf so it won't fail if the directory wasn't ever created.

Adding a --skip-clean option.
Adding a --device-runner-dir option to run off the SD card

14 years agoUse writev() for DDMS packets.
Andy McFadden [Fri, 18 Dec 2009 00:21:36 +0000 (16:21 -0800)]
Use writev() for DDMS packets.

The code was using the JDWP "expanding buffer" stuff, which is fine for
4-byte status messages but will be terrible for buffers of tracing and
profiling data.  Now we construct the header in a separate buffer.

14 years agoMerge change Ib1d8044e
Android (Google) Code Review [Fri, 18 Dec 2009 00:05:17 +0000 (16:05 -0800)]
Merge change Ib1d8044e

* changes:
  Jit: Briefly delay start of Jit'ng in attempt to avoid compiling init code

14 years agoJit: Briefly delay start of Jit'ng in attempt to avoid compiling init code
Bill Buzbee [Thu, 17 Dec 2009 22:55:21 +0000 (14:55 -0800)]
Jit: Briefly delay start of Jit'ng in attempt to avoid compiling init code

Via subjective manual side-by-side testing of jit vs. no-jit, the mterp
version looked like it tended to reach first screen on application launch
very slightly before the Jit version.  This change adds an old and
commonly-used Jit trick to delay jit startup in an attempt to avoid wasting
effort compiling initialization code.

Also, deletes some code no longer in use.

14 years agoMerge change Iac175b4f
Android (Google) Code Review [Thu, 17 Dec 2009 21:26:42 +0000 (13:26 -0800)]
Merge change Iac175b4f

* changes:
  Two minor JNI fixes.

14 years agoTwo minor JNI fixes.
Andy McFadden [Thu, 17 Dec 2009 19:21:09 +0000 (11:21 -0800)]
Two minor JNI fixes.

(1) In the CheckJNI return type scanner, don't assume that the caller's
class loader is already listed as an initiating loader for the type
being returned.

(2) Make sure the PlatformAddress class is initialized before calling
one of its static methods from NewDirectByteBuffer.

14 years agoCleaning up after each test to avoid exhausting disk space.
Jesse Wilson [Thu, 17 Dec 2009 19:12:33 +0000 (11:12 -0800)]
Cleaning up after each test to avoid exhausting disk space.
Moving tests to the local sdcard.

14 years agoMerge change Ice913bbd
Android (Google) Code Review [Thu, 17 Dec 2009 03:43:23 +0000 (19:43 -0800)]
Merge change Ice913bbd

* changes:
  Make java.lang.Character fast.

14 years agoMake java.lang.Character fast.
Elliott Hughes [Wed, 16 Dec 2009 23:37:18 +0000 (15:37 -0800)]
Make java.lang.Character fast.

This patch reinstates some of the upstream ASCII fast paths, adds some new
ones, and forwards all char overloads to the int methods (placing the fast
paths in the int overload), so using the int overload isn't automatically
3x slower than the char overload even for the same characters.

See the bug for benchmark results. The ASCII speedups are between 2x and 4x.

Bug: 2295801

14 years agoFixed a bug int the new version of Long.reverse introduce in change Id6bd7c81.
Joshua Bloch [Thu, 17 Dec 2009 02:01:32 +0000 (18:01 -0800)]
Fixed a bug int the new version of Long.reverse introduce in change Id6bd7c81.
The corresponding code in Hacker's Delight is written in C, which supports
unsigned numbers. In Java, it's essential to use explicit unsigned shifts,
but I neglected to do so.  This bug was caught by jtreg test
java.lang.Long.BitTwiddle (which I wrote in 2003).  This preexisting
test serves as the regression test for this change.

14 years agoClean up some misunderstanding about what mspaces are:
Barry Hayes [Thu, 17 Dec 2009 00:51:04 +0000 (16:51 -0800)]
Clean up some misunderstanding about what mspaces are:
They are already pointers.

14 years agoAdding some debugging to help figure out why our tests aren't completing.
Jesse Wilson [Thu, 17 Dec 2009 00:15:34 +0000 (16:15 -0800)]
Adding some debugging to help figure out why our tests aren't completing.

14 years agoMerge change I24ac537c
Android (Google) Code Review [Wed, 16 Dec 2009 21:33:04 +0000 (13:33 -0800)]
Merge change I24ac537c

* changes:
  Move VFP register save/restore routines from template to codegen.

14 years agoMove VFP register save/restore routines from template to codegen.
Ben Cheng [Wed, 16 Dec 2009 21:15:53 +0000 (13:15 -0800)]
Move VFP register save/restore routines from template to codegen.

Code in the template directory will occupy space in the code cache and is
invoked from JIT'ed code. Since these routines are only invoked from statically
compiled functions we can move them to the codegen directory which also has
arch-variant configurations.

14 years agoMerge change Id6bd7c81
Android (Google) Code Review [Wed, 16 Dec 2009 20:59:33 +0000 (12:59 -0800)]
Merge change Id6bd7c81

* changes:
  Rewrote all the toString and bit twiddling code in Integer and Long using state-of-the-art recipes.  The resulting code is much faster than what it replaced, as well as being more concise. While I was in the neighborhood I also cleaned up a few other things in the boxed primitives (TYPE fields, small-value caches, etc.).

14 years agoMaking helper threads daemons in the jtreg runner.
Jesse Wilson [Wed, 16 Dec 2009 18:35:06 +0000 (10:35 -0800)]
Making helper threads daemons in the jtreg runner.

Fixing a bug where we were attempting to execute errord out tests. And
renaming the testClasses to a testClasspath.

14 years agoUpdate luni package to Harmony r888752.
Jesse Wilson [Wed, 16 Dec 2009 01:00:02 +0000 (17:00 -0800)]
Update luni package to Harmony r888752.

    Conflicts:
     libcore/luni/META-INF/MANIFEST.MF
     libcore/luni/make/findbugs-exclude-filter.xml
     libcore/luni/src/main/java/java/io/BufferedOutputStream.java
     libcore/luni/src/main/java/java/io/BufferedReader.java
     libcore/luni/src/main/java/java/io/CharArrayReader.java
     libcore/luni/src/main/java/java/io/StringReader.java
     libcore/luni/src/main/java/java/lang/StrictMath.java
     libcore/luni/src/main/java/java/lang/ref/ReferenceQueue.java
     libcore/luni/src/main/java/java/net/Inet4Address.java
     libcore/luni/src/main/java/java/net/InetAddress.java
     libcore/luni/src/main/java/java/util/ArrayList.java
     libcore/luni/src/main/java/java/util/EnumSet.java
     libcore/luni/src/main/java/java/util/HugeEnumSet.java
     libcore/luni/src/main/java/org/apache/harmony/luni/internal/reflect/ProxyConstantPool.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/AbstractMemorySpy.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/DebugMemorySpy.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/Endianness.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/IFileSystem.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/IMemorySystem.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/IPlatformConstants.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSFileSystem.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSMemory.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
     libcore/luni/src/main/java/org/apache/harmony/luni/util/InputStreamExposer.java
     libcore/luni/src/main/native/hyzip/shared/zipcache.c
     libcore/luni/src/main/native/hyzip/shared/zipsup.c
     libcore/luni/src/main/native/include/jni.h
     libcore/luni/src/main/native/include/jni_types.h
     libcore/luni/src/main/native/include/jvmti.h
     libcore/luni/src/main/native/include/jvmti_types.h
     libcore/luni/src/main/native/launcher/unix/main_hlp.c
     libcore/luni/src/main/native/luni/shared/OSNetworkSystem.c
     libcore/luni/src/main/native/luni/shared/file.c
     libcore/luni/src/main/native/luni/windows/makefile
     libcore/luni/src/test/api/unix/org/apache/harmony/luni/tests/java/io/UnixFileTest.java
     libcore/luni/src/test/java/tests/api/java/io/BufferedOutputStreamTest.java
     libcore/luni/src/test/java/tests/api/java/io/BufferedReaderTest.java
     libcore/luni/src/test/java/tests/api/java/io/SerializationStressTest.java
     libcore/luni/src/test/java/tests/api/java/net/SocketTest.java
     libcore/luni/src/test/java/tests/api/java/util/ArrayListTest.java
     libcore/luni/src/test/java/tests/api/java/util/EnumSetTest.java
     libcore/luni/src/test/java/tests/api/java/util/TimerTest.java

14 years agoMerge change Iadae8af9
Android (Google) Code Review [Wed, 16 Dec 2009 07:51:57 +0000 (23:51 -0800)]
Merge change Iadae8af9

* changes:
  Updating Caliper runner to correspond with caliper r20091215

14 years agoUpdating Caliper runner to correspond with caliper r20091215
Jesse Wilson [Wed, 16 Dec 2009 02:59:27 +0000 (18:59 -0800)]
Updating Caliper runner to correspond with caliper r20091215

14 years agoRewrote all the toString and bit twiddling code in Integer and Long using
Joshua Bloch [Tue, 15 Dec 2009 00:32:33 +0000 (16:32 -0800)]
Rewrote all the toString and bit twiddling code in Integer and Long using
state-of-the-art recipes.  The resulting code is much faster than what it
replaced, as well as being more concise. While I was in the neighborhood
I also cleaned up a few other things in the boxed primitives (TYPE fields,
small-value caches, etc.).

Addressed review comments.

14 years agoFix our test runner to look inside source files for package declarations.
Elliott Hughes [Wed, 16 Dec 2009 00:27:08 +0000 (16:27 -0800)]
Fix our test runner to look inside source files for package declarations.

The relevant libcore .java files were all under test/java/ directories, but
that's not generally true, and not true in the specific case of caliper's
benchmarks.

14 years agoFix dalvik_jtreg build.
Elliott Hughes [Tue, 15 Dec 2009 23:50:08 +0000 (15:50 -0800)]
Fix dalvik_jtreg build.

Use the same technique frameworks/base uses when building external/apache-http
to build the dalvik_jtreg dependencies. This is ugly, but seems to keep the
host and device builds off each others' toes.

14 years agoMerge change I326caaa3
Android (Google) Code Review [Tue, 15 Dec 2009 23:46:19 +0000 (15:46 -0800)]
Merge change I326caaa3

* changes:
  Fix our SSLSession implementations to call valueUnbound on remove.

14 years agoFix our SSLSession implementations to call valueUnbound on remove.
Elliott Hughes [Tue, 15 Dec 2009 23:32:28 +0000 (15:32 -0800)]
Fix our SSLSession implementations to call valueUnbound on remove.

This addresses the other problem from the following abandoned change:
  https://android-git.corp.google.com/g/4743

14 years agoMerge change Id2be5eb7
Android (Google) Code Review [Tue, 15 Dec 2009 23:26:27 +0000 (15:26 -0800)]
Merge change Id2be5eb7

* changes:
  Eclipse doesn't like that this class' directory didn't match its package.

14 years agoam 61fdb24e: (-s ours) am 173411f7: Temporarily omit libcore tests that fail when...
Brett Chabot [Tue, 15 Dec 2009 23:06:05 +0000 (15:06 -0800)]
am 61fdb24e: (-s ours) am 173411f7: Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.

Merge commit '61fdb24e732f0effb72c70491845a497e99faae1'

* commit '61fdb24e732f0effb72c70491845a497e99faae1':
  Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.

14 years agoEclipse doesn't like that this class' directory didn't match its package.
Elliott Hughes [Tue, 15 Dec 2009 22:13:27 +0000 (14:13 -0800)]
Eclipse doesn't like that this class' directory didn't match its package.

Resolve in favor of the package declaration.

14 years agoFix OpenSSLSessionImpl.getCreationTime and getLastAccessedTime.
Elliott Hughes [Tue, 15 Dec 2009 21:06:11 +0000 (13:06 -0800)]
Fix OpenSSLSessionImpl.getCreationTime and getLastAccessedTime.

This addresses one part of this abandoned change from ursg:
  https://android-git.corp.google.com/g/4743

I've also tidied up the native method names to use the harmony "-Impl"
convention, removed useless methods that just forward to a native method,
and removed dead code. I've canonicalized some of the duplication too,
but I want to go through the rest of out OpenSSL code before I really start
trying to remove the duplication.

When this is submitted, I'll fix the other (unrelated) bug the abandoned
change addressed.

14 years agoam 173411f7: Temporarily omit libcore tests that fail when run in CTS harness. DO...
Brett Chabot [Tue, 15 Dec 2009 18:59:23 +0000 (10:59 -0800)]
am 173411f7: Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.

Merge commit '173411f7a11c81bef07adc28c66ce4c417df67ff' into eclair-plus-aosp

* commit '173411f7a11c81bef07adc28c66ce4c417df67ff':
  Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.

14 years agoMerge commit 'goog/eclair-plus-aosp'
Android Git Automerger [Tue, 15 Dec 2009 08:44:44 +0000 (00:44 -0800)]
Merge commit 'goog/eclair-plus-aosp'

14 years agoTemporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.
Brett Chabot [Mon, 14 Dec 2009 23:49:13 +0000 (15:49 -0800)]
Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.

Bug 2155700

Change-Id: Ib0f9d363842d713ce3e07cdd303078c5c3e518c9

14 years agoMerge change I1d96b51e
Android (Google) Code Review [Mon, 14 Dec 2009 22:35:24 +0000 (14:35 -0800)]
Merge change I1d96b51e

* changes:
  Merge branch 'archive_888752' into archive_dalvik

14 years agoMerge change Icf57d5da
Android (Google) Code Review [Mon, 14 Dec 2009 22:33:06 +0000 (14:33 -0800)]
Merge change Icf57d5da

* changes:
  Merge branch 'logging_888752' into logging_dalvik

14 years agoMerge change Ie84afdff
Android (Google) Code Review [Mon, 14 Dec 2009 22:25:09 +0000 (14:25 -0800)]
Merge change Ie84afdff

* changes:
  Support running caliper with the jtreg runner. This is an early first look; we'll need to fix a few things before the UI for this is nice.

14 years agoMerge branch 'logging_888752' into logging_dalvik
Jesse Wilson [Thu, 10 Dec 2009 00:29:30 +0000 (16:29 -0800)]
Merge branch 'logging_888752' into logging_dalvik

Conflicts:
     libcore/logging/META-INF/MANIFEST.MF
     libcore/logging/src/main/java/java/util/logging/LogManager.java
     libcore/logging/src/main/java/java/util/logging/Logger.java
     libcore/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java

14 years agoDon't assume debugger wants all exceptions.
Andy McFadden [Sat, 5 Dec 2009 00:36:08 +0000 (16:36 -0800)]
Don't assume debugger wants all exceptions.

The JDWP implementation in the VM keeps a list of the objects that the
debugger knows about, and prevents the GC from collecting them (which
isn't strictly necessary, but it's a whole lot easier than doing it
right).  Because of the way it's implemented, it actually ended up
keeping track of all thrown exceptions, even if the debugger wasn't
interested in hearing about them.

With this change we now do a "late" registration of the exception
object, preventing exception-happy code from filling memory when the
debugger is attached.

14 years agoMerge change I11aa1bb5
Android (Google) Code Review [Fri, 11 Dec 2009 20:36:03 +0000 (12:36 -0800)]
Merge change I11aa1bb5

* changes:
  Jit: Fix 083-jit-regressions test to omit non-deterministic output