Re: 7127687: MethodType leaks memory due to interning

2012-03-30 Thread John Rose
This updated webrev incorporates reviewer comments: http://cr.openjdk.java.net/~jrose/7127687/webrev.01/ Thanks! — John ___ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Re: 7127687: MethodType leaks memory due to interning

2012-03-30 Thread John Rose
On Mar 29, 2012, at 3:26 AM, Rémi Forax wrote: > I think you can remove all public methods of class WeakInternSet > but ,add() i.e. tailor the implementation only for the need, at least > until Doug Lea > provides a weak/concurent/hashmap in java.util.concurent. OK, I did this. Removed "public"

Re: 7127687: MethodType leaks memory due to interning

2012-03-30 Thread John Rose
On Mar 28, 2012, at 5:42 PM, Vitaly Davidovich wrote: > I think you can use diamond generic inference when declaring the weak intern > set > Done; thanks. > Also any reason you didn't use WeakHashMap directly with dummy value to > simulate the set? Or wrap the WeakHashMap and synchronize the acc

Re: 7127687: MethodType leaks memory due to interning

2012-03-30 Thread John Rose
On Mar 28, 2012, at 7:50 PM, David Holmes wrote: > One query I have is whether, given its intended usage, this change might add > pressure to the reference processing subsystem? Not undue pressure, I hope. JSR 292 applications tend to converge rapidly on the number of distinct MethodTypes they

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread John Rose
Jim's and Remi's comments on the problem are correct. In the current design, MH.type values must be interned. Comments on this design decision are interesting and useful, but this is not new ground; we went over it during the JDK 7 engineering and spec. work. It is likely we will revisit this

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread Jim Laskey
gt;> >>> On 2012-03-28, at 9:42 PM, Vitaly Davidovich wrote: >>> >>>> Hi John, >>>> >>>> I think you can use diamond generic inference when declaring the weak >>>> intern set. >>>> >>>> Also any reason you didn&#

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread Vitaly Davidovich
ons 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 diamond g

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread Jim Laskey
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 fro

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread Vitaly Davidovich
>> 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 >> i

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread A. Sundararajan
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" wrote: >>> http://cr.openjdk.java.net/~jros

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread Rémi Forax
he WeakHashMap and >>> synchronize the accessors to it? >>> >>> Sent from my phone >>> >>> On Mar 28, 2012 7:52 PM, "John Rose" >> <mailto:john.r.r...@oracle.com>> wrote: >>> >>>

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread Jim Laskey
and synchronize the accessors to >> it? >> >> Sent from my phone >> >> On Mar 28, 2012 7:52 PM, "John Rose" wrote: >> http://cr.openjdk.java.net/~jrose/7127687/webrev.00/ >> >> 7127687: MethodType leaks memory due to interning >> Summary: Replac

Re: 7127687: MethodType leaks memory due to interning

2012-03-28 Thread Vitaly Davidovich
te 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" wrote: > >> http://cr.openjdk.java.net/~jrose/7127687/webrev.00/ >> >> 7127687: MethodType leaks memory due to inter

Re: 7127687: MethodType leaks memory due to interning

2012-03-28 Thread John Rose
ap 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" wrote: >> http://cr.openjdk.java.net/~jrose/7127687/webrev.00/ &

Re: 7127687: MethodType leaks memory due to interning

2012-03-28 Thread Jim Laskey
12 7:52 PM, "John Rose" wrote: > 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) a

Re: 7127687: MethodType leaks memory due to interning

2012-03-28 Thread Vitaly Davidovich
"John Rose" wrote: > 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-po

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