RFR: 8272116: Update PerfDisableSharedMem with FLAG_SET_ERGO in PerfMemory::create_memory_region

Hui Shi hshi at openjdk.java.net
Thu Aug 12 02:58:25 UTC 2021


On Sat, 7 Aug 2021 12:22:22 GMT, Hui Shi <hshi at openjdk.org> wrote:

> PerfDisableSharedMem is set true directly in PerfMemory::create_memory_region, it's better update PerfDisableSharedMem flag with FLAG_SET_ERGO, so jcmd can check vm.flags and tells if create_shared_memory failed at startup time.
> 
> Changing /tmp/hsperdata_user has no read/write permission and test.
> 
> **before this patch  -XX:+PerfDisableSharedMem doesn't show in VM.flags**
> jcmd 3419690 VM.flags
> 3419690:
> -XX:CICompilerCount=4 -XX:ConcGCThreads=2 -XX:G1ConcRefinementThreads=8 -XX:G1EagerReclaimRemSetThreshold=16 -XX:G1HeapRegionSize=2097152 -XX:G1RemSetArrayOfCardsEntries=16 -XX:G1RemSetHowlMaxNumBuckets=8 -XX:G1RemSetHowlNumBuckets=8 -XX:GCDrainStackTargetSize=64 -XX:InitialHeapSize=268435456 -XX:MarkStackSize=4194304 -XX:MaxHeapSize=4294967296 -XX:MaxNewSize=2575302656 -XX:MinHeapDeltaBytes=2097152 -XX:MinHeapSize=8388608 -XX:NonNMethodCodeHeapSize=5839372 -XX:NonProfiledCodeHeapSize=122909434 -XX:ProfiledCodeHeapSize=122909434 -XX:ReservedCodeCacheSize=251658240 -XX:+SegmentedCodeCache -XX:SoftMaxHeapSize=4294967296 -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC 
> 
> **after this patch: -XX:+PerfDisableSharedMem shows in VM.flags**
> jcmd 3415029 VM.flags
> 3415029:
> -XX:CICompilerCount=4 -XX:ConcGCThreads=2 -XX:G1ConcRefinementThreads=8 -XX:G1EagerReclaimRemSetThreshold=16 -XX:G1HeapRegionSize=2097152 -XX:G1RemSetArrayOfCardsEntries=16 -XX:G1RemSetHowlMaxNumBuckets=8 -XX:G1RemSetHowlNumBuckets=8 -XX:GCDrainStackTargetSize=64 -XX:InitialHeapSize=268435456 -XX:MarkStackSize=4194304 -XX:MaxHeapSize=4294967296 -XX:MaxNewSize=2575302656 -XX:MinHeapDeltaBytes=2097152 -XX:MinHeapSize=8388608 -XX:NonNMethodCodeHeapSize=5839372 -XX:NonProfiledCodeHeapSize=122909434 **-XX:+PerfDisableSharedMem** -XX:ProfiledCodeHeapSize=122909434 -XX:ReservedCodeCacheSize=251658240 -XX:+SegmentedCodeCache -XX:SoftMaxHeapSize=4294967296 -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC

Thanks!
This PR is trivial, will push it tomorrow if no more comments.

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

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


More information about the hotspot-runtime-dev mailing list