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: http://cr.openjdk.java.net/~plevart/jdk8-tl/Anno

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, Pete

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 09/09

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-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 wrote:

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) @Target(TYPE)

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 overr

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 wrote: > On Aug 12, 2013, at 2:40 PM, Peter Levart wrote: >> On 08/12/2013 12:54 PM, Joel Borggren-Franck wrote: >>> I realize the interaction between probably any reflective operation and >>> a redefine is blurry, but if a redefin

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

2013-08-13 Thread Joel Borggrén-Franck
Hi, Comments inline, On 12 aug 2013, at 14:40, Peter Levart wrote: > > On 08/12/2013 12:54 PM, Joel Borggren-Franck wrote: >> > > - annotation (@interface) declarations can themselves be redefined (for > example, defaults changed). Such redefinitions don't affect already > initialized anno

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 redefi

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 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 Ship

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: http://cr

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. Th

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 Shipilev 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 looks good to me (not a capital

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

2013-08-12 Thread Paul Sandoz
On Aug 11, 2013, at 8:12 PM, Aleksey Shipilev 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 looks good to me (not a capital Reviewer). > +1 (with no reviewer mojo). Paul.

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.

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

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

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 constr