Integrated: 8307462: [REDO] VmObjectAlloc is not generated by intrinsics methods which allocate objects

Leonid Mesnik lmesnik at openjdk.org
Wed Aug 9 06:32:43 UTC 2023


On Tue, 1 Aug 2023 19:49:51 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

> The fix adds posting VmObjectAlloc events by Unsafe.allocateInstance(Class<?> cls). The previous attempt to post event directly from 'LibraryCallKit::inline_unsafe_allocate()' cause performance regression even if jvmti event is not enabled.  Some optimizations have been disabled just because possible usage and escaping of newly allocated  object.
> So event posting is doing by returning to interpreter if events are enabled.
> 
> I verified that that performance (run locally only) of
> org.renaissance.jdk.streams.JmhScrabble.runOperation
> doesn't change if events are not enabled.
> 
> There might be other intrinsics like 'LibraryCallKit::inline_unsafe_newArray()' where VM allocate memory. I'm going to file separate issue to find and fix them.
> 
> Many thanks to Tobias H. for proposed solution.
> 
> Testing with all tiers.

This pull request has now been integrated.

Changeset: 3fb4805b
Author:    Leonid Mesnik <lmesnik at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/3fb4805b1ad6d66924fd961f62126a91d188abab
Stats:     37 lines in 6 files changed: 33 ins; 4 del; 0 mod

8307462: [REDO] VmObjectAlloc is not generated by intrinsics methods which allocate objects

Reviewed-by: sspitsyn, thartmann

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

PR: https://git.openjdk.org/jdk/pull/15110


More information about the serviceability-dev mailing list