On Tue, 23 Sep 2025 23:25:19 GMT, Serguei Spitsyn <[email protected]> wrote:

>>> It seems odd to me that a method called invalidate_jvmti_stack() sometimes 
>>> doesn't invalidate the stack. Even before this change it was not 
>>> invalidating unless it was in interp_only mode, which also seems odd. If 
>>> the cached value is not used for compiled frames, why bother with the 
>>> interp_only check?
>> 
>> I can rename this function to `cond_ invalidate_jvmti_stack()` if you want. 
>> The `interp_only` check is needed for optimization to avoid a performance 
>> overhead of current stack depth invalidation.
>
> I was thinking a lot on how to get rid of this current stack depth 
> recalculation mechanism used in `interp_only` mode but have not come with a 
> good approach yet. We have a constant trouble from this mechanism needed for 
> debugger optimization purposes.

> 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?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27403#discussion_r2374345062

Reply via email to