RFR: 8272586: emit abstract machine code in hs-err logs
    Doug Simon 
    dnsimon at openjdk.java.net
       
    Wed Oct  6 16:30:14 UTC 2021
    
    
  
On Wed, 6 Oct 2021 15:41:27 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> This enhances hs-err logs to:
>> * Show the [abstract machine code](https://bugs.openjdk.java.net/browse/JDK-8213084) of the crashing frame if a disassembler is not installed.
>> * Show machine code for the top frames on the native stack.
>> 
>> An interpreter or stub frame is only shown if it is the crashing frame.
>> 
>> A sample of the enhanced hs-err log can be seen [here](https://bugs.openjdk.java.net/secure/attachment/96664/hs_err_pid7179.log).
>
> src/hotspot/share/utilities/vmError.cpp line 247:
> 
>> 245:  * Determines if the code unit denoted by `owner` should be printed.
>> 246:  * If this method returns true, then `owner` has been added to `printed`.
>> 247:  * If `owner` was already in `printed`, this methods returns false.
> 
> Is it because of recursive calls?
Yes - no point in printing the same code more than once.
> src/hotspot/share/utilities/vmError.cpp line 324:
> 
>> 322:   // non-walkable C frame. Use frame.sender() for java frames.
>> 323:   frame invalid;
>> 324:   if (t && t->is_Java_thread()) {
> 
> use `(t != nullptr)` explicitly
Will do.
BTW, I've never seen `nullptr` before - where is it defined?
-------------
PR: https://git.openjdk.java.net/jdk/pull/5446
    
    
More information about the hotspot-dev
mailing list