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: bug in MacroAssembler::check_method_handle_type for x86

2012-03-29 Thread Christian Thalinger
On Mar 28, 2012, at 7:31 PM, John Rose wrote: > 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 The weird th

Re: hg: mlvm/mlvm/jdk: meth-lazy: rebased; added an incomplete fix for 7129034

2012-03-29 Thread Christian Thalinger
On Mar 29, 2012, at 5:58 PM, christian.thalin...@oracle.com wrote: > Changeset: 66e23d30ba5c > Author:twisti > Date: 2012-03-29 17:58 +0200 > URL: http://hg.openjdk.java.net/mlvm/mlvm/jdk/rev/66e23d30ba5c > > meth-lazy: rebased; added an incomplete fix for 7129034 The fix is inco

hg: mlvm/mlvm/jdk: meth-lazy: rebased; added an incomplete fix for 7129034

2012-03-29 Thread christian . thalinger
Changeset: 66e23d30ba5c Author:twisti Date: 2012-03-29 17:58 +0200 URL: http://hg.openjdk.java.net/mlvm/mlvm/jdk/rev/66e23d30ba5c meth-lazy: rebased; added an incomplete fix for 7129034 ! meth-lazy-7023639.bcg.patch ! meth-lazy-7023639.patch ! meth-lazy-7023639.refac.patch ___

Re: Status of indy opto, update releases...

2012-03-29 Thread Mark Roos
For this test I am using the August test case ( just for this bug ) as it takes quite a bit of thrashing to get it to occur. I'll put together a new version in the next few days mark From: Christian Thalinger To: Da Vinci Machine Project Date: 03/29/2012 03:48 AM Subject:Re:

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread Jim Laskey
If you have instances of a MethodType A and B, that have the exact same return type and arguments, then they are equivalent and it is necessary to only keep one (let's say A.) It's also desirable to only keep one copy because of the equals test, not just java code, but also internally in the Ho

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread Vitaly Davidovich
I don't see anything precluding == equality check. MethodType is the key, it implements equals() via ==. In order to look it up in the data structure you need to have a reference to one of these instances already, correct? So if you have a reference to it, call containsKey() using it and get true

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread Jim Laskey
That's probably a legitimate argument. I only chose Set because it was based on the existing code in WeakHashMap/WeakHashSet. Maybe WeakInterner may be more appropriate. "although possibly different instance" is THE thing. We only want one instance of each MethodType in the environment so t

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread Vitaly Davidovich
No set that I know of allows you to get the key - you can check for its presence or remove it. Since containsKey() requires that you pass it the key to find, there's nothing to return since you already have an equivalent key (although possibly different instance). If that's not the intent of Weak

Re: Status of indy opto, update releases...

2012-03-29 Thread Charles Oliver Nutter
On Thu, Mar 29, 2012 at 10:46 AM, Christian Thalinger wrote: >> * indy classloading headaches >> >> The old NoClassDefFound problems seem to have gone away (or I just >> haven't been able to trigger them) but more recently I reported on >> this list about LinkageErrors that seemed to be caused by

Re: hg: mlvm/mlvm/jdk: rebase to current hsx/hotspot-comp; remove preview for 7113349

2012-03-29 Thread Christian Thalinger
Just a heads up: most meth-lazy patches don't apply after this rebase. I try to fix it. -- Chris On Mar 27, 2012, at 2:26 AM, john.r.r...@oracle.com wrote: > Changeset: fbbb26a3c3ff > Author:jrose > Date: 2012-03-26 17:26 -0700 > URL: http://hg.openjdk.java.net/mlvm/mlvm/jdk/re

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread A. Sundararajan
Looks good to me. PS. Remi notes that only constructor and "add" method of WeakInternSet are accessed from the containing class. The rest can be made private. -Sundar John Rose wrote: > Thanks, Jim. > > -- John (on my iPhone T-1000) > > On Mar 28, 2012, at 6:01 PM, Jim Laskey wrote: > >

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

2012-03-29 Thread Christian Thalinger
Looks good. -- Chris On Mar 29, 2012, at 1:54 AM, John Rose wrote: > 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)

Re: Status of indy opto, update releases...

2012-03-29 Thread Christian Thalinger
On Mar 22, 2012, at 8:20 PM, Mark Roos wrote: > I still get the NoClassDefFoundError (same jar I posted some time ago) > > on OSX with > > java -agentpath:javaDebug.dylib -jar RtalkTest.jar ri/experiment2/RtalkTest > > openjdk version "1.7.0-u4-b10" > OpenJDK Runtime Environment (build 1

Re: Status of indy opto, update releases...

2012-03-29 Thread Christian Thalinger
On Mar 22, 2012, at 11:39 AM, Charles Oliver Nutter wrote: > Hey all! We're nearing the end of JRuby's 1.7 dev cycle, and I thought > I should check in on the status of invokedynamic optimization work, > update releases, and so on. > > We've been getting more and more excellent reports of JRuby

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread Rémi Forax
John, 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. Rémi On 03/29/2012 11:45 AM, Jim Laskey wrote: > What we are trying to do is inter

Re: 7127687: MethodType leaks memory due to interning

2012-03-29 Thread Jim Laskey
What we are trying to do is intern the MethodType. Maps are designed to provide the key -> value relationship (one way.) If we only used the key and a dummy value in the Map, it would be equivalent to a write only collection, since there is no method to return a found key. We would have to set