5

The reason that I need the HotSpot VM be in debug mode, is that I want some JVM options, like

-XX:+PrintCFGFile
, be supported.

My current JVM version is like

java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.1) (suse-3.1-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

Do I have to install some tool/patch to achieve that?

Thanks!

JackWM
  • 10,085
  • 22
  • 65
  • 92

2 Answers2

4

After searching a while, the problem looks more clear now.

The reason that I can't use the option

-XX:PrintCFGToFile
is because the JVM I used is the product version, not debug version.

I found such a website which provides the debug version of JVM. Below is the link: http://download.java.net/jdk6/6u25/promoted/b03/index.html

I have tested the version

jdk-6u25-ea-bin-b03-windows-i586-debug-27_feb_2011.jar
It works well, the option I mentioned above can be used, and an output.cfg file would be produced after execution of a Java program.

After installation, there would be such a series of folders \jdk1.6.0_25\fastdebug>. And I get the following version info:

java version "1.6.0_25-ea-fastdebug"
Java(TM) SE Runtime Environment (build 1.6.0_25-ea-fastdebug-b03)
Java HotSpot(TM) Client VM (build 20.0-b10-fastdebug, mixed mode)
JackWM
  • 10,085
  • 22
  • 65
  • 92
-3

From the jdb manual:

"A VM that is to be debugged with jdb must be started with the following options: -agentlib:jdwp=transport=dt_shmem,server=y,suspend=n"

This loads in-process debugging libraries and specifies the kind of connection to be made."

Suraj Chandran
  • 24,433
  • 12
  • 63
  • 94
Jochen
  • 2,277
  • 15
  • 22
  • 1
    Why would you even answer this question? He is asking about printing out C1 compile graphs, which requires a fast debug build of HotSpot. You have cut and pasted something about attaching debuggers to JVMs. – Marcus Feb 12 '18 at 14:30