Book Image

Oracle JRockit: The Definitive Guide

Book Image

Oracle JRockit: The Definitive Guide

Overview of this book

Oracle JRockit is one of the industry’s highest performing Java Virtual Machines. Java developers are always on the lookout for better ways to analyze application behavior and gain performance. As we all know, this is not as easy as it looks. Welcome to JRockit: The Definitive Guide.This book helps you gain in-depth knowledge of Java from the JVM’s point of view. We will explain how to write code that works well with the JVM to gain performance and scalability. Starting with the inner workings of the JRockit JVM and finishing with a thorough walkthrough of the tools in the JRockit Mission Control suite, this book is for anyone who wants to know more about how the JVM executes your Java application and how to profile for better performance.
Table of Contents (23 chapters)
Oracle JRockit
Credits
Foreword
About the Authors
Acknowledgement
About the Reviewers
Preface
12
Using the JRockit Management APIs
Bibliography
Glossary
AST
CAS
HIR
IR
JFR
JMX
JRA
JSR
LIR
MD5
MIR
PDE
RCP
SWT
TLA
Index

Overriding SIGQUIT


Diagnostic commands can also be invoked by overriding the default behavior of the SIGQUIT process signal. Recollect from Chapter 4 that the default behavior of a JVM receiving a SIGQUIT is to write a thread dump containing the current state of all the threads to the console. One way of sending a SIGQUIT signal to the JVM process is to press Ctrl + Break (Windows), or Ctrl + \ (Linux), in the shell where the Java process was started. On *NIX-systems, executing kill -3 <PID> or kill -QUIT <PID> from a shell is an alternative way of issuing a SIGQUIT to a process with a given ID.

To override the SIGQUIT behavior of JRockit with a custom command sequence; put the list of commands to be executed in a plain text file and name it ctrlhandler.act. The file needs to be placed into the lib folder of JRockit distribution or the current directory of the JVM process. The presence of a crtlhandler.act file overrides the behavior of the SIGQUIT signal and makes it execute...