Summary

This chapter discussed code generation in a runtime environment. The topic was introduced as a general problem, comparing adaptive compilation to static compilation. We also explained special situations that apply to code generation in a Java Virtual Machine.

We have discussed some aspects of the Java bytecode format, its pros and cons, and the challenges of making Java code run fast, using different techniques from interpretation to total JIT compilation.

Furthermore, we have discussed the challenges of an adaptive runtime, where new code can enter the system at any time, and how to overcome them by "educated guesses", or "gambling". This means that JVM takes the optimistic approach when optimizing that made assumptions rarely change. We also mentioned the equation compilation speed versus execution speed, depending on method "hotness".

Finally, the chapter introduced the code pipeline in the JRockit Virtual Machine and its state of the art optimizations, using a comprehensive example with snapshots of a method generation cycle, all the way to native code. At the end of the chapter, some ways of modifying JRockit code generation behavior through command-line flags and directive files were explained.

The next chapter covers another fundamental aspect of adaptive runtimes; the memory management system, and techniques for efficient garbage collection, both as an overview, for garbage collected languages in general and specifically for Java with the JRockit JVM.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.5.201