> This change fixes a long standing performance issue related to the debugger 
> single stepping that is using JVMTI `FramePop` events as a part of step over 
> handling. The performance issue is that the target thread continues its 
> execution in very slow `interp-only` mode in a context of frame marked for 
> `FramePop` notification with the JVMTI `NotifyFramePop`. It includes other 
> method calls recursively upon a return from the frame.
> 
> This fix is to avoid enforcing the `interp-only` execution mode for threads 
> when `FramePop` events are enabled with the JVMTI 
> `SetEventNotificationMode()`. Instead, the target frame has been deoptimized 
> and kept interpreted by disabling `OSR` optimization by the function 
> `InterpreterRuntime::frequency_counter_overflow_inner()`. (Big thanks to 
> @fisk for this suggestion!) Additionally, some tweaks are applied in several 
> places where the `java_thread->is_interp_only_mode()` is checked.
> The other details will be provided in the first PR request comment.
> 
> Testing:
>  - test `serviceability/jvmti/vthread/ThreadStateTest` was updated to provide 
> some extra test coverage
>  - submitted mach5 tiers 1-6

Serguei Spitsyn has updated the pull request with a new target base due to a 
merge or a rebase. The incremental webrev excludes the unrelated changes 
brought in by the merge/rebase. The pull request contains seven additional 
commits since the last revision:

 - Merge
 - review: optimize hide_single_stepping and post_method_exit
 - review: renamed two functions; FRAME_POP_BIT removed from INTERP_EVENT_BITS
 - review: fix iteration order in process_vthread_pending_deopts as it uses 
remove_at(idx)
 - review: fix typo in a EATests.java comment
 - cleanup: removed an old code fragment in frame.cpp
 - 6960970: Debugger very slow during stepping

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/28407/files
  - new: https://git.openjdk.org/jdk/pull/28407/files/bb4b11f9..abb1950c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=28407&range=06
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28407&range=05-06

  Stats: 64652 lines in 1068 files changed: 42639 ins; 15493 del; 6520 mod
  Patch: https://git.openjdk.org/jdk/pull/28407.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28407/head:pull/28407

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

Reply via email to