> This update removes a significant performance overhead when an application 
> running millions of virtual threads is started with the JDWP agent but 
> debugger has not been attached. The overhead is 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 precise and triggers unneeded work 
> when debugger has not been attached yet. The fix is to trigger  the JVMTI 
> cleanup with new function: `bool JvmtiExport::has_frame_pops(JavaThread* 
> thread)`.
> 
> Testing:
> - Insure the 4X-6X slowdown is gone for application an application running 
> millions of virtual threads and started with the JDWP agent
> - Mach5 tiers 1-6 are all passed

Serguei Spitsyn has updated the pull request incrementally with one additional 
commit since the last revision:

  fix minimal build broken by incorrect macro usage

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/27403/files
  - new: https://git.openjdk.org/jdk/pull/27403/files/0f63bb17..4b0478fc

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=27403&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27403&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/27403.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27403/head:pull/27403

PR: https://git.openjdk.org/jdk/pull/27403

Reply via email to