RFR: 8258751: Improve ExceptionHandlerTable dump

Hao Sun github.com+16932759+shqking at openjdk.java.net
Tue Jan 5 01:44:58 UTC 2021


On Mon, 4 Jan 2021 09:35:59 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> In addition to PC offset, print the real PC as well if available when
>> dumping the ExceptionHandlerTable, as it's more convenient and readable
>> for debugging or other activities.
>> 
>> Note that compilers might dump the ExceptionHandlerTable before method
>> registered. See functions emit_code_body() and fill_buffer(). However,
>> real PC is not ready yet during these phases since the generated code is
>> not installed. In such scenarios, the real PC is not printed.
>> 
>> The example below shows how the dump information would be changed after
>> applying this patch.
>>   BEFORE:
>>     ExceptionHandlerTable (size = 40 bytes)
>>     catch_pco = 392 (2 entries)
>>       bci 8 at scope depth 0 -> pco 184
>>       bci 19 at scope depth 0 -> pco 124
>>   AFTER:
>>     ExceptionHandlerTable (size = 40 bytes)
>>     catch_pco = 392 (pc=0x0000ffff818f13c8, 2 entries)
>>       bci 8 at scope depth 0 -> pco 184 (pc=0x0000ffff818f12f8)
>>       bci 19 at scope depth 0 -> pco 124 (pc=0x0000ffff818f12bc)
>
> src/hotspot/share/code/exceptionHandlerTable.cpp line 2:
> 
>> 1: /*
>> 2:  * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
> 
> Should be 2021 now.

Thanks for your reminding. Will update it.

> src/hotspot/share/code/exceptionHandlerTable.hpp line 2:
> 
>> 1: /*
>> 2:  * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
> 
> Should be 2021 now.

Thanks for your reminding. Will update it.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1877


More information about the hotspot-compiler-dev mailing list