RFR: JDK-8136577: Make AbortVMOnException available in product builds

Poonam Bajaj Parhar poonam.bajaj at oracle.com
Tue Oct 13 21:06:55 UTC 2015


Hello Coleen,

On 10/12/2015 10:55 AM, Coleen Phillimore wrote:
>
> Hi Poonam,
> I really like this except for this in exceptions.cpp.  This function 
> should be in exceptions.hpp (because it won't be inlined in cpp).  I 
> think there are some hot paths performance wise through the exception 
> code so would be nice to inline this small function in the header file.
>
> -void Exceptions::debug_check_abort(Handle exception, const char* 
> message) {
> +inline void Exceptions::debug_check_abort(Handle exception, const 
> char* message) {
>    if (AbortVMOnException != NULL) {
> +    debug_check_abort_helper(exception, message);
> +  }
> +}
> +

Moving it to exceptions.hpp file causes build failure:

/Building target 'images' in configuration 
'solaris-sparcv9-normal-server-release'//
//"<..>/hotspot/src/share/vm/utilities/exceptions.hpp", line 180: Error: 
The type "Handle" is incomplete.//
//1 Error(s) detected./

So, looks like we can not make Exceptions::debug_check_abort() as inline 
function without disturbing the include structure.

Here's the updated version of the webrev, it removes the inline keyword 
from the function definition in cpp file.
http://cr.openjdk.java.net/~poonam/8136577/webrev.02/

Thanks,
Poonam

>
> Thanks,
> Coleen
>
> On 10/12/15 10:03 AM, Poonam Bajaj Parhar wrote:
>> Hello Coleen,
>>
>> Please take a look at the updated webrev:
>> http://cr.openjdk.java.net/~poonam/8136577/webrev.01/
>>
>> Thanks,
>> Poonam
>>
>> On 10/9/2015 8:15 AM, Poonam Bajaj Parhar wrote:
>>> Hello Coleen,
>>>
>>> On 10/8/2015 11:04 AM, Coleen Phillimore wrote:
>>>>
>>>> http://cr.openjdk.java.net/~poonam/8136577/webrev.00/src/share/vm/utilities/exceptions.hpp.udiff.html 
>>>>
>>>>
>>>> I was wondering if you could make the function debug_check_abort an 
>>>> inline function in exceptions.hpp that checks AbortVMOnException != 
>>>> NULL and calls a helper to save this conditional in all the callers?
>>>>
>>>> static void debug_check_abort(Handle exception, const char* message 
>>>> = NULL) {
>>>>   if (AbortVMException != NULL)
>>>>     debug_check_abort_helper(exception, message);
>>>>   }
>>>> }
>>> Sure, I will make this change and will send the updated webrev.
>>>
>>> Thanks,
>>> Poonam
>>>
>>>>
>>>> Thanks,
>>>> Coleen
>>>>
>>>> On 10/6/15 9:57 AM, Poonam Bajaj Parhar wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> Please review the code changes for the following change request:
>>>>>
>>>>> Bug: JDK-8136577: Make AbortVMOnException available in product builds
>>>>>
>>>>> Fix: These changes make the JVM options AbortVMOnException and 
>>>>> AbortVMOnExceptionMessage available in product builds by changing 
>>>>> them from 'debug' to 'diagnostic' options. Having these in product 
>>>>> builds would be very useful to capture diagnostic data when an 
>>>>> application fails with exceptions. This would be very useful in 
>>>>> troubleshooting issues where only an exception is thrown.
>>>>>
>>>>> Webrev: http://cr.openjdk.java.net/~poonam/8136577/webrev.00/
>>>>>
>>>>> Tests: Ran a simple testcase that throws exception and confirmed 
>>>>> that it generates hs_err and core file when the specified 
>>>>> exception occurs.
>>>>>
>>>>> regards,
>>>>> Poonam
>>>>>
>>>>
>>>
>>
>



More information about the hotspot-runtime-dev mailing list