[classlib][luni][HashMap]Avoid to expand data array in HashMap.putAll more than once.
Hi, all: Current implementation of HashMap.putAll() in Harmony just calls super.putAll() which ultimately will call HashMap.put(), while this way might lead to expand the backing data array more than once if the elements in the added Map is sufficiently large. However, the situation is able to be avoided, since we actually know the size of the added Map, thus the expected HashMap capacity. If no one objects, I will add an expected capacity argument in internal rehash() method as rehash(int expectedCapacity) and rewrite the HashMap.putAll(). Good luck! -- Leo Li China Software Development Lab, IBM
[classlib][vmi] VMI classes for Thread/Object manipulation for java.util.concurrent
I've added some classes[1][2] to luni-kernel in the org.apache.harmony.kernel.vm package that are intended the VMI replacement for the sun.misc.Unsafe class. The intent is to provide a VMI class to support java.util.concurrent. Initially this will be done by implementing the sun.misc.Unsafe in 'suncompat' module in terms of these new classes. For the most part, the methods are essentially the subset of Unsafe that's needed for java.util.concurrent. I've separated the methods into two classes; Threads [1] for the threading features and Objects [2] for the object manipulation features. My initial thought is that Threads may be extended to provide additional support needed for lang-management features. Please take a look at the classes and provide some feedback. [1] http://svn.apache.org/repos/asf/incubator/harmony/enhanced/classlib/trunk/mo dules/luni-kernel/src/main/java/org/apache/harmony/kernel/vm/Threads.java [2] http://svn.apache.org/repos/asf/incubator/harmony/enhanced/classlib/trunk/mo dules/luni-kernel/src/main/java/org/apache/harmony/kernel/vm/Objects.java
HARMONY-1407: Contribution of Java code for package java.lang.management
Are there any documents or anything that needs to be resolved before I can start working on the code in HARMONY-1407? http://issues.apache.org/jira/browse/HARMONY-1407 -Nathan
Re: [General VM] GC strategy:how to garbage collect short-lived objects quickly.
On 9/16/06, Geir Magnusson Jr. [EMAIL PROTECTED] wrote: Also, can MMTk function as the GC for DRLVM yet? If not, can you provide a wrapper so it can? Its not a simple wrapper that is missing. MMTk is written in Java. This Java code needs to be intergrated into the bootstrap process of DRLVM. For example, initial bootstrap java code needs to run on a bootstrap java heap until all of MMTk itself has been compiled and initialized. I keep hoping that the MMTk guys will volunteer to help me with this (hint, hint). Having said that, I am trying to put together a TODO list of stuff that needs doing on the MMTk port so that others can jump in and help. I hope to have this list done within one week. geir - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Weldon Washburn Intel Middleware Products Division
Re: HARMONY-1407: Contribution of Java code for package java.lang.management
As I know so far, there is only java code in HARMONY-1407 So, you can build the code on RI, Harmony(only fail on a signal bug of java.lang.StackTraceElement in luni-kernel.jar), and IBM JDK successfully. But the native code of j.l.management is not available now, so you'll fail if you run the tests on Harmony, and got an UnsatisfiedLinkError. On 9/18/06, Nathan Beyer [EMAIL PROTECTED] wrote: Are there any documents or anything that needs to be resolved before I can start working on the code in HARMONY-1407? http://issues.apache.org/jira/browse/HARMONY-1407 -Nathan -- Robert Hu China Software Development Lab, IBM
Re: [testing] optimization regressions (was: Re: [result] Re: [vote] HARMONY-1363 - DRLVM fixes and additions)
On the 0x1E5 day of Apache Harmony Pavel Ozhdikhin wrote: Thanks for explaining. This is another variant of the bytecode-based regression tests. This variant is also adoptable to Java-based and IR-based regression tests. On 15 Sep 2006 17:53:00 +0700, Egor Pasko [EMAIL PROTECTED] wrote: On the 0x1E5 day of Apache Harmony Pavel Ozhdikhin wrote: Egor, How Nullstone tests differ from what Rana proposed and Mikhail L. prototyped - could you please elaborate? the idea is simple. You have two versions of a test. First -- unoptimized, second -- same algorithm, but optimized by hand with a specific optimization. If the times of execution differ much, then, the optimization is not done properly in the checked compiler. It works best with optimizations that are easy to represent in a high-level language (i.e. Java), such as load hoisting, loop unrolling, etc. see http://www.nullstone.com for more info -- Egor Pasko, Intel Managed Runtime Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Egor Pasko, Intel Managed Runtime Division - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[build]Anyone else got these test errors of Pack200 like this?
My build machine is WinXP SP2, Harmony classlib+IBM VME, at revision r 447234, and I got 5 similar errors of org.apache.harmony.archive.tests.internal.pack200.CodecTest like this: java.lang.NoSuchFieldError: org/apache/harmony/archive/internal/pack200/Codec.BYTE1 at org.apache.harmony.archive.tests.internal.pack200.CodecTest.testCodecToString(CodecTest.java:59) at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) Any ideas or comments? -- Paulex Yang China Software Development Lab IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [classlib][luni]difference between RI and ICU
Hello, I have raised a bug for icu[1], not sure whether it will be fixed in icu4j 3.6. :-) [1] http://bugs.icu-project.org/cgi-bin/icu-bugs/incoming?findid=5391 On 9/12/06, Richard Liang [EMAIL PROTECTED] wrote: Hello, I will clarify this issue with ICU team. ;-) Best regards, Richard Tony Wu wrote: I encounter a problem when implement isWhiteSpace(int) in j.l.Character. There is a difference between RI and ICU. RI spec says, It is a Unicode szpace character (SPACE_SEPARATOR, LINE_SEPARATOR, or PARAGRAPH_SEPARATOR) but is not also a non-breaking space ('\u00A0', '\u2007', '\u202F'). but ICU spec says, It is a Unicode space separator (category Zs), but is not a no-break space (\u00A0 or \u202F or \uFEFF). RI excludes U+2007 however ICU excludes U+FEFF And I looked up the definition of these 4 related characters on unicode.org: 00A0;NO-BREAK SPACE;Zs;0;CS;noBreak 0020N;NON-BREAKING SPACE 2007;FIGURE SPACE;Zs;0;WS;noBreak 0020N; 202F;NARROW NO-BREAK SPACE;Zs;0;CS;noBreak 0020N; FEFF;ZERO WIDTH NO-BREAK SPACE;Cf;0;BN;N;BYTE ORDER MARK I consider it is a bug of ICU because the U+FEFF is not in category *Zs* as ICU spec described. And I purposed to report that to ICU team. Should I handle the U+2007 by ourselves to follow RI or just document this problem in testcase? -- Richard Liang China Software Development Lab, IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Richard Liang China Development Lab, IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [build]Anyone else got these test errors of Pack200 like this?
Pls. ignore it, cannot reproduce at r447234, probably I forgot ant build before running ant -Dbuild.module=archive test. Sorry for the confusion caused. Paulex Yang wrote: My build machine is WinXP SP2, Harmony classlib+IBM VME, at revision r 447234, and I got 5 similar errors of org.apache.harmony.archive.tests.internal.pack200.CodecTest like this: java.lang.NoSuchFieldError: org/apache/harmony/archive/internal/pack200/Codec.BYTE1 at org.apache.harmony.archive.tests.internal.pack200.CodecTest.testCodecToString(CodecTest.java:59) at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) Any ideas or comments? -- Paulex Yang China Software Development Lab IBM - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [jira] Updated: (HARMONY-1370) [classlib][luni] HttpsURLConnection enhancement allowing work over HTTP proxy server
Hello Mikhail, On 9/14/06, Mikhail Loenko [EMAIL PROTECTED] wrote: It seams like system property are not restored well, new 1.5 method System.clearProperty() IMHO would be suitable What do you think? You are right! If setProperty(property) returned null, we should restore overridden property by clearProperty. I'll fix it and provide as a new patch for H-1370. I still have a question. As we've discussed [1] available method can be trusted in very special cases only. So, should this code while (is.available() != 0) { is.read(); } be replaced with reading until '-1'? Here is no need to reach -1. If we will do so the implementation will hang up. What is needed here is just read trailing data from the stream (if any) before starting of SSL handshake process (over 'is'). In case of keeping data in the stream the handshake will fail and user will get an exception. Thank You, Alexander - Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]