The following document will help identify the failing class or method due to a HotSpot compiler failure on Solaris and HP-UX.
Stack overflow, looping, crash, incorrect output, High CPU
A HotSpot failure can occur during compilation or when the compiled code is run.
Resolving The Problem
The HotSpot compiler is designed to compile methods that are accessed frequently. This helps speed up Java™ Virtual Machine (JVM) operations and is a vital part of the JVM.
Table Of Contents
Frequently asked questions (FAQs)
|Identifying the failing method|
- Enable PrintCompilation by adding -XX:+PrintCompilation to the Generic JVM arguments. Restart the JVM for the change to take effect.
- For releases of WebSphere Application Server V7.0, V8.0, v8.5.X, V9.0:
In the Administrative Console, Select Servers > expand Server Types > WebSphere application servers > server_name> expand Java and Process Management, select Process Definition > Java Virtual Machine > Generic JVM arguments.
- PrintCompilation writes the classes and methods that are being HotSpot compiled to the native_stdout.log . The last compiled method prior to the failure is the one you need to skip.
Example of PrintCompilation output in the native_stdout.log:
|com.ibm.sslite.e::a (691 bytes)|
com.ibm.sslite.h::c (428 bytes)
An unexpected exception has been detected in native code outside the
. Unexpected Signal : 11 occurred at PC=0xff330924
|Exclude the method|
To skip the compiling of specific method calls:
- 1. Create a new file named .hotspot_compiler in the profile's root directory
By default this is in the directory <WAS_HOME>/profiles/<PROFILE_NAME>/
* The file .hotspot_compiler can be renamed to any valid filename.
* If you cannot place this file in the profile's root, specify a different location that is readable by the user id who owns the JVM processes.
2. Specify this JVM argument, replacing <FILE_PATH> with the complete path plus filename of the .hotspot_compiler file.
3. Edit the file and add one line for each method to exclude compilation. The syntax is listed below:
exclude full/class/name method
Note: Only use slashes to separate parts of the package name.
exclude java/lang/String toString
### Excluding compile: java/lang/String::toString
|Frequently asked questions (FAQs)|
- Is there an argument that can be used in lieu of creating a .hotspot_compiler file?
Yes there is. You can add the same exclusions as in the file to this JVM argument. You can substitute spaces with commas:
- Does the IBM SDK utilize the HotSpot compiler?
No. The IBM SDK, which is available bundled with WebSphere Application Server on AIX, Linux, and Microsoft Windows uses a similar compiler called Just-In-Time compiling (JIT).
Add additional JVM arguments for each method exclusion.
- Adjusting the Compiling Threshold
Using the JVM argument -XX:CompileThreshold=<value> can adjust how frequently the HotSpot compiler will execute on individual methods. Set the value to the number of method calls made until compiling takes place.
The defaults are 10000 for server mode and 1500 for client mode
15 June 2018