A Block-Based Bytecode Format to Simplify and Improve Just-in-Time - - PowerPoint PPT Presentation

a block based bytecode format
SMART_READER_LITE
LIVE PREVIEW

A Block-Based Bytecode Format to Simplify and Improve Just-in-Time - - PowerPoint PPT Presentation

A Block-Based Bytecode Format to Simplify and Improve Just-in-Time Compilation Christian Wimmer cwimmer@uci.edu www.christianwimmer.at June 2009 Department of Computer Science University of California, Irvine Method Granularity Software


slide-1
SLIDE 1

A Block-Based Bytecode Format

to Simplify and Improve Just-in-Time Compilation Christian Wimmer

cwimmer@uci.edu www.christianwimmer.at June 2009

Department of Computer Science University of California, Irvine

slide-2
SLIDE 2

Method Granularity

2

Software Engineering Compiler Optimization Unstructured Bytecodes Method Granularity Method Structure used in Compiler because “it’s there” JIT Compiler Design derived from Static Compilers

slide-3
SLIDE 3

Block Granularity

3

Software Engineering Compiler Optimization Compilation Units based on Execution Frequency Novel JIT Compilation Strategies using Profiling Data Block-Based Bytecodes with Structure Information

slide-4
SLIDE 4

4

Compiler Research

Profiling-Based Method Inlining Region-Based Compilation Partial Method Inlining On-Stack Replacement Deoptimization Trace Compilation

slide-5
SLIDE 5

Safety and Security Design Decisions Source Languages

Main Idea and Challenges

5

Definition of a Block-Based Bytecode Format Execution in Virtual Machine Simple Compilation Efficient Interpretation Stack Based vs. Register Based Static Single Assignment Form? Easy Verification Inherently Safe Code Formats Trace Compilation Profile Information For Static and Dynamic Languages Functional Languages Closures, Tail Calls, … Dynamic Method Calls High-Level Structure, e.g., Loops “Calling Convention” of Blocks

slide-6
SLIDE 6

6

Block Execution Frequency 100 200 150 100 50 150 Blocks Methods

SPECjvm2008 – mpegaudio

Method Execution Frequency 100 200 150

5% 0.1% 0% 100% Execution Frequency Relative to Most Executed

Methods

1 Iteration / 1 Operation of mpegaudio benchmark from SPECjvm2008 Single-block methods omitted Most executed method: javazoom.jl.decoder.huffcodetab.huffman_decoder 20,406,507 loop iterations / 5,078,337 calls

slide-7
SLIDE 7

Compiler Optimization

7

Summary

Method Structuring Readability Software Engineering

Methods hide the real focus where compiler optimizations should be applied

Reusability Extendibility … Block Structuring Profiling Execution Frequency Feedback-Directed Optimization …