RFR: 8378194: Protect process_pending_interp_only() work with JvmtiThreadState_lock [v3]

Serguei Spitsyn sspitsyn at openjdk.org
Sat Feb 21 08:58:48 UTC 2026


On Sat, 21 Feb 2026 05:10:18 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

>> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review: missed volatile keyword in the var definition
>
> src/hotspot/share/prims/jvmtiThreadState.hpp line 216:
> 
>> 214:   bool is_pending_interp_only_mode() { return _pending_interp_only_mode; }
>> 215:   void set_pending_interp_only_mode(bool val) {
>> 216:     _seen_interp_only_mode = true;
> 
> _seen_interp_only_mode is read without and locking and should be atomic.

Thank you for suggestion. I was kind of two-folded on this thinking about a minor performance overhead. But I agree, it is more save to make it an atomic. Fixed now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29800#discussion_r2835996628


More information about the serviceability-dev mailing list