OpenJDK与Java HotspotVM [英] OpenJDK vs Java HotspotVM

查看:911
本文介绍了OpenJDK与Java HotspotVM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OpenJDK VM和Oracle Hotspot VM仍然是两个不同的JVM吗?

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

我似乎找不到任何关于OpenJDK VM的官方文档。即使在OpenJDK主页上也有一个开发HotSpot VM的HotSpot Group。

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.


HotSpot小组由参与设计,实施的开发人员组成,和维护HotSpot虚拟机

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

但是如果我在我的Windows机器上检查java -version它会打印出来

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


Java HotSpot(TM)64位服务器虚拟机

Java HotSpot(TM) 64-Bit Server VM

但是在我的Ubuntu VPS上

But on my Ubuntu VPS


OpenJDK 64位服务器虚拟机

OpenJDK 64-Bit Server VM

如果这两个是不同的VM,它们之间的主要区别是什么?它们是否有不同的运行时标志集?

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

推荐答案

Oracle HotSpot JVM基于OpenJDK HotSpot项目。因此,它们大多是相同的VM,除了Oracle JVM还有一些额外的商业功能,主要是, Java Flight Recorder 应用程序类数据共享和协作内存管理。

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

从JDK 8u131开始,唯一的区别在于以下标志(OpenJDK VM中没有):

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}

这篇关于OpenJDK与Java HotspotVM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