Book Image

OpenJDK Cookbook

Book Image

OpenJDK Cookbook

Overview of this book

Table of Contents (20 chapters)
OpenJDK Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using HotSpot dev parameters


HotSpot has other options, which may significantly change its behavior. Here we will make use of some of these options, which are used only on the dev versions of OpenJDK.

Getting ready

We will need to compile a dev OpenJDK version, in order to use the dev options.

How to do it...

We will use parameters that are available in the developer version of OpenJDK. In the production builds, they are disabled or set as constant values.

To make use of these parameters, we will run Java as follows:

java - -XX:<optionName>

Here is a list of some usable dev options:

  • InlineUnsafeOps: This option will, if enabled, inline native memory operations from sun.misc.Unsafe. It may offer some performance improvements in some cases.

  • DieOnSafepointTimeout: This option will kill the process if the safepoint is not reached, but the timeout is exceeded. It is disabled by default.

  • ZapResourceArea: This option will zap freed resource / arena space with 0xABABABAB. It is true in debug mode...