Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-03-03 Thread Vladimir Ivanov
Sigh, it's not so simple... I forgot about 8034120 [1]. The problem is that MH.invoke/invokeWithArguments have unpleasant effect for VarargsCollector. It introduces a difference in behavior between interpreting LF and executing compiled version. Filed 8036117 to track the problem. Best

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-28 Thread Vladimir Ivanov
Thanks for review, John! Best regards, Vladimir Ivanov On 2/28/14 12:39 AM, John Rose wrote: On Feb 26, 2014, at 3:44 AM, Vladimir Ivanov vladimir.x.iva...@oracle.com mailto:vladimir.x.iva...@oracle.com wrote: Maybe use invokeWithArguments with target and catcher? That at least is a

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-27 Thread John Rose
On Feb 26, 2014, at 3:44 AM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: Maybe use invokeWithArguments with target and catcher? That at least is a one-liner, and probably more efficient. Yes, that's a good idea! At least, it considerably simplifies the code. Updated webrev:

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-25 Thread Vladimir Ivanov
John, Thanks for review! Updated webrev: http://cr.openjdk.java.net/~vlivanov/8027827/final/webrev.02/ See my comments inline. Also, integrated some pending cleanups (e.g. improved selectAlternative detection). Best regards, Vladimir Ivanov On 2/24/14 9:46 PM, John Rose wrote: On Feb 20,

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-24 Thread John Rose
On Feb 20, 2014, at 9:57 AM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: Updated webrev: http://cr.openjdk.java.net/~vlivanov/8027827/final/webrev.01/ I finally figured out how to make caching work. This webrev contains these changes. I changed LF representation a bit and added

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-21 Thread Paul Sandoz
On Feb 20, 2014, at 6:57 PM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: Paul, Thanks for the feedback! See my answers inline. Updated webrev: http://cr.openjdk.java.net/~vlivanov/8027827/final/webrev.01/ I finally figured out how to make caching work. This webrev contains

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-21 Thread Remi Forax
Hi Valdimir, is there a reason to generate try { ... } catch(Throwable t) { if (Klass.isInstance(t)) { ... } throw t; } instead of: try { ... } catch(Klass t) { ... } maybe because the Klass can be resolved by the wrong classloader ? RĂ©mi

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-21 Thread Christian Thalinger
On Feb 20, 2014, at 9:57 AM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: Paul, Thanks for the feedback! See my answers inline. Updated webrev: http://cr.openjdk.java.net/~vlivanov/8027827/final/webrev.01/ I finally figured out how to make caching work. This webrev contains

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-20 Thread Marcus Lagergren
This looks good, and we have done a significant number of test runs to verify its integrity. I say ship it. +1 We know that there are some issues with sun.misc.ValueConversion.castReference and similar internal methods not being inlined, but as far as I can understand this is a separate issue

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-20 Thread Paul Sandoz
Hi Vladimir, I know just enough about this area to be dangerous src/share/classes/java/lang/invoke/BoundMethodHandle.java 865 private static final SpeciesData[] SPECIES_DATA_CACHE = new SpeciesData[4]; Only 3 elements are stored in the above array?

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-20 Thread Vladimir Ivanov
Thanks, Marcus! Best regards, Vladimir Ivanov On 2/20/14 7:31 PM, Marcus Lagergren wrote: This looks good, and we have done a significant number of test runs to verify its integrity. I say ship it. +1 We know that there are some issues with sun.misc.ValueConversion.castReference and

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-20 Thread Vladimir Ivanov
Paul, Thanks for the feedback! See my answers inline. Updated webrev: http://cr.openjdk.java.net/~vlivanov/8027827/final/webrev.01/ I finally figured out how to make caching work. This webrev contains these changes. I changed LF representation a bit and added 2 auxiliary method handles -

Re: [9] RFR (M): 8027827: Improve performance of catchException combinator

2014-02-20 Thread Marcus Lagergren
Got catches, Paul! /M On 20 Feb 2014, at 18:57, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: Paul, Thanks for the feedback! See my answers inline. Updated webrev: http://cr.openjdk.java.net/~vlivanov/8027827/final/webrev.01/ I finally figured out how to make caching work. This