RFR(S): 8160717: MethodHandles.loop() does not check for excessive signature

Michael Haupt michael.haupt at oracle.com
Wed Jul 6 12:55:16 UTC 2016


Hi Claes,

> Am 06.07.2016 um 13:31 schrieb Claes Redestad <claes.redestad at oracle.com>:
>>> I'll let Claes comment on the broader PerfCounter question, as he suggested using them. I think PerfCounter is a convenient abstraction for what we want to achieve, but the way it's used here may smell a bit abusive.
>>> 
>> 
>> Ok.
> 
> I know of a number of Java-side PerfCounters created early (and they're rather lean on dependencies in the first place, a select number of j.u.c.atomic classes IIRC), so I wouldn't worry about much of a startup penalty here.
> 
> Lazy initialization might not save us much, and would hide the counter from showing up.
> 
> I guess what I'm saying is I'm good with webrev.00. :-)

thank you - some sensible improvements notwithstanding; see http://cr.openjdk.java.net/~mhaupt/8160717/webrev.01/.

>> A wild thought: is there anyway to add some context/data to the ASM processing indicating what intrinsic is being processed, so when you get the exception you can at least differentiate.
> 
> While out of scope for this change, maybe we should seek to improve robustness by asking the ASM project to add more distinctive exceptions, say, create a MethodTooLargeException or similar, in which case we could change the catch to be more specific.

Four thumbs up: domain-specific meaningful exceptions are A Good Thing.

Best,

Michael

-- 

 <http://www.oracle.com/>
Dr. Michael Haupt | Principal Member of Technical Staff
Phone: +49 331 200 7277 | Fax: +49 331 200 7561
Oracle Java Platform Group | LangTools Team | Nashorn
Oracle Deutschland B.V. & Co. KG | Schiffbauergasse 14 | 14467 Potsdam, Germany

ORACLE Deutschland B.V. & Co. KG | Hauptverwaltung: Riesstraße 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V. | Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
 <http://www.oracle.com/commitment>	Oracle is committed to developing practices and products that help protect the environment



More information about the core-libs-dev mailing list