RFR: 8265795: vmTestbase/nsk/jvmti/AttachOnDemand/attach022/TestDescription.java fails when running with JEP 416

David Holmes dholmes at openjdk.java.net
Mon Nov 22 01:46:09 UTC 2021


On Fri, 19 Nov 2021 15:32:24 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

> The VMObjectAlloc jvmti event was not generated for objects created using MethodHanldle. The fix adds posting of the event into Unsafe_AllocateInstance.
> 
> While fixing this bug I noticed that event is not posted in the intrinsics version for many functions where it is used. Including  but not limited to clone(), invoke()m allocateInstance() and allocateUninitializedArray(). There are might be other intensified functions (not analogs JVM_ENTRY versions) that allocate objects without post events. 
> 
> I think it is needed to implement some common way to handle this and cover it in another issue.

Hi Leonid,

Functional fix looks good. A couple of minor nits below.

I agree that fixing intrinsics should be a separate issue - I have to worry that the overhead of posting events can dwarf the operation itself. I would guess the intrinsic would need a short-cut to check if the event is enabled and if so drop back to non-intrinsic version.

Thanks,
David

test/hotspot/jtreg/serviceability/jvmti/VMObjectAlloc/VMObjectAllocTest.java line 49:

> 47:         mh.invoke("str");
> 48: 
> 49:         if(getNumberOfAllocation() != 1) {

space after 'if' please

test/hotspot/jtreg/serviceability/jvmti/VMObjectAlloc/libVMObjectAlloc.cpp line 91:

> 89: }
> 90: 
> 91: }

This looks spurious ??

-------------

Marked as reviewed by dholmes (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/6478


More information about the serviceability-dev mailing list