1 / 12

JAVA Processors and JIT Scheduling

JAVA Processors and JIT Scheduling. Overview & Literature. Formulation of the problem JAVA introduction Description of Caffeine Literature: “Java Bytecode to Native Code Translation: The Caffeine Prototype and Preliminary Results” written by Hsieh, Gyllenhaal and Hwu, 1996.

marjorieb
Download Presentation

JAVA Processors and JIT Scheduling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JAVA Processors and JIT Scheduling

  2. Overview & Literature • Formulation of the problem • JAVA introduction • 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 • 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. • 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 Medium (e.g. internet) CA FE BA BE 00 03 00 2D . . . . . * Classloader * Bytecode verificator * JIT Compiler * Classloader * Bytecode verificator * Interpreter (JVM) OS-dependent OS-dependent JAVA Bytecodes In a classfile Pentium / PowerPC Alpha / … native code Pentium / PowerPC Alpha / … native code Machine-dependent Machine-dependent

  6. JAVA: Caffeine Machine-Indep. IR (Lcode) Optimized Machine-Indep. IR Optimizing native code translators JAVA IR IR = Instruction Representation Optimized Machine-Specific IR Medium Bytecode Optimized Native Code

  7. Caffeine: Overview • Stack to Virtual Register Mapping • Stack Analysis • Run-time Memory Organisation

  8. Stack to Virtual Register Mapping (1) • Stack Computation Model • operand stack • local variable array • eliminating some loads and stores • 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 • If #pushes == #pops in a path of blocks ---> register mapping possible • Else: use the standard stack-model (thus no optimization possible) • Take live range (LR) of stack locations into account • Improvement: 55%

  11. Run-time Memory Organisation • JAVA has two types of objects: • class objects • array objects • Interpreter: there is an 8-byte handler between object and data • 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.

More Related