Download presentation
Presentation is loading. Please wait.
Published byHubert Morris Modified over 9 years ago
1
JAVA Processors and JIT Scheduling
2
Overview & Literature n Formulation of the problem n JAVA introduction n Description of Caffeine * Literature: “Java Bytecode to Native Code Translation: The Caffeine Prototype and Preliminary Results” written by Hsieh, Gyllenhaal and Hwu, 1996
3
Formulation of the problem n JAVA is a very well language which runs on different platforms, but executing an application is much slower than that it is written in C. n The goal is to achieve a faster translation from JAVA-bytecode to native code.
4
Intro: JAVA import java.awg.Frame; class GraphWindow extends Frame {. CA FE BA BE 00 03 00 2D. JAVA Compiler JAVA Sourcecode JAVA Bytecodes
5
Intro: JAVA In a classfile Medium (e.g. internet) * Classloader * Bytecode verificator * JIT Compiler Pentium / PowerPC Alpha / … native code CA FE BA BE 00 03 00 2D. JAVA Bytecodes OS- dependent Machine- dependent * Classloader * Bytecode verificator * Interpreter (JVM) Pentium / PowerPC Alpha / … native code OS- dependent Machine- dependent
6
JAVA: Caffeine Bytecode Optimized Machine-Specific IR Optimized Native Code Optimized Machine-Indep. IR Machine-Indep. IR (Lcode) JAVA IR IR = Instruction Representation Medium Optimizing native code translators
7
Caffeine: Overview n Stack to Virtual Register Mapping n Stack Analysis n Run-time Memory Organisation
8
Stack to Virtual Register Mapping (1) n Stack Computation Model –operand stack –local variable array –eliminating some loads and stores n Register Mapping –assign stack locations to unique virtual register numbers –allocate virtual registers to physical regs. * Improvement: 2.8 times faster than JIT
9
Stack to Virtual Register Mapping (2) Example
10
Stack Analysis n If #pushes == #pops in a path of blocks ---> register mapping possible n Else: use the standard stack-model (thus no optimization possible) n Take live range (LR) of stack locations into account * Improvement: 55%
11
Run-time Memory Organisation n JAVA has two types of objects: –class objects –array objects n Interpreter: there is an 8-byte handler between object and data n Caffeine: no handler * Improvement: 7%
12
Conclusion / Comparison Percentage of C Performance Caffeine does improve the performance of JAVA- programs, and it is able to reach the goal to make translating JAVAbytecode to native code faster.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.