RFR (M) JDK-8210012: Implement Unified Logging Option for -XX:+TraceMethodHandles and -XX:+TraceInvokeDynamic

David Holmes david.holmes at oracle.com
Fri Apr 10 03:12:09 UTC 2020


Hi Lois,

On 10/04/2020 4:42 am, Lois Foltan wrote:
> Please review the following change to implement unified logging options 
> for -XX:+TraceMethodHandles and -XX:+TraceInvokeDynamic. The new options 
> map as follows:
> 
> -XX:+TraceMethodHandles --> -Xlog:methodhandles=info
> -XX:+TraceInvokeDynamic -->  -Xlog:methodhandles+indy=debug
> 
> and in addition dynamic constants can now be viewed under their own 
> option via -Xlog:methodhandles+condy=debug
> 
> open webrev at: 
> http://cr.openjdk.java.net/~lfoltan/bug_jdk8210012.0/webrev/
> bug link: https://bugs.openjdk.java.net/browse/JDK-8210012

Generally looks good. A couple of things.

First the change in compileTask.cpp seems wrong: you should get the 
timestamp from the specified stream not the tty.

Second the changes to wrap_dynamic_exception seem rather awkward, both 
in terms of having to remember what the initial boolean arg represents 
at the call site, and more so in the logic to determine which log stream 
to use. I was wondering if it might be better to add 
wrap_dynamic_exception_for_indy to keep the call sites clean? Otherwise 
perhaps document like "true /* indy */" and "false /* not indy */.

For the log stream logic I was assuming there must be a better/simpler 
way, but after looking at it in some detail it seems not. :(

Thanks,
David

> Testing: hs-tier1-5
> 
> Thanks,
> Lois


More information about the hotspot-dev mailing list