Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i know which default settings are enabled for Sun 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:

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

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.

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

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

regards Janning

like image 493
Janning Avatar asked Mar 08 '11 10:03

Janning


People also ask

Where are JVM options set?

To update JVM options manually for an MSI installation: jvmoptions file. For an MSI distribution the file is located in the %programdata%\JetBrains\YouTrack\conf directory. Edit the JVM options directly in the file.

How do I find JVM options?

The list-jvm-options subcommand displays a list of command-line options that are passed to the Java application launcher when GlassFish Server is started. The options are managed by using the JVM Options page of the Administration Console or by using the create-jvm-options and delete-jvm-options subcommands.


1 Answers

You can run with -XX:+PrintFlagsFinal to print the values of all flags at startup of the 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 

Use jps to find the pid of the process.

like image 164
staffan Avatar answered Oct 19 '22 13:10

staffan