This issue is pretty much observable with millions of virtual threads and 4X-6X slowdown.
The tested app normally (without debug agent) takes around 3+ seconds.
With debug agent enabled it takes 14 seconds and more.
The performance overhead is caused by the jvmti_yield_cleanup() recursively calling JvmtiExport::continuation_yield_cleanup(). The reason of this overhead is because the function JvmtiExport::can_post_frame_pop() is used to identify a need for the JVMTI cleanup which is not that precise and triggers unneeded work when debugger has not been attached yet.
The tested app normally (without debug agent) takes around 3+ seconds.
With debug agent enabled it takes 14 seconds and more.
The performance overhead is caused by the jvmti_yield_cleanup() recursively calling JvmtiExport::continuation_yield_cleanup(). The reason of this overhead is because the function JvmtiExport::can_post_frame_pop() is used to identify a need for the JVMTI cleanup which is not that precise and triggers unneeded work when debugger has not been attached yet.
- links to
-
Review(master) openjdk/jdk/27403