Optimization of java.io.DataInputStream

2013-11-12 Thread Alex Yursha
The following methods in java.io.DataInputStream perform right shift to zero positions in their implementations: - short readShort() - int readUnsignedShort() - char readChar() - int readInt() - long readLong() - String readUTF(DataInput in) For example: public final short readShort() throws

hg: jdk8/tl/nashorn: 2 new changesets

2013-11-12 Thread sundararajan . athijegannathan
Changeset: e65a98146b94 Author:attila Date: 2013-11-11 14:25 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/nashorn/rev/e65a98146b94 8028020: Function parameter as last expression in comma in return value causes bad type calculation Reviewed-by: jlaskey, lagergren, sundar !

JDK 8 RFR: more core libs raw warnings cleanup

2013-11-12 Thread Joe Darcy
Hello, Please review the patch below which would remove another batch of raw type javac lint warnings from the core libraries. No signatures of public or protected methods in the Java SE specification have been modified. Regression tests in affected areas pass. Thanks, -Joe diff -r

Re: JDK 8 RFR: more core libs raw warnings cleanup

2013-11-12 Thread Chris Hegarty
Looks ok to me Joe. -Chris. On 12/11/13 09:28, Joe Darcy wrote: Hello, Please review the patch below which would remove another batch of raw type javac lint warnings from the core libraries. No signatures of public or protected methods in the Java SE specification have been modified.

Re: JDK 8 RFR: more core libs raw warnings cleanup

2013-11-12 Thread Alan Bateman
On 12/11/2013 09:28, Joe Darcy wrote: Hello, Please review the patch below which would remove another batch of raw type javac lint warnings from the core libraries. No signatures of public or protected methods in the Java SE specification have been modified. Regression tests in affected

Re: JDK 8 RFR: more core libs raw warnings cleanup

2013-11-12 Thread Remi Forax
On 11/12/2013 10:51 AM, Chris Hegarty wrote: Looks ok to me Joe. -Chris. A small issue, refs = (WeakReferenceClass?[])new WeakReference[interfaces.length]; should be refs = (WeakReferenceClass?[])new WeakReference?[interfaces.length]; otherwise, looks good. RĂ©mi On 12/11/13 09:28,

Re: JDK 8 RFR: more core libs raw warnings cleanup

2013-11-12 Thread Joel Borggren-Franck
Hi Joe, Looks good, but your mailer trashes the patch. Please fix your mailer linewrap settings. cheers /Joel On 2013-11-12, Joe Darcy wrote: Hello, Please review the patch below which would remove another batch of raw type javac lint warnings from the core libraries. No signatures of

RFR for JDK-8016519. closed/javax/xml/ws/8005432/TestProxyCreation.java uses fixed port to publish webservice

2013-11-12 Thread Patrick Zhang
Hi Everyone, I am working on https://bugs.openjdk.java.net/browse/JDK-8016519. The test uses fixed port(8080) to publish webservice and it will fail periodically when the port has been occupied by other tests or applications. The fix will use new InetSocketAddress(0).getPort() to retrieve

Re: RFR for JDK-8016519. closed/javax/xml/ws/8005432/TestProxyCreation.java uses fixed port to publish webservice

2013-11-12 Thread Alan Bateman
On 12/11/2013 11:01, Patrick Zhang wrote: Hi Everyone, I am working on https://bugs.openjdk.java.net/browse/JDK-8016519. The test uses fixed port(8080) to publish webservice and it will fail periodically when the port has been occupied by other tests or applications. This test is not in

Re: JDK 8 RFR: more core libs raw warnings cleanup

2013-11-12 Thread Lance Andersen - Oracle
Looks Ok Joe On Nov 12, 2013, at 4:28 AM, Joe Darcy wrote: Hello, Please review the patch below which would remove another batch of raw type javac lint warnings from the core libraries. No signatures of public or protected methods in the Java SE specification have been modified.

