Re: 7127687: MethodType leaks memory due to interning

2012-03-28 Thread Vitaly Davidovich
We only care about keys here anyway, right? WeakHashMap with a dummy value object (some static reference) should achieve the same thing since its Entry will have the key referenced weakly and the value strongly (but we don't care since the value is a dummy static ref). Maybe I misunderstood the in

Re: 7127687: MethodType leaks memory due to interning

2012-03-28 Thread John Rose
Thanks, Jim. -- John (on my iPhone T-1000) On Mar 28, 2012, at 6:01 PM, Jim Laskey wrote: > The WeakHashMap leads to a non-weak reference to the class, since only the > key is weak. Same is true for public versions of WeakHashSet. The collection > used here is truly weak. > > Sent from my

Re: 7127687: MethodType leaks memory due to interning

2012-03-28 Thread Jim Laskey
The WeakHashMap leads to a non-weak reference to the class, since only the key is weak. Same is true for public versions of WeakHashSet. The collection used here is truly weak. Sent from my iPhone 4 On 2012-03-28, at 9:42 PM, Vitaly Davidovich wrote: > Hi John, > > I think you can use diamo

Re: 7127687: MethodType leaks memory due to interning

2012-03-28 Thread Vitaly Davidovich
Hi John, I think you can use diamond generic inference when declaring the weak intern set. Also any reason you didn't use WeakHashMap directly with dummy value to simulate the set? Or wrap the WeakHashMap and synchronize the accessors to it? Sent from my phone On Mar 28, 2012 7:52 PM, "John Rose

hg: mlvm/mlvm/jdk: meth: add some point-fixes

2012-03-28 Thread john . r . rose
Changeset: 09ae01b28f25 Author:jrose Date: 2012-03-28 16:55 -0700 URL: http://hg.openjdk.java.net/mlvm/mlvm/jdk/rev/09ae01b28f25 meth: add some point-fixes + cval-7153157.patch + meth-7087658.patch + meth-7127687.patch + meth-7129034.patch ! series

7087658: MethodHandles.Lookup.findVirtual is confused by interface methods that are multiply inherited

2012-03-28 Thread John Rose
http://cr.openjdk.java.net/~jrose/7087658/webrev.00/ 7087658: MethodHandles.Lookup.findVirtual is confused by interface methods that are multiply inherited This is a point fix for JDK 8, and will (pending approval) also be back-ported to JDK 7u. — John Notes on process: This code is part of

7127687: MethodType leaks memory due to interning

2012-03-28 Thread John Rose
http://cr.openjdk.java.net/~jrose/7127687/webrev.00/ 7127687: MethodType leaks memory due to interning Summary: Replace internTable with a weak-reference version. This is a point fix for JDK 8, and will (pending approval) also be back-ported to JDK 7u. — John Notes on process: This code is pa

hg: mlvm/mlvm/hotspot: meth-lazy: add missing branch

2012-03-28 Thread john . r . rose
Changeset: 3a5e14ca348a Author:jrose Date: 2012-03-28 10:56 -0700 URL: http://hg.openjdk.java.net/mlvm/mlvm/hotspot/rev/3a5e14ca348a meth-lazy: add missing branch ! meth-lazy-7023639.patch ___ mlvm-dev mailing list mlvm-dev@openjdk.java.

Re: bug in MacroAssembler::check_method_handle_type for x86

2012-03-28 Thread John Rose
On Mar 21, 2012, at 8:17 AM, Christian Thalinger wrote: > John, I think there is a bug in MacroAssembler::check_method_handle_type for > x86 (with meth-lazy): That's correct. Thanks for noticing it; I'll push a fix. — John ___ mlvm-dev mailing list m

Re: review request (S): 7129034: VM crash with a field setter method with a filterArguments

2012-03-28 Thread Christian Thalinger
Looks good. -- Chris On Mar 27, 2012, at 10:04 AM, John Rose wrote: > http://cr.openjdk.java.net/~jrose/7129034/webrev.00/ > > 7129034: VM crash with a field setter method with a filterArguments > Summary: add null checks before unsafe calls that take a variable base > reference; update unit t

Re: review request (S): 7153157: ClassValue.get does not return if computeValue calls remove

2012-03-28 Thread Christian Thalinger
Looks good. -- Chris On Mar 27, 2012, at 10:01 AM, John Rose wrote: > http://cr.openjdk.java.net/~jrose/7153157/webrev.00/ > > 7153157: ClassValue.get does not return if computeValue calls remove > Summary: Track intermediate states more precisely, according to spec. > > This is a point fix fo