> 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 > > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Serguei Spitsyn has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 31 commits: - Merge - review: roll back unnneded minor refactoring - review: simplify deopt for virtual threads, get rid of pending deopts - Merge - review: 1. move set_frame_pop call; 2. decrease test execution time and its timeout - review: (1) remove unneeded assert, (2) simplify one statement in JvmtiEnvBase::set_frame_pop - update copyright year - review: (1) rename one method (2) remove unneeded changes - review: renamed test to StepOverStressTest.java - fix some merge error - ... and 21 more: https://git.openjdk.org/jdk/compare/9c3787d1...0956d877 ------------- Changes: https://git.openjdk.org/jdk/pull/28407/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28407&range=27 Stats: 440 lines in 26 files changed: 328 ins; 48 del; 64 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
