RFR: 8329674: JvmtiEnvThreadState::reset_current_location function should use JvmtiHandshake [v2]

Serguei Spitsyn sspitsyn at openjdk.org
Thu Apr 11 22:27:42 UTC 2024


On Thu, 11 Apr 2024 16:25:30 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review: refactored to get rid of overloaded doit functions
>
> src/hotspot/share/prims/jvmtiEnvThreadState.cpp line 309:
> 
>> 307:     }
>> 308:     ResourceMark rm;
>> 309:     javaVFrame *jvf = JvmtiEnvBase::get_vthread_jvf(target_h());
> 
> This method already handles both mounted and unmounted case, so do we need the first conditional above?

Good suggestion, thanks.
I was also thinking about it but decided to avoid the risk because of this check in `do_thread()`:

    if (!jt->is_exiting() && jt->has_last_Java_frame()) {

It can be it is not important to check or I can add an assert for this condition. Let me try and test it first.
This kind of simplification looks as important.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18630#discussion_r1561816846


More information about the hotspot-dev mailing list