On Fri, 24 Apr 2026 03:30:17 GMT, Serguei Spitsyn <[email protected]> wrote:
> This enhancement is to a add JVMTI debugging support for value object > construction. > The fix includes: > - Minor `GetLocalObject` and `GetLocalInstance` spec clarifications > - JVMTI functions `GetLocalObject` and `GetLocalInstance` now return a > snapshot of the `THIS` object if it is requested during a value object > construction. > - This update adds new test with a needed test coverage: > `test/hotspot/jtreg/serviceability/jvmti/valhalla/GetCtorLocal`. > - Some corrections in the test > `test/hotspot/jtreg/serviceability/jvmti/valhalla/GetSetLocal` for > unification with the test above. > > Testing: > - Tested locally with new test `GetCtorLocal` > - Tested with mach5 tiers 1-6 > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). 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. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2363#discussion_r3135870166
