Re: bottleneck by java.lang.Class.getAnnotations() - proposed patch

2012-11-04 Thread David Holmes
Hi Peter, Moving the annotations fields into a helper object would tie in with the Class-instance size reduction effort that was investigated as part of "JEP 149: Reduce Core-Library Memory Usage": http://openjdk.java.net/jeps/149 The investigations there to date only looked at relocating th

Re: bottleneck by java.lang.Class.getAnnotations() - proposed patch

2012-11-04 Thread Peter Levart
Hi, I propose the following patch to java.lang.Class in order to overcome the synchronization bottleneck when accessing annotations from multiple threads. The patch packs the 'annotations' and 'declaredAnnotations' Maps together with an int redefinedCount into a structure: static class A

Re: bottleneck by java.lang.Class.getAnnotations()

2012-11-04 Thread Peter Levart
On 11/02/2012 12:04 PM, Peter Levart wrote: On 11/02/2012 11:03 AM, Alexander Knöller wrote: Hello there. (Reposting this request for improvement as suggested in mailing list jdk6-dev) java.lang.Class.getAnnotations() always enters a synchronized-block (initAnnotationsIfNecessary() ), slowi

Re: Preliminary review: Adding tracing of I/O calls

2012-11-04 Thread Alan Bateman
On 04/11/2012 12:50, Staffan Larsen wrote: : I realize the focus is blocking I/O for now but one thing to know is that timed read operations on socket adapters (the socket obtained by calling SocketChannel's socket method) configures the socket channel to be non-blocking so this means that th

hg: jdk8/tl/jdk: 8000330: (fc) FileChannel.truncate issues when given size > file size; ...

2012-11-04 Thread alan . bateman
Changeset: bc09a1591629 Author:alanb Date: 2012-11-04 14:07 + URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/bc09a1591629 8000330: (fc) FileChannel.truncate issues when given size > file size 8002180: (fc) FileChannel.map does not throw NPE if MapMode specified as null Reviewed

Re: about SuppressWarnings

2012-11-04 Thread Alan Bateman
On 04/11/2012 13:19, fuyou wrote: hi all When I use @SuppressWarnings in program. I only know some ,ex @SuppressWarnings("unchecked"),@SuppressWarnings("unused"). what others? The JLS specifies two warning names [2], beyond that it is compiler specific. In the case of javac then

Re: about SuppressWarnings

2012-11-04 Thread Krystal Mok
Hi, If you're using javac to compile your Java source code, than you can try running javac -X to see the list of -Xlint options. That'll give you a hint of what warnings can be suppressed. As from the JavaDoc [1], the warning names are vendor specific. So if you're not using javac then youll need

Re: Preliminary review: Adding tracing of I/O calls

2012-11-04 Thread Staffan Larsen
Thanks Alan. Some comments inline. On 2 nov 2012, at 23:21, Alan Bateman wrote: > On 02/11/2012 18:36, Staffan Larsen wrote: >> This is a preliminary review request for adding an API for tracing I/O >> calls. For now, this is an empty infrastructure intended to enable >> diagnosing/tracing of

Re: Preliminary review: Adding tracing of I/O calls

2012-11-04 Thread Staffan Larsen
Aleksey, Thanks for looking at the code. I have been running volano on this, but could not detect any regressions. If that is because there are no regressions, because volano is not the right workload or because the run-to-run variance is so high, I cannot say. I'm going to try to develop micr

Re: Preliminary review: Adding tracing of I/O calls

2012-11-04 Thread Aleksey Shipilev
On 11/03/2012 01:15 AM, Mandy Chung wrote: > On 11/2/2012 1:47 PM, Staffan Larsen wrote: >> On 2 nov 2012, at 21:12, Mandy Chung wrote: >> >>> The *Begin() methods return a "handle" that will be passed to the >>> *End() methods. Have you considered to define a type for it rather >>> than Object?

hg: jdk8/tl/langtools: 2 new changesets

2012-11-04 Thread maurizio . cimadamore
Changeset: d7d932236fee Author:mcimadamore Date: 2012-11-04 10:59 + URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/d7d932236fee 7192246: Add type-checking support for default methods Summary: Add type-checking support for default methods as per Featherweight-Defender doc

Re: 7197491: update copyright year to match last edit in jdk8 jdk repository

2012-11-04 Thread David Holmes
On 3/11/2012 3:27 AM, Kelly O'Hair wrote: All changes to JDK sources require a CR, an OpenJDK author name, and a review by a second OpenJDK author. So although you can automate the preparation of the commit, you cannot fully automate this process. There have been many discussions over the year