On Wed, 16 Jun 2021 03:33:14 GMT, Denghui Dong <dd...@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.

Sorry but I do not agree with this change. I understand your rationale but you 
have overlooked that by combining these three safepoint operations you have 
created a much longer safepoint pause which may lock out other more important 
safepoint operations, and you may also be holding the HeapLock across this 
extended safepoint.

The operations that you have coalesced are not considered time critical but can 
themselves be very time consuming e.g deadlock detection.

David

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

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

Reply via email to