RFR: 8268857: Merge three vm operations in thread_dump [v2]

David Holmes dholmes at openjdk.java.net
Thu Jun 17 06:11:07 UTC 2021


On Thu, 17 Jun 2021 05:15:36 GMT, Denghui Dong <ddong at openjdk.org> wrote:

>> Hi,
>> 
>> Could I have a review of this change that merges three vm operations(VM_PrintThreads, VM_PrintJNI, VM_FindDeadlocks) in thread_dump and signal_thread_entry.
>> 
>> `jstack` is a very common command, even in the production environment.
>> 
>> In addition to reduce the cost of entering safepoint, I think this patch also could ensure the consistency of the results of VM_PrintThreads and VM_FindDeadlocks.
>
> Denghui Dong has updated the pull request incrementally with three additional commits since the last revision:
> 
>  - update
>  - remove useless comment
>  - remove VM_PrintJNI

So the PR is open again but I see no substantive changes that address my concerns. I don't see how there can be any fix here when the desired goal is one safepoint and the problem is that one safepoint may be far too long. And I don't see any way to force a timeout in a VM operation, or anything it calls.

I realize there can be a discrepancy between the sets of threads involved, but I think that is just the trade-off we have to make for this diagnostic tool.

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

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


More information about the serviceability-dev mailing list