我如何知道为 Sun JVM 启用了哪些默认设置? [英] How do i know which default settings are enabled for Sun JVM?

查看:26
本文介绍了我如何知道为 Sun JVM 启用了哪些默认设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的 JVM 上尝试 CompressedOops.不,我想知道它是否可以默认启用.我在 debian/squeeze 上运行这个 jvm:

i want to try CompressedOops on my JVM. No I wonder if it might be enabled by default. I run this jvm on debian/squeeze:

$ java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

有人说默认开启,有人说没有:

Some people say it is enabled by default, some say it is not:

来自:http://forums.yourkit.com/viewtopic.php?f=3&t=3185

是的,你是对的,我也查过了并且 Compressed Oops 未激活默认情况下,在 Java6u21 64 位中,我这样做不明白为什么在里面这么说我提供的链接.

Yes, you are right, I also checked it and Compressed Oops is not activated by default in Java6u21 64-bit, I do not understand why it said so in the links I provided.

我尝试使用 jconsole/JMX 检查它,但没有找到名为 CompressedOops 或类似名称的属性.

I tried to check it with jconsole/JMX but had no luck to find an attribute named CompressedOops or alike.

有人知道我在哪里可以得到一个包含默认值的特定构建的所有 jvm 选项的列表吗?

Does anybody know where i get a list of all jvm options for a specific build with their default values?

问候詹宁

推荐答案

你可以使用-XX:+PrintFlagsFinal 来打印JVM启动时所有flags的值.

You can run with -XX:+PrintFlagsFinal to print the values of all flags at startup of the JVM.

或者,您可以使用 jinfo 工具检查正在运行的 JVM 中的标志值:

Alternatively, you can use the jinfo tool to check the value of a flag in a running JVM:

> jinfo -flag UseCompressedOops 7364
-XX:+UseCompressedOops

使用jps查找进程的pid.

Use jps to find the pid of the process.

这篇关于我如何知道为 Sun JVM 启用了哪些默认设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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