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

Chapter 2. Adaptive Code Generation

This chapter covers code generation and code optimization in a JVM runtime environment, both as a general concept as well as taking a closer look at the JRockit code generation internals. We start by discussing the Java bytecode format, and how a JIT compiler works, making a case for the power of adaptive runtimes. After that, we drill down into the JRockit JVM. Finally, the reader learns how to control code generation and optimization in JRockit.

You will learn the following from this chapter:

  • The benefits of a portable platform-independent language such as Java.

  • The structure of the Java bytecode format and key details of the Java Virtual Machine specification.

  • How the JVM interprets bytecode in order to execute a Java program.

  • Adaptive optimizations at runtime versus static ahead-of-time compilation. Why the former is better but harder to do. The "gambling on performance" metaphor.

  • Why code generation in an adaptive runtime is potentially very powerful.

  • How...