RFR: 8330852: All callers of JvmtiEnvBase::get_threadOop_and_JavaThread should pass current thread explicitly

Serguei Spitsyn sspitsyn at openjdk.org
Tue Apr 30 02:08:04 UTC 2024


On Sat, 27 Apr 2024 00:01:16 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

>> src/hotspot/share/prims/jvmtiEnvBase.cpp line 1976:
>> 
>>> 1974:   oop thread_obj = nullptr;
>>> 1975: 
>>> 1976:   jvmtiError err = JvmtiEnvBase::get_threadOop_and_JavaThread(tlh.list(), target, current, &java_thread, &thread_obj);
>> 
>> I think a good cleanup would be to also replace `current` with `current_thread`, although I'm not sure how common each are. I see 3 `current` references in this webrev.
>
> Looks like in JVMTI `current_thread` is more common (and `current` is usually used in runtime :)

The plan is to unify this with the approach used by the Runtime team.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18986#discussion_r1584032225


More information about the serviceability-dev mailing list