[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    RFR: 8161588: MemberName::resolveOrNull cause and hide NoSuchMethodErrors
From:       Claes Redestad <claes.redestad () oracle ! com>
Date:       2016-07-19 19:17:02
Message-ID: 578E7CAE.6070705 () oracle ! com
[Download RAW message or body]

Hi,

please review this bug fix to ensure MemberName::resolveOrNull doesn't
throw exceptions when speculatively looking up members that aren't
there.

HS: http://cr.openjdk.java.net/~redestad/8161588/hs.01
JDK: http://cr.openjdk.java.net/~redestad/8161588/jdk.01

This avoids throwing NoSuchMethodError etc just to be ignored, avoiding
a performance penalty when looking things up speculatively (which is key
to possible upcoming work to generate more JLI code with jlink).

There's a pre-existing issue not dealt with by this fix in that the
exceptions thrown in MHN_resolve_Mem are never observed, instead the
exceptions thrown from various LinkResolver methods are observed. We
could clear all pending exceptions in resolve_MemberName, but this
breaks tests that are very particular about which exception is thrown
when and where, thus I opted to add the clear_pending boolean to
allow clearing the exception conditionally instead, keeping behavior
identical for MemberName::resolveOrFail

Thanks!

/Claes
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic