On Fri, 24 Apr 2026 21:19:24 GMT, Chris Plummer <[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/jvmti.xml line 5893: > >> 5891: If the frame's method is a value object constructor and >> 5892: the requested local is the "<code>this</code>" object >> then the >> 5893: value_ptr is set to a snapshot of the >> "<code>this</code>" object. > > Suggestion: > > If the frame's method is a value object constructor and > the requested local is the "<code>this</code>" object, the > value_ptr is set to a snapshot of the "<code>this</code>" > object. Thanks, taken. > src/hotspot/share/prims/jvmti.xml line 5948: > >> 5946: On return, points to the variable's value. >> 5947: If the frame's method is a value object constructor then >> the >> 5948: value_ptr is set to a snapshot of the >> "<code>this</code>" object. > > Suggestion: > > If the frame's method is a value object constructor, the > value_ptr is set to a snapshot of the "<code>this</code>" > object. Thanks, taken. > test/hotspot/jtreg/serviceability/jvmti/valhalla/GetCtorLocal/ValueGetCtorLocal.java > line 71: > >> 69: } >> 70: >> 71: private static native boolean nTestCtorThis(Thread thread); > > What does the "n" in "nTestCtorThis" mean? Thank you for catching this. I think it means native. I'll get rid of this prefix. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2363#discussion_r3150292961 PR Review Comment: https://git.openjdk.org/valhalla/pull/2363#discussion_r3150293368 PR Review Comment: https://git.openjdk.org/valhalla/pull/2363#discussion_r3150290065
