4

I have the latest (13.0.1) OpenJDK on my Mac, but it does not seem to include Shenandoah. Am I crazy? I know it shipped. It works on my Linux machine. Is there a different download? Different flags?

~ $ java -XX:+UnlockExperimentalVMOptions -XX:+PrintCommandLineFlags -version                                                                                                         
 -XX:G1ConcRefinementThreads=4 -XX:GCDrainStackTargetSize=64 -XX:InitialHeapSize=134217728  
 -XX:MaxHeapSize=2147483648 -XX:MinHeapSize=6815736 -XX:+PrintCommandLineFlags 
 -XX:ReservedCodeCacheSize=251658240 -XX:+SegmentedCodeCache -XX:+UnlockExperimentalVMOptions 
 -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseG1GC
openjdk version "13.0.1" 2019-10-15
OpenJDK Runtime Environment (build 13.0.1+9)
OpenJDK 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
~ $ java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:+PrintCommandLineFlags -version                                                                                              
Error occurred during initialization of VM
Option -XX:+UseShenandoahGC not supported
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
sbzoom
  • 3,273
  • 4
  • 29
  • 34

2 Answers2

4

I think this Red Hat blog post is probably related, especially considering that Shenandoah works on your Linux machine and not macOS.

TL;DR: Red Hat led Shenandoah's development, so Oracle is hesitant to put it in OpenJDK. Not all builds support it as a result.

cbryant02
  • 583
  • 4
  • 16
  • 4
    I have read literally every blog post and news update about this - they ALL refer to 12 and not 13. It was an experimental feature in 12 so you had to jump through some hoops. But it "landed" in 13 so it should be there. But Oracle I guess decided it was still "experimental" even though there is ZERO documentation about it. I removed all my JDKs and installed AdoptOpenJDK (Made by RedHat https://adoptopenjdk.net/) and it worked. Sad! – sbzoom Dec 24 '19 at 00:36
  • Definitely irritating how Oracle handles new features. Glad you found a solution. – cbryant02 Dec 24 '19 at 00:49
  • 2
    The distinction between 12 and 13 does not really matter here. Shenandoah landed into mainline OpenJDK in 12; 13 is the evolution of what is shipped in 12. The build system enables all supported GCs by default, so every builder that does not disable Shenandoah specifically would get the binary with it included. So far only Oracle (OpenJDK) builds disable it. Today downloading any (except Oracle) vendor's binary would give you Shenandoah in >=12 {x86_64, x86_32, aarch64}. – Aleksey Shipilev Dec 28 '19 at 07:51
1

You have to build it for yourself if you want to use Shenandoah on MacOS, that's what most of the people are doing.

Adding this answer since I see a lot of people looking for Shenandoah on MacOS

Nitin Dandriyal
  • 1,559
  • 11
  • 20