Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-09-19 Thread Peter Levart
Thanks Joel, I will push this now. Regards, Peter On 09/18/2013 11:28 AM, Joel Borggrén-Franck wrote: Looks good Peter, cheers /Joel On 2013-09-15, Peter Levart wrote: Hi, I rebased the changes and added @bug tag to test. Here's new webrev:

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-09-18 Thread Joel Borggrén-Franck
Looks good Peter, cheers /Joel On 2013-09-15, Peter Levart wrote: Hi, I rebased the changes and added @bug tag to test. Here's new webrev: http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationData/webrev.04/ Joel, I believe you've got the R mojo now... Regards, Peter On

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-09-15 Thread Peter Levart
Hi, I rebased the changes and added @bug tag to test. Here's new webrev: http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationData/webrev.04/ Joel, I believe you've got the R mojo now... Regards, Peter On 09/09/2013 06:57 PM, Peter Levart wrote: Hi Joel, Thanks for reviewing. On

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-09-09 Thread Joel Borggrén-Franck
Hi Peter, Thanks for this, please add a @bug 8011940 tag to your test. IMO you don't need a re-review for that. Otherwise looks good. We still need a Reviewer, Chris, you reviewed a previous version, can you look at this one too? cheers /Joel On 27 aug 2013, at 15:00, Peter Levart

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-09-09 Thread Peter Levart
Hi Joel, Thanks for reviewing. On 09/09/2013 04:25 PM, Joel Borggrén-Franck wrote: Hi Peter, Thanks for this, please add a @bug 8011940 tag to your test. IMO you don't need a re-review for that. Otherwise looks good. I'll do that. I just didn't know whether tagging with bug-ID is meant

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-09-04 Thread Peter Levart
On 08/13/2013 09:52 AM, Joel Borggrén-Franck wrote: 1) We should really measure this. Hi Joel, Here're some measurements of memory usages for some typical situations: // no annotations public static class *Unannotated* { } // typical annotations (JPA-like)

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-08-27 Thread Peter Levart
Hi Joel and others, Here's a 3rd revision of this proposed patch: http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationData/webrev.03/ I used LinkedHashMap for annotations in this one. It means that now even .getAnnotations() are reported in declaration order: 1st inherited (includes

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-08-13 Thread Joel Borggrén-Franck
Hi all, Comments inline, On 12 aug 2013, at 15:19, Paul Sandoz paul.san...@oracle.com wrote: On Aug 12, 2013, at 2:40 PM, Peter Levart peter.lev...@gmail.com wrote: On 08/12/2013 12:54 PM, Joel Borggren-Franck wrote: I realize the interaction between probably any reflective operation and a

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-08-12 Thread Chris Hegarty
Looks good to me too. -Chris. On 12/08/2013 09:20, Paul Sandoz wrote: On Aug 11, 2013, at 8:12 PM, Aleksey Shipilevaleksey.shipi...@oracle.com wrote: On 08/11/2013 03:39 PM, Peter Levart wrote: http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationData/webrev.02/ Thanks Peter, this

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-08-12 Thread Joel Borggren-Franck
Hi Peter, Thank you for looking in to this! On 2013-08-11, Peter Levart wrote: On 08/07/2013 06:42 PM, Aleksey Shipilev wrote: Hi Peter, On 08/07/2013 08:18 PM, Peter Levart wrote: http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationData/webrev.01/ Yeah, looks familiar. The install

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-08-12 Thread Peter Levart
Hi Joel, Thanks for review. Comments inline... On 08/12/2013 12:54 PM, Joel Borggren-Franck wrote: Hi Peter, Thank you for looking in to this! On 2013-08-11, Peter Levart wrote: On 08/07/2013 06:42 PM, Aleksey Shipilev wrote: Hi Peter, On 08/07/2013 08:18 PM, Peter Levart wrote:

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-08-12 Thread Paul Sandoz
On Aug 12, 2013, at 2:40 PM, Peter Levart peter.lev...@gmail.com wrote: Hi Joel, Thanks for review. Comments inline... On 08/12/2013 12:54 PM, Joel Borggren-Franck wrote: Hi Peter, Thank you for looking in to this! On 2013-08-11, Peter Levart wrote: On 08/07/2013 06:42 PM, Aleksey

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-08-12 Thread Peter Levart
On 08/12/2013 03:19 PM, Paul Sandoz wrote: - inherited annotations. They are combined with declared annotations in a Map that is cached in the AnnotationData. If superclass is redefined, the inherited annotations are not invalidated. Unless the VM increments classRedefinedCount for the

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-08-11 Thread Peter Levart
On 08/07/2013 06:42 PM, Aleksey Shipilev wrote: Hi Peter, On 08/07/2013 08:18 PM, Peter Levart wrote: http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationData/webrev.01/ Yeah, looks familiar. The install loop is very complicated though, can we simplify it? It seems profitable to move the

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-08-11 Thread Aleksey Shipilev
On 08/11/2013 03:39 PM, Peter Levart wrote: http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationData/webrev.02/ Thanks Peter, this looks good to me (not a capital Reviewer). -Aleksey.

RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-08-07 Thread Peter Levart
Hi, I propose a patch for the following and related bugs: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8011940 Here's the 1st webrev: http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationData/webrev.01/ The patch eliminates classic synchronization by using optimistic concurrent

Re: RFR JDK-8011940 : java.lang.Class.getAnnotations() always enters synchronized method

2013-08-07 Thread Aleksey Shipilev
Hi Peter, On 08/07/2013 08:18 PM, Peter Levart wrote: http://cr.openjdk.java.net/~plevart/jdk8-tl/AnnotationData/webrev.01/ Yeah, looks familiar. The install loop is very complicated though, can we simplify it? It seems profitable to move the retry loop up into annotationData(): you then don't