RFR: 8267118: OutOfMemoryError cannot be caught as a Throwable [v2]

David Holmes david.holmes at oracle.com
Tue Jun 1 01:25:48 UTC 2021


Hi Ioi,

Thanks for looking at this.

On 1/06/2021 11:10 am, Ioi Lam wrote:
> On Mon, 31 May 2021 22:32:08 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> 
>>> David Holmes has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
>>>
>>>   - Merge branch 'master' into 8267118-oome
>>>   - 8267118: OutOfMemoryError cannot be caught as a Throwable
>>
>> src/hotspot/share/oops/method.cpp line 232:
>>
>>> 230:   if (do_logging) {
>>> 231:     ResourceMark rm(THREAD);
>>> 232:     log_info(exceptions)("Looking for catch handler for exception of type \"%s\" in method \"%s\"",
>>
>> I think these should be log_debug, since this is useful for debugging but many people outside of hotspot engineers use -Xlog:exceptions.
> 
> If the exception is not immediately caught, will this print a line for every method on the call stack that has a catch block? If so, that may be too verbose.

Yes it will. Okay I see your point.

The main reason people turn on exception logging is because an exception 
has been swallowed somewhere and they need to find where. So I'd want to 
show where the exception is caught at Info level to match the throw at 
Info level. The rest can be debug but now I'll have to put more 
information in the Info message.

Thanks,
David

> -------------
> 
> PR: https://git.openjdk.java.net/jdk/pull/4266
> 


More information about the hotspot-runtime-dev mailing list