RFR: 8330846: Add stacks of mounted virtual threads to the HotSpot thread dump [v7]

Thomas Stuefe stuefe at openjdk.org
Wed Jun 5 16:00:58 UTC 2024


On Tue, 4 Jun 2024 13:23:59 GMT, Inigo Mediavilla Saiz <duke at openjdk.org> wrote:

>> Note that We are in the process of adding better and saner auto-indentation to outputStream. See https://github.com/openjdk/jdk/pull/19461 . I don't think that PR is going to take long.
>> 
>> If you don't want to wait, please:
>> - As David wrote, use spaces, not tabs
>> - Today's pattern for using outputStream indentation is:
>>   - set up indentation, preferably with streamIndentor, not manually with inc/dec
>>   - then, before printing each line, call stream->indent()
>>  
>> This pattern would also help us to later identify and remove this manual indentation pattern if auto-indent becomes a thing.
>> 
>> But really, waiting for https://github.com/openjdk/jdk/pull/19461 would be preferable. Then, all you have to do is place a streamIndentor around stack printing. Sub-function printing is then indented automatically.
>
> Thanks !
> 
> Your PR looks very promising @tstuefe, I would indeed prefer to wait for your changes as a way to add additional indentation to the stack of the virtual thread.
> 
> What do you think if I leave the current PR with the indentation that is already used for the stack of the carrier thread and I create a separate PR based on yours to add the additional indentation ?

Okay for me, if other reviewers are okay with it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19482#discussion_r1628042032


More information about the hotspot-runtime-dev mailing list