Re: Looking for Sponsor: JDK-8229959 Convert proxy class to use constant dynamic

2019-11-24 Thread Brian Goetz
OK, interesting.  Your interpretation seems right; that getting the MH is a big part of the expense of the LDC approach.  Caching simulates using Constant_MethodHandle_info, so that's a fair comparision.  It's not clear whether there's a performance difference getting the MH via lookup (as your

Re: Looking for Sponsor: JDK-8229959 Convert proxy class to use constant dynamic

2019-11-23 Thread Johannes Kuhn
On 11/23/2019 10:40 PM, Brian Goetz wrote: Finally, we can benchmark the current approach against the LDC approach on a per-Method basis.  The LDC approach may well be doing more work per Method, so it's a tradeoff to determine whether deferring that work is a win. By this last bit, I mea

Re: Looking for Sponsor: JDK-8229959 Convert proxy class to use constant dynamic

2019-11-23 Thread Brian Goetz
Finally, we can benchmark the current approach against the LDC approach on a per-Method basis.  The LDC approach may well be doing more work per Method, so it's a tradeoff to determine whether deferring that work is a win. By this last bit, I mean JMH'ing:     Method m1() {    return

Re: Looking for Sponsor: JDK-8229959 Convert proxy class to use constant dynamic

2019-11-23 Thread Brian Goetz
I just finished the first prototype, which can be found at https://gist.github.com/DasBrain/7766bedfbc8b76ba6a0ee66a54ba97ed - it contains a patch, the javap output of a generated proxy class with and without that patch, and the code I used to dump the proxy class. "make run-test-tier1" pass

Re: Looking for Sponsor: JDK-8229959 Convert proxy class to use constant dynamic

2019-11-23 Thread Johannes Kuhn
On 11/23/2019 6:09 PM, Brian Goetz wrote: Thanks for the examples. A few comments:   - A reasonable place to consider putting the bootstrap is in Proxy itself.  I am not sure that ConstantBootstraps is the right place (or anywhere in JLI for that matter) unless Method is retrofitted to imple

Re: Looking for Sponsor: JDK-8229959 Convert proxy class to use constant dynamic

2019-11-23 Thread Brian Goetz
Thanks for the examples. A few comments: - A reasonable place to consider putting the bootstrap is in Proxy itself. I am not sure that ConstantBootstraps is the right place (or anywhere in JLI for that matter) unless Method is retrofitted to implement Constable, which is problematic given

Re: Looking for Sponsor: JDK-8229959 Convert proxy class to use constant dynamic

2019-11-22 Thread Mandy Chung
On 11/22/19 2:05 PM, Johannes Kuhn wrote: On 22.11.2019 22:41, Remi Forax wrote: i wonder if some codes in the wild rely on that ? I don't think some code does, but you never know. There is perhaps a better way, as part of the branch nestmates of valhalla, Mandy has added a way to transfer

Re: Looking for Sponsor: JDK-8229959 Convert proxy class to use constant dynamic

2019-11-22 Thread Johannes Kuhn
On 22.11.2019 22:41, Remi Forax wrote: i wonder if some codes in the wild rely on that ? I don't think some code does, but you never know. There is perhaps a better way, as part of the branch nestmates of valhalla, Mandy has added a way to transfer a live object to a Class when defining it, w

Re: Looking for Sponsor: JDK-8229959 Convert proxy class to use constant dynamic

2019-11-22 Thread Johannes Kuhn
Last mail got converted from HTML into plaintext, which dropped some significant whit espace. So, again, doing it by hand this time. On 22.11.2019 20:52, Brian Goetz wrote: > For those that are not intimately familiar with the mechanics of proxy class generation, it would be great to flesh this

Re: Looking for Sponsor: JDK-8229959 Convert proxy class to use constant dynamic

2019-11-22 Thread Remi Forax
- Mail original - > De: "Johannes Kuhn" > À: "core-libs-dev" > Envoyé: Vendredi 22 Novembre 2019 04:23:31 > Objet: Looking for Sponsor: JDK-8229959 Convert proxy class to use constant > dynamic > Hi everyone, Hi Johannes, > > a few hours ago I signed the Oracle Contributor Agreement.

Re: Looking for Sponsor: JDK-8229959 Convert proxy class to use constant dynamic

2019-11-22 Thread Johannes Kuhn
On 22.11.2019 20:52, Brian Goetz wrote: For those that are not intimately familiar with the mechanics of proxy class generation, it would be great to flesh this out with a code example, that shows the proposed old and new translation. This would make it easier for folks to evaluate the benefits

Re: Looking for Sponsor: JDK-8229959 Convert proxy class to use constant dynamic

2019-11-22 Thread Brian Goetz
For those that are not intimately familiar with the mechanics of proxy class generation, it would be great to flesh this out with a code example, that shows the proposed old and new translation. This would make it easier for folks to evaluate the benefits and costs of the approach, and possibly