OpenJDK vs Java HotspotVM

前端 未结 2 1505
自闭症患者
自闭症患者 2020-12-25 13:42

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 OpenJD

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-25 14:15

    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}
    

提交回复
热议问题