Re: [8u40] RFR 6642881: Improve performance of Class.getClassLoader()

2016-07-29 Thread David Holmes
On 29/07/2016 5:55 PM, Leela Mohan wrote: Hi David, I understand, Klass types are no longer oops but JNIHandles::resolve_non_null() would expose naked oops. In other words, KlassOops are no longer oops but java.lang.Class objects are. Yes my mistake - focusing on the wrong aspect. Good

Re: [8u40] RFR 6642881: Improve performance of Class.getClassLoader()

2016-07-29 Thread Leela Mohan
I think, change in the file unsafe.cpp is incorrect. ( http://cr.openjdk.java.net/~coleenp/6642881_8u40_hotspot/ ) Below function is accessing naked oops when thread has transitioned to "native": *+ static jobject get_class_loader(JNIEnv* env, jclass cls) {**+ if

Re: [8u40] RFR 6642881: Improve performance of Class.getClassLoader()

2016-07-29 Thread Leela Mohan
Hi David, I understand, Klass types are no longer oops but JNIHandles::resolve_non_null() would expose naked oops. In other words, KlassOops are no longer oops but java.lang.Class objects are. Thanks, Leela On Thu, Jul 28, 2016 at 10:51 PM, David Holmes wrote: > Hi

Re: [8u40] RFR 6642881: Improve performance of Class.getClassLoader()

2016-07-28 Thread David Holmes
Hi Leela, On 29/07/2016 12:59 PM, Leela Mohan wrote: I think, change in the file unsafe.cpp is incorrect. ( http://cr.openjdk.java.net/~coleenp/6642881_8u40_hotspot/ ) Below function is accessing naked oops when thread has transitioned to "native": *+ static jobject get_class_loader(JNIEnv*

Re: [8u40] RFR 6642881: Improve performance of Class.getClassLoader()

2014-09-08 Thread Coleen Phillimore
Thanks David! Coleen On 9/7/14, 9:38 PM, David Holmes wrote: Looks okay to me. David On 6/09/2014 5:55 AM, Coleen Phillimore wrote: Summary: Add classLoader to java/lang/Class instance for fast access This is a backport request for 8u40. This change has been in the jdk9 code for 3 months

Re: [8u40] RFR 6642881: Improve performance of Class.getClassLoader()

2014-09-08 Thread Coleen Phillimore
Thanks, Mandy! Coleen On 9/8/14, 6:59 PM, Mandy Chung wrote: Thumbs up. Mandy On 9/5/2014 12:55 PM, Coleen Phillimore wrote: Summary: Add classLoader to java/lang/Class instance for fast access This is a backport request for 8u40. This change has been in the jdk9 code for 3 months

Re: [8u40] RFR 6642881: Improve performance of Class.getClassLoader()

2014-09-07 Thread David Holmes
Looks okay to me. David On 6/09/2014 5:55 AM, Coleen Phillimore wrote: Summary: Add classLoader to java/lang/Class instance for fast access This is a backport request for 8u40. This change has been in the jdk9 code for 3 months without any problems. The JDK changes hg imported cleanly.

[8u40] RFR 6642881: Improve performance of Class.getClassLoader()

2014-09-05 Thread Coleen Phillimore
Summary: Add classLoader to java/lang/Class instance for fast access This is a backport request for 8u40. This change has been in the jdk9 code for 3 months without any problems. The JDK changes hg imported cleanly. The Hotspot change needed a hand merge for create_mirror call in

Re: RFR 6642881: Improve performance of Class.getClassLoader()

2014-06-24 Thread Alan Bateman
On 24/06/2014 00:45, Coleen Phillimore wrote: Please review a change to the JDK code for adding classLoader field to the instances of java/lang/Class. This change restricts reflection from changing access to the classLoader field. In the spec, AccessibleObject.setAccessible() may throw

Re: RFR 6642881: Improve performance of Class.getClassLoader()

2014-06-24 Thread Peter Levart
On 06/24/2014 01:45 AM, Coleen Phillimore wrote: Please review a change to the JDK code for adding classLoader field to the instances of java/lang/Class. This change restricts reflection from changing access to the classLoader field. In the spec, AccessibleObject.setAccessible() may throw

Re: RFR 6642881: Improve performance of Class.getClassLoader()

2014-06-24 Thread Frederic Parain
Hi Coleen, It seems that there's still a reference to JVM_GetClassLoader in file jdk/src/share/native/common/check_code.c. The code looks like dead code, but it would be nice to clean it up. Thanks, Fred On 06/24/2014 01:45 AM, Coleen Phillimore wrote: Please review a change to the JDK code

Re: RFR 6642881: Improve performance of Class.getClassLoader()

2014-06-24 Thread Coleen Phillimore
Hi Peter, On 6/24/14, 4:23 AM, Peter Levart wrote: On 06/24/2014 01:45 AM, Coleen Phillimore wrote: Please review a change to the JDK code for adding classLoader field to the instances of java/lang/Class. This change restricts reflection from changing access to the classLoader field. In

Re: RFR 6642881: Improve performance of Class.getClassLoader()

2014-06-24 Thread Coleen Phillimore
Fred, Thank you for finding this. Yes, I meant to clean this up with the bug to remove JVM_GetClassLoader but I should remove this with this change instead, since the other change will be in hotspot only. Yes, it's dead code. Thanks! Coleen On 6/24/14, 4:41 AM, Frederic Parain wrote: Hi

Re: RFR 6642881: Improve performance of Class.getClassLoader()

2014-06-24 Thread Coleen Phillimore
On 6/24/14, 4:41 AM, Frederic Parain wrote: Hi Coleen, It seems that there's still a reference to JVM_GetClassLoader in file jdk/src/share/native/common/check_code.c. The code looks like dead code, but it would be nice to clean it up. I removed this code. There are no other instances of the

Re: RFR 6642881: Improve performance of Class.getClassLoader()

2014-06-23 Thread Coleen Phillimore
Please review a change to the JDK code for adding classLoader field to the instances of java/lang/Class. This change restricts reflection from changing access to the classLoader field. In the spec, AccessibleObject.setAccessible() may throw SecurityException if the accessibility of an

Re: RFR 6642881: Improve performance of Class.getClassLoader()

2014-06-23 Thread Mandy Chung
Coleen, On 6/23/2014 4:45 PM, Coleen Phillimore wrote: Please review a change to the JDK code for adding classLoader field to the instances of java/lang/Class. This change restricts reflection from changing access to the classLoader field. In the spec, AccessibleObject.setAccessible() may

Re: RFR 6642881: Improve performance of Class.getClassLoader()

2014-06-23 Thread Coleen Phillimore
On 6/23/14, 9:36 PM, Mandy Chung wrote: Coleen, On 6/23/2014 4:45 PM, Coleen Phillimore wrote: Please review a change to the JDK code for adding classLoader field to the instances of java/lang/Class. This change restricts reflection from changing access to the classLoader field. In the

Re: RFR 6642881: Improve performance of Class.getClassLoader()

2014-06-23 Thread David Holmes
On 24/06/2014 11:44 AM, Coleen Phillimore wrote: On 6/23/14, 9:36 PM, Mandy Chung wrote: Coleen, On 6/23/2014 4:45 PM, Coleen Phillimore wrote: Please review a change to the JDK code for adding classLoader field to the instances of java/lang/Class. This change restricts reflection from