RFR: 8368159: Significant performance overhead when started with jdwp agent and unattached debugger [v2]
Chris Plummer
cjplummer at openjdk.org
Wed Sep 24 22:09:31 UTC 2025
On Wed, 24 Sep 2025 21:38:58 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:
>>> The interp_only check is needed for optimization to avoid a performance overhead of current stack depth invalidation.
>>
>> But if we are not in interp_only mode isn't it already invalidated?
>
>> But if we are not in interp_only mode isn't it already invalidated?
>
> It does not need to be invalidated if not in `interp_only` mode as it should not be used there or has to be explicitly invalidated exactly where it is needed. The issue I see is only with the test `test/hotspot/jtreg/serviceability/jvmti/vthread/ContStackDepthTest` which is for plain Continuations. Otherwise, the `invalidate_jvmti_stack()` would not be needed. It plays as a workaround to make this test to pass. It seems there is a bug related to plain Continuations lurking somewhere.
My point is we could just unconditionally invalidate. It would do no harm. It would not be invalidating a curr stack depth that could later be used.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27403#discussion_r2377189171
More information about the serviceability-dev
mailing list