On Fri, 24 Apr 2026 17:08:25 GMT, Serguei Spitsyn <[email protected]> wrote:
>> src/hotspot/share/prims/jvmtiImpl.cpp line 641:
>>
>>> 639: if (Arguments::is_valhalla_enabled()) {
>>> 640: bool is_ctor = _jvf->method()->is_object_constructor();
>>> 641: if (is_ctor && _index == 0 && obj != nullptr &&
>>> obj->is_inline()) {
>>
>> I thought local slots can be recycled, so checking for local 0 is not
>> reliable. I would think it is necessary to check the LocalVariableTable to
>> find the bci range for the "this" variable.
>
> Thank you for the comment. The `LocalVariableTable` is not always available.
> The implementation has many checks in place. Please, see
> `check_slot_type_lvt()` and `check_slot_type_no_lvt()`.
OK. I also noticed that the implementation of GetLocalInstance also uses local
0.
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2363#discussion_r3140405403