Re: JDK 8 RFR: more core libs raw warnings cleanup

2013-11-12 Thread Joel Borggren-Franck
This also allows you to get rid of the raw type suppression I think, the attached code compiles. Thanks Remi, cheers /Joel diff --git a/src/share/classes/java/lang/reflect/Proxy.java b/src/share/classes/java/lang/reflect/Proxy.java --- a/src/share/classes/java/lang/reflect/Proxy.java +++

AtomicReference.compareAndSet Oversight?

2013-11-12 Thread Gernot Neppert
While testing the methods added to the Atomic classes for Java 8, I was puzzled that I couldn't find the one method that I've been missing most in AtomicReference: boolean compareAndSet(V expect, Supplier? extends V supplier); Obviously, this would help implement a very efficient atomic

hg: jdk8/tl/jdk: 8027209: javax/management/monitor/ThreadPoolAccTest.java fails intermittently

2013-11-12 Thread erik . gahlin
Changeset: 41dcb0c2e194 Author:egahlin Date: 2013-11-12 14:52 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/41dcb0c2e194 8027209: javax/management/monitor/ThreadPoolAccTest.java fails intermittently Reviewed-by: sla, jbachorik !

Re: AtomicReference.compareAndSet Oversight?

2013-11-12 Thread Vitaly Davidovich
This would have to devolve into a TTAS implementation in order to avoid calling the supplier in cases where AR != expected. Otherwise, hardware needs the reference for the CAS. TTAS isn't that common, I think. Sent from my phone On Nov 12, 2013 8:51 AM, Gernot Neppert mcnep...@googlemail.com

Re: declaring class of a default method Was: Bug 8027734

2013-11-12 Thread Joel Borggren-Franck
Hi Yumin, Basically this is due to a difference in declaring class for a Method representing a default method vs a normal Method. On 2013-11-11, Yumin Qi wrote: Hi, Joel This bug is a SQE testing bug, see https://bugs.openjdk.java.net/browse/JDK-8027734

Re: Optimization of java.io.DataInputStream

2013-11-12 Thread Vitaly Davidovich
Interesting - was this file codegen'd or something? Why are these nop shifts there? Anyway, I'd expect JIT does the right thing here and doesn't actually issue this instruction. Are you optimizing for interpreter or meta data size then? Sent from my phone On Nov 12, 2013 3:45 AM, Alex Yursha

Re: Optimization of java.io.DataInputStream

2013-11-12 Thread Alex Yursha
I have no idea whether JIT compiler will eliminate these nop shifts, but as I said each such shift brings two redundant bytecode instructions for the virtual machine. It think this tiny optimization can benefit both interpreter and class file size. On Tue, Nov 12, 2013 at 5:45 PM, Vitaly

Re: Optimization of java.io.DataInputStream

2013-11-12 Thread roger riggs
Hi, At the source level the style makes it clear where the data is to be aligned. There many other places that use that style 0 to indicate alignment of the data when assembling a whole from parts. It is assumed the compiler/runtime will omit unnecessary operations; the compiler does not.

Re: Optimization of java.io.DataInputStream

2013-11-12 Thread Vitaly Davidovich
Roger, I think a simple comment is better than leaving head scratching code behind, especially since it'll impact interpreter and byte code size. Sent from my phone On Nov 12, 2013 9:58 AM, roger riggs roger.ri...@oracle.com wrote: Hi, At the source level the style makes it clear where the

Re: Optimization of java.io.DataInputStream

2013-11-12 Thread Vitaly Davidovich
So the locals can be called hi and lo, and it's very readable. Adding nop shifts would only be ok, IMHO, if it had zero cost all around (other than source being slightly larger). Sent from my phone On Nov 12, 2013 10:12 AM, Alex Yursha alexyur...@gmail.com wrote: Well, I agree that the code is

Re: Optimization of java.io.DataInputStream

2013-11-12 Thread Alex Yursha
Well, I agree that the code is more readable when we use shift consistently, if you think it is worth some redundant bytes in a class file. On Tue, Nov 12, 2013 at 6:00 PM, Vitaly Davidovich vita...@gmail.comwrote: Roger, I think a simple comment is better than leaving head scratching code

Re: RFR for JDK-7190106 RMI benchmark fails intermittently because of use of fixed port

2013-11-12 Thread Stuart Marks
Unfortunately we can't use jdk.testlibrary.Utils.getFreePort() for the RMI tests, since RMI's TestLibrary.getUnusedRandomPort() respects a reserved port range that's used by some RMI tests that have to used fixed ports. s'marks On 11/11/13 2:39 PM, Tristan Yan wrote: Hi Stuart Also there is

Re: RFR for JDK-7190106 RMI benchmark fails intermittently because of use of fixed port

2013-11-12 Thread Stuart Marks
Hi Tristan, (Sorry, for the delay; I'm traveling) I think the current package (bench.rmi and bench.serial) organization makes good sense, and I don't want to change it. The need to shuffle things around to different packages indicates a factoring error. In this case the culprit is

Re: 8028027: serialver should emit declaration with the 'private' modifier

2013-11-12 Thread Stuart Marks
Hi Yuri, I don't see any consistency issue, since serialver and javap are intended for different purposes. I checked with a couple reviewers from earlier in this thread and they're ok with the change as is, without the additional reflective code to pick up modifiers from an existing

hg: jdk8/tl/jdk: 8028027: serialver should emit declaration with the 'private' modifier

2013-11-12 Thread stuart . marks
Changeset: f6012ca3bdd3 Author:smarks Date: 2013-11-12 16:59 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/f6012ca3bdd3 8028027: serialver should emit declaration with the 'private' modifier Reviewed-by: darcy, mchung, alanb, chegar !

RFR(2): 7174936: several String methods claim to always create new String

2013-11-12 Thread Stuart Marks
Hi all, Here's an updated version of the String spec change. Changes from the previous version address comments made by Brent Christian and David Holmes. Specifically: - Specify copyValueOf() overloads as equivalent to corresponding valueOf() overloads. - Remove extranous changes to

hg: jdk8/tl/jdk: 6543856: MonitorVmStartTerminate.sh fails intermittently

2013-11-12 Thread erik . gahlin
Changeset: 4cff9f59644f Author:egahlin Date: 2013-11-12 17:40 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/4cff9f59644f 6543856: MonitorVmStartTerminate.sh fails intermittently Reviewed-by: sla, dholmes ! test/sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.java !

Re: RFR(2): 7174936: several String methods claim to always create new String

2013-11-12 Thread Lance Andersen - Oracle
The wording changes seem fine to me. Thanks for the specdiff as it made it much easier to review On Nov 12, 2013, at 11:43 AM, Stuart Marks wrote: Hi all, Here's an updated version of the String spec change. Changes from the previous version address comments made by Brent Christian and

hg: jdk8/tl/jdk: 6849945: VM Periodic Task Thread CPU time = -1ns in HotspotThreadMBean.getInternalThreadCpuTimes()

2013-11-12 Thread erik . gahlin
Changeset: d9f827e4d20c Author:egahlin Date: 2013-11-12 18:12 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/d9f827e4d20c 6849945: VM Periodic Task Thread CPU time = -1ns in HotspotThreadMBean.getInternalThreadCpuTimes() Reviewed-by: sla !

Re: JDK 8 RFR: more core libs raw warnings cleanup

2013-11-12 Thread Joe Darcy
I'll push with this improvement; thanks, -Joe On 11/12/2013 04:20 AM, Joel Borggren-Franck wrote: This also allows you to get rid of the raw type suppression I think, the attached code compiles. Thanks Remi, cheers /Joel diff --git a/src/share/classes/java/lang/reflect/Proxy.java

hg: jdk8/tl/jdk: 8028229: Fix more raw types lint warning in core libraries

2013-11-12 Thread joe . darcy
Changeset: 69432cb5bca2 Author:darcy Date: 2013-11-12 09:44 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/69432cb5bca2 8028229: Fix more raw types lint warning in core libraries Reviewed-by: chegar, forax, lancea, alanb, jfranck !

hg: jdk8/tl/jdk: 8028208: (aio) Assertion in clearPendingIoMap when closing at around time file lock is acquired immediately (win)

2013-11-12 Thread alan . bateman
Changeset: 0c414ac10700 Author:alanb Date: 2013-11-12 17:37 + URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/0c414ac10700 8028208: (aio) Assertion in clearPendingIoMap when closing at around time file lock is acquired immediately (win) Reviewed-by: chegar !

RFR: 8026952 Test java/util/logging/LogManager/RootLogger/setLevel/TestRootLoggerLevel.java has wrong @bug id

2013-11-12 Thread Daniel Fuchs
Hi, This is a trivial fix to replace a wrong @bug id in TestRootLoggerLevel.java: https://bugs.openjdk.java.net/browse/JDK-8026952 I mistakenly put 8023163 (which I was investigating) instead of 8026499 (which is what I was actually fixing). -- daniel $ hg diff diff -r 41dcb0c2e194

hg: jdk8/tl/jdk: 8028014: Doclint warning/error cleanup in javax.management

2013-11-12 Thread roger . riggs
Changeset: ebe27e1a2e2d Author:rriggs Date: 2013-11-12 14:03 -0500 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/ebe27e1a2e2d 8028014: Doclint warning/error cleanup in javax.management Summary: Improve generated html by fixing doclint warnings Reviewed-by: sla, jbachorik !

Re: RFR: 8026952 Test java/util/logging/LogManager/RootLogger/setLevel/TestRootLoggerLevel.java has wrong @bug id

2013-11-12 Thread Mandy Chung
thumbs up. Mandy On 11/12/13 10:42 AM, Daniel Fuchs wrote: Hi, This is a trivial fix to replace a wrong @bug id in TestRootLoggerLevel.java: https://bugs.openjdk.java.net/browse/JDK-8026952 I mistakenly put 8023163 (which I was investigating) instead of 8026499 (which is what I was actually

Re: RFR: 8026952 Test java/util/logging/LogManager/RootLogger/setLevel/TestRootLoggerLevel.java has wrong @bug id

2013-11-12 Thread Alan Bateman
On 12/11/2013 18:42, Daniel Fuchs wrote: Hi, This is a trivial fix to replace a wrong @bug id in TestRootLoggerLevel.java: Looks fine. -Alan.

Review request for 8028234: Remove unused methods in sun.misc.JavaAWTAccess

2013-11-12 Thread Mandy Chung
This is a simple code deletion in sun.misc.JavaAWTAccess and its implementation class: Webrev: http://cr.openjdk.java.net/~mchung/jdk8/webrevs/8028234/webrev.00/ This patch removes the methods from sun.misc.JavaAWTAccess that are no longer used. The only dependency remaining from core-libs

Re: Review request for 8028234: Remove unused methods in sun.misc.JavaAWTAccess

2013-11-12 Thread Lance Andersen - Oracle
+1 On Nov 12, 2013, at 2:29 PM, Mandy Chung wrote: This is a simple code deletion in sun.misc.JavaAWTAccess and its implementation class: Webrev: http://cr.openjdk.java.net/~mchung/jdk8/webrevs/8028234/webrev.00/ This patch removes the methods from sun.misc.JavaAWTAccess that are no

Re: Review request for 8028234: Remove unused methods in sun.misc.JavaAWTAccess

2013-11-12 Thread Mandy Chung
Adding awt-dev for the review. Mandy On 11/12/2013 11:29 AM, Mandy Chung wrote: This is a simple code deletion in sun.misc.JavaAWTAccess and its implementation class: Webrev: http://cr.openjdk.java.net/~mchung/jdk8/webrevs/8028234/webrev.00/ This patch removes the methods from

Re: RFR 8025003: Base64 should be less strict with padding

2013-11-12 Thread Xueming Shen
Hi Bill, I'm still not convinced that the Base64.Decoder should guess the missing bits (to fill with zero) for the last dangling single byte in the input stream, even in lenient mode. That said I understand it might be really desired to still be able to decode such malformed base64 byte stream

Re: hg: jdk8/tl/jdk: 7194897: JSR 292: Cannot create more than 16 instances of an anonymous class; ...

2013-11-12 Thread John Rose
On Nov 11, 2013, at 4:58 AM, Peter Levart peter.lev...@gmail.com wrote: Hi John, Remi, I tried to create a prototype to see how it compares to bytecode-generated method accessor. Here it is: https://bugs.openjdk.java.net/browse/JDK-6824466#comment-13426571 It seems that lambda forms

RFR raw types lint warnings fixes for java.util.concurrent

2013-11-12 Thread Joe Darcy
Hello concurrency maestros, I submit for your consideration a simple patch to silence the three remaining javac lint warnings in the java.util.concurrent package: diff -r 69432cb5bca2 src/share/classes/java/util/concurrent/ForkJoinPool.java ---

Re: RFR 8025003: Base64 should be less strict with padding

2013-11-12 Thread Bill Shannon
This still seems like an inconsistent, and inconvenient, approach to me. You've decided that some encoding errors (i.e., missing pad characters) can be ignored. You're willing to assume that the missing characters aren't missing data but just missing padding. But if you find a padding character

Re: RFR 8025003: Base64 should be less strict with padding

2013-11-12 Thread Xueming Shen
On 11/12/2013 03:32 PM, Bill Shannon wrote: This still seems like an inconsistent, and inconvenient, approach to me. You've decided that some encoding errors (i.e., missing pad characters) can be ignored. You're willing to assume that the missing characters aren't missing data but just missing

Re: RFR 8025003: Base64 should be less strict with padding

2013-11-12 Thread Bill Shannon
Xueming Shen wrote on 11/12/2013 04:25 PM: On 11/12/2013 03:32 PM, Bill Shannon wrote: This still seems like an inconsistent, and inconvenient, approach to me. You've decided that some encoding errors (i.e., missing pad characters) can be ignored. You're willing to assume that the missing

Re: RFR 8025003: Base64 should be less strict with padding

2013-11-12 Thread Xueming Shen
On 11/12/13 8:21 PM, Bill Shannon wrote: Xueming Shen wrote on 11/12/2013 04:25 PM: On 11/12/2013 03:32 PM, Bill Shannon wrote: This still seems like an inconsistent, and inconvenient, approach to me. You've decided that some encoding errors (i.e., missing pad characters) can be ignored.

Re: RFR 8025003: Base64 should be less strict with padding

2013-11-12 Thread Bill Shannon
Xueming Shen wrote on 11/12/2013 09:24 PM: On 11/12/13 8:21 PM, Bill Shannon wrote: Xueming Shen wrote on 11/12/2013 04:25 PM: On 11/12/2013 03:32 PM, Bill Shannon wrote: This still seems like an inconsistent, and inconvenient, approach to me. You've decided that some encoding errors (i.e.,

hg: jdk8/tl/jdk: 8028239: test/sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.sh with NoClassDefFoundError

2013-11-12 Thread alan . bateman
Changeset: c4c84b5a3dfa Author:alanb Date: 2013-11-13 07:43 + URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/c4c84b5a3dfa 8028239: test/sun/jvmstat/monitor/MonitoredVm/MonitorVmStartTerminate.sh with NoClassDefFoundError Reviewed-by: mchung, egahlin !