RFR: 8307462: [REDO] VmObjectAlloc is not generated by intrinsics methods which allocate objects [v4]
    Leonid Mesnik 
    lmesnik at openjdk.org
       
    Wed Aug  9 06:17:54 UTC 2023
    
    
  
> 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.
Leonid Mesnik has updated the pull request incrementally with one additional commit since the last revision:
  added braces
-------------
Changes:
  - all: https://git.openjdk.org/jdk/pull/15110/files
  - new: https://git.openjdk.org/jdk/pull/15110/files/64871b91..4f52aa79
Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=15110&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15110&range=02-03
  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/15110.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15110/head:pull/15110
PR: https://git.openjdk.org/jdk/pull/15110
    
    
More information about the hotspot-dev
mailing list