On Fri, 13 Mar 2026 21:55:39 GMT, Serguei Spitsyn <[email protected]> wrote:
>> Updated serviceability/jvmti/HeapMonitor/MyPackage/ tests to handle
>> IdentityException to unblock work on throwing IdentityException from
>> NewWeakGlobalRef.
>> It's not yet decided how would be better to update SampledObjectAlloc
>
> test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.cpp
> line 556:
>
>> 554: jni->FatalError("Error in event_storage_add: Exception in jni
>> NewWeakGlobalRef");
>> 555: }
>> 556:
>
> I'm thinking if this can be simplified by checking if the object is value
> object or not before creation of a week global ref. What was a motivation to
> do the way above?
I agree. If it is a value object, then just skip it and return.
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2230#discussion_r2934071964