On Thu, 9 Jul 2026 03:59:24 GMT, Serguei Spitsyn <[email protected]> wrote:
>> This update is for `repo-valhalla` pre-integration. It adds a special intro >> section to the `jvmti.xml` with a general clarification related to value >> objects. Also, it fixes a couple of small typos. >> >> Testing: N/A >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Serguei Spitsyn has updated the pull request incrementally with two > additional commits since the last revision: > > - review: one more minor tweak > - review: minor correction src/hotspot/share/prims/jvmti.xml line 929: > 927: > 928: <intro id="identityAndValueObjects" label="Identity and Value Objects"> > 929: When preview features are enabled, JVMTI may observe both identity > and value objects. JVMTI should be `<jvmti/> `. I see a couple of other misuses of `JVMTI` have also crept in through recent changes. src/hotspot/share/prims/jvmti.xml line 937: > 935: and > 936: <externallink > id="jni/functions.html#newweakglobalref"><code>NewWeakGlobalRef</code></externallink>, > 937: specify the JNI behavior for value objects. Any additional > JVMTI-specific behavior I don't think we need to say all this. It really isn't for the JVMTI spec to state where the JNI spec may treat objects with/without identity differently, and individual JVMTI methods that behave differently already state that you can use `HasIdentity` to query that. I would keep this very succinct as I did for the JNI spec itself: > If preview features are enabled then some Java objects will have identity and > others (instances of value classes) will not. The JNI makes no distinction > between these cases in the general programming model, but some specific > functions will behave differently if invoked upon a Java object that does not > have identity. So for JVMTI then something like: > If preview features are enabled then some Java objects will have identity and > others (instances of value classes) will not. `<jvmti/>` makes no distinction > between these cases in general, but some specific functions will behave > differently if invoked upon a Java object that does not have identity. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2634#discussion_r3548925485 PR Review Comment: https://git.openjdk.org/valhalla/pull/2634#discussion_r3548964808
