Entering content frame

Background documentation Code Generation Locate the document in its SAP Library structure

Typically, Java VMs have a Just-In-Time-Compiler, which translates the Java byte code into machine instructions. Furthermore, Java classes can be generated at runtime, for instance from JSPs, and then translated by the Java compiler (javac) into Java byte code. There are three levels of code generation:

     Other languages ®  Java sources: java

     Java sources ® Java byte code: byte

     Java byte code ®  machine instructions: native

The time used for code generation is counted in java/byte/native time.

Detailed information is available for the JIT compiler. Compiled methods are stored in what is known as a code cache. Methods of local classes are stored in the local code cache, and compiled methods of shared classes are stored in the shared code cache (see Memory Management in the VM Container).If methods are compiled during a dialog step, the memory needed for the associated compilations are stored in code cache, allocated local/shared. If memory is freed up for the code cache when a method is decompiled, caused for instance by a (shared) garbage collection, this is shown under Code cache, freed local/shared. The total amount of the code cache used is put in Code cache used local/shared at the end of a dialog step.Before a method is compiled, the JIT compiler predicts the memory size required in the code cache.The sum of wrong predictions is stored in the Code cache wrong prediction.The maximum size of memory needed to create intermediate representations is indicated in the Code cache max. work.

In addition to the memory required by the JIT compiler, also counted are compilation attempts (Count JIT compilation trial), successful compilations (Count JIT succeed), compilation retries (Count JIT retry), and unloaded methods (Count JIT decompile). The number of switches between interpreted Java byte code and code compiled by the JIT compiler is also counted (Count native byte switch).

The graphic below shows the data recorded from the code generation.

VMC Details in STAD – Code Generation

This graphic is explained in the accompanying text

 

 

Leaving content frame