OpenJDK vs Java HotspotVM

arvist :

Are OpenJDK VM and Oracle Hotspot VM still two different JVMs?

I can't seem to find any somewhat official documentation on anything about OpenJDK VM. Even in OpenJDK homepage there is an HotSpot Group which develops HotSpot VM.

The HotSpot group is comprised of developers involved in the design, implementation, and maintanence of the HotSpot virtual machine

However if I check java -version on my Windows machine it prints out

Java HotSpot(TM) 64-Bit Server VM

But on my Ubuntu VPS

OpenJDK 64-Bit Server VM

If those are two different VMs what are the main differences between them? Do they have different runtime flag sets?

apangin :

Oracle HotSpot JVM is based on OpenJDK HotSpot project. So, they are mostly the same VM, except that Oracle JVM has a few additional commercial features, mainly, Java Flight Recorder, Application Class Data Sharing and Cooperative Memory Management.

Runtime flags are almost the same for both VMs; see the complete list using

-XX:+UnlockDiagnosticVMOptions -XX:+UnlockCommercialFeatures -XX:+PrintFlagsFinal

As of JDK 8u131, the only difference is in the following flags (absent in OpenJDK VM):

 bool EnableResourceManagementTLABCache         = true         {product}
 bool EnableSharedLookupCache                   = true         {product}
 bool FlightRecorder                            = false        {commercial}
ccstr FlightRecorderOptions                     =              {product}
 bool LogCommercialFeatures                     = false        {product}
ccstr MemoryRestriction                         = none         {commercial}
 bool ResourceManagement                        = false        {commercial}
 intx ResourceManagementSampleInterval          = -1           {commercial}
ccstr StartFlightRecording                      =              {commercial}
 bool TraceSharedLookupCache                    = false        {product}
 bool UnlockCommercialFeatures                 := true         {commercial}
 bool UseAppCDS                                 = false        {commercial}

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=429450&siteId=1