Trace Compilation. Christian Wimmer September 2009

Size: px
Start display at page:

Download "Trace Compilation. Christian Wimmer September 2009"

Transcription

1 Trace Compilation Christian Wimmer September 2009 Department of Computer Science University of California, Irvine

2 Background Institute for System Software Johannes Kepler University Linz, Austria Java HotSpot VM Linear Scan Register Allocation Automatic Object Inlining Array Bounds Check Elimination Department of Computer Science University of California, Irvine Maxine VM Trace Based Compilation Phase Change Detection Hierarchical Layering of VMs Optimization of Strings Tail Calls Feedback-Directed Optimistic Optimizations for Java 2

3 Commercial 1 Tail Call Optimization Credit: Arnold Schwaighofer, JKU Linz Hard tail calls Prefix for invoke bytecodes (reuse wide prefix) Semantics checked by bytecode verifier Prototype implementation for Java HotSpot VM Interpreter, Client Compiler, Server Compiler Problem: Fixed size of compiled frames, parameters part of caller Not enough space for parameter of tail calls Non-sibling tail calls require adapter frames Protection domains Security information is attached to stack frames Problem: Tail calls across protection domains are security hole Solution 1: Don t allow, but throw exception Solution 2: Perform normal call and compress stack later if needed 3

4 Commercial 2 Client Compiler Visualizer 4

5 Trace Compilation Control Flow Graph Trace Tree

6 Why Trace Compilation? Method Execution Frequency 100 Methods Block Execution Frequency 100 Methods Blocks Execution Frequency Relative to Most Executed 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 100% 5% 0.1% 0% 150 6

7 Elements of a Trace Tree Anchor Trunk Trace Guard Branch Trace Guard Side Exit 7

8 Trace Compilation Interpret trace entry reached backward branch counter overflow Interpret and Record Trace abort tracing tracing finished (backward branch) Compile Trace Execute Trace side exit 8

9 Flavors of Trace Compilers Dynamic Languages TraceMonkey: Mozilla s JavaScript engine for Firefox Elimination of dynamic type checks Low compilation threshold Fast compilation, no expensive optimizations (yet) Java Maxine VM Evolved from a research prototype (Hotpath VM) Maxine has no interpreter where to integrate trace recording? Traces currently cover only loops, no merge points Java HotSpot VM Research funding requested, but still pending Stay tuned 9

10 Trace Recording in Interpreter Normal Interpreter switch iload Start Recording Stop Recording Recording Interpreter switch iload iadd iadd istore istore Profiling Instrumentation Recording Instrumentation 10

11 Trace Recording in Template JIT Normal Method iload iload Start Recording Stop Recording Recording Method iload iload iadd iadd istore istore Profiling Instrumentation Recording Instrumentation 11

12 Evaluation Trace Compilation Speedup relative to Maxine baseline compilation Preliminary Numbers! Series B LUFact C HeapSort C Crypt C FFT C SOR C Matmult C Maxine JIT Maxine JIT + OPT Maxine JIT + Tracing HotSpot Server 2 x 2.8GHz Quad-Core Intel Xeon Mac Pro Mac OS X , 64 bit JVMs 12

13 Problems and Future Work Loop-centric approach Trace and compile only loops Good for numerical applications Loops are not the first-order element of object-oriented applications Need to optimize also on per-method basis if necessary Tail duplication Trace trees lead to duplication of join blocks Block count can explode for complex control flow Need to support join blocks in traces Trace calling convention Switch to and from traces with low overhead 13

14 Phase Detection using Trace Compilation Stable Phase Unstable Phase Stable Phase Record Trace Few Failed Guards Increase of Failed Guards Discard Trace Record New Trace Few Failed Guards 14

15 Phases Based on Control Flow Without Phase Detection With Phase Detection guard steps > 0 guard sel == 0 (0) guard sel == 1 Warmup: sel = 0 First Phase: sel = 1 Second Phase: sel = 2 guard sel == 12 guard steps > 0 (1) (2) (1) guard sel == 2 (2) Example from Java Grande Series benchmark (simplified and adapted) 15

16 Phase Detection Structure Unstable Phase Stable Phase trace entry reached Interpret backward branch counter overflow abort tracing phase change (restart optimization) Interpret and Record Trace Interpret tracing finished (backward branch) no phase change trace entry reached Compile without Optimizations phase change (add new traces) Check for Phase Change no stable phase Execute Trace side exit side exit Execute Trace Check for Stable Phase stable phase Compile with Optimizations 16

17 Phases Based on Data Flow Without Phase Detection With Phase Detection guard i < n t1 = i + dx_off t2 = mem[dx + t1*8 + 24] First Phase: dx_off = 1 Second Phase: dx_off = 2 guard dx_off == 12 guard i < n t2 = mem[dx + t1*8 + 32] 40] Example from Java Grande LUFact benchmark (simplified) 17

18 Possibilities of Trace Compilation Hierarchical layering of virtual machines 18

19 Possibilities of Trace Compilation Hierarchical layering of virtual machines Current structure 19

20 Summary Java New Language Features Dynamic Languages Client vs. Server Workload Java VM Run-time Profiling Optimistic Assumptions Deoptimization Trace Compilation Garbage Collection Compilation Policies Many-Core Computers Recompilation 20

Phase Detection using Trace Compilation

Phase Detection using Trace Compilation Phase Detection using Trace Compilation Christian Wimmer Marcelo S. Cintra Michael Bebenita Mason Chang Andreas Gal Michael Franz Department of Computer Science University of California, Irvine {cwimmer,

More information

Deriving Code Coverage Information from Profiling Data Recorded for a Trace-based Just-in-time Compiler

Deriving Code Coverage Information from Profiling Data Recorded for a Trace-based Just-in-time Compiler Deriving Code Coverage Information from Profiling Data Recorded for a Trace-based Just-in-time Compiler Christian Häubl Institute for System Software Johannes Kepler University Linz Austria haeubl@ssw.jku.at

More information

Trace-based JIT Compilation

Trace-based JIT Compilation Trace-based JIT Compilation Hiroshi Inoue, IBM Research - Tokyo 1 Trace JIT vs. Method JIT https://twitter.com/yukihiro_matz/status/533775624486133762 2 Background: Trace-based Compilation Using a Trace,

More information

Sista: Improving Cog s JIT performance. Clément Béra

Sista: Improving Cog s JIT performance. Clément Béra Sista: Improving Cog s JIT performance Clément Béra Main people involved in Sista Eliot Miranda Over 30 years experience in Smalltalk VM Clément Béra 2 years engineer in the Pharo team Phd student starting

More information

H.-S. Oh, B.-J. Kim, H.-K. Choi, S.-M. Moon. School of Electrical Engineering and Computer Science Seoul National University, Korea

H.-S. Oh, B.-J. Kim, H.-K. Choi, S.-M. Moon. School of Electrical Engineering and Computer Science Seoul National University, Korea H.-S. Oh, B.-J. Kim, H.-K. Choi, S.-M. Moon School of Electrical Engineering and Computer Science Seoul National University, Korea Android apps are programmed using Java Android uses DVM instead of JVM

More information

Compiler construction 2009

Compiler construction 2009 Compiler construction 2009 Lecture 3 JVM and optimization. A first look at optimization: Peephole optimization. A simple example A Java class public class A { public static int f (int x) { int r = 3; int

More information

SABLEJIT: A Retargetable Just-In-Time Compiler for a Portable Virtual Machine p. 1

SABLEJIT: A Retargetable Just-In-Time Compiler for a Portable Virtual Machine p. 1 SABLEJIT: A Retargetable Just-In-Time Compiler for a Portable Virtual Machine David Bélanger dbelan2@cs.mcgill.ca Sable Research Group McGill University Montreal, QC January 28, 2004 SABLEJIT: A Retargetable

More information

A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler

A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler A Trace-based Java JIT Compiler Retrofitted from a Method-based Compiler Hiroshi Inoue, Hiroshige Hayashizaki, Peng Wu and Toshio Nakatani IBM Research Tokyo IBM Research T.J. Watson Research Center April

More information

Method-Level Phase Behavior in Java Workloads

Method-Level Phase Behavior in Java Workloads Method-Level Phase Behavior in Java Workloads Andy Georges, Dries Buytaert, Lieven Eeckhout and Koen De Bosschere Ghent University Presented by Bruno Dufour dufour@cs.rutgers.edu Rutgers University DCS

More information

<Insert Picture Here> Maxine: A JVM Written in Java

<Insert Picture Here> Maxine: A JVM Written in Java Maxine: A JVM Written in Java Michael Haupt Oracle Labs Potsdam, Germany The following is intended to outline our general product direction. It is intended for information purposes

More information

Just-In-Time Compilation

Just-In-Time Compilation Just-In-Time Compilation Thiemo Bucciarelli Institute for Software Engineering and Programming Languages 18. Januar 2016 T. Bucciarelli 18. Januar 2016 1/25 Agenda Definitions Just-In-Time Compilation

More information

The Potentials and Challenges of Trace Compilation:

The Potentials and Challenges of Trace Compilation: Peng Wu IBM Research January 26, 2011 The Potentials and Challenges of Trace Compilation: Lessons learned from building a trace-jit on top of J9 JVM (Joint work with Hiroshige Hayashizaki and Hiroshi Inoue,

More information

Mixed Mode Execution with Context Threading

Mixed Mode Execution with Context Threading Mixed Mode Execution with Context Threading Mathew Zaleski, Marc Berndl, Angela Demke Brown University of Toronto {matz,berndl,demke}@cs.toronto.edu (CASCON 2005, Oct 19/2005.) Overview Introduction Background:

More information

YETI. GraduallY Extensible Trace Interpreter VEE Mathew Zaleski, Angela Demke Brown (University of Toronto) Kevin Stoodley (IBM Toronto)

YETI. GraduallY Extensible Trace Interpreter VEE Mathew Zaleski, Angela Demke Brown (University of Toronto) Kevin Stoodley (IBM Toronto) YETI GraduallY Extensible Trace Interpreter Mathew Zaleski, Angela Demke Brown (University of Toronto) Kevin Stoodley (IBM Toronto) VEE 2007 1 Goal Create a VM that is more easily extended with a just

More information

Trace-Based Compilation in Execution Environments without Interpreters

Trace-Based Compilation in Execution Environments without Interpreters Trace-Based Compilation in Execution Environments without Interpreters Michael Bebenita Mason Chang Gregor Wagner Andreas Gal Christian Wimmer Michael Franz Department of Computer Science University of

More information

Incremental Dynamic Code Generation with Trace Trees

Incremental Dynamic Code Generation with Trace Trees Incremental Dynamic Code Generation with Trace Trees Andreas Gal University of California, Irvine gal@uci.edu Michael Franz University of California, Irvine franz@uci.edu Abstract The unit of compilation

More information

Eliminating Exception Constraints of Java Programs for IA-64

Eliminating Exception Constraints of Java Programs for IA-64 Eliminating Exception Constraints of Java Programs for IA-64 Kazuaki Ishizaki, Tatsushi Inagaki, Hideaki Komatsu,Toshio Nakatani IBM Research, Tokyo Research

More information

Run-time Program Management. Hwansoo Han

Run-time Program Management. Hwansoo Han Run-time Program Management Hwansoo Han Run-time System Run-time system refers to Set of libraries needed for correct operation of language implementation Some parts obtain all the information from subroutine

More information

Optimized Interval Splitting in a Linear Scan Register Allocator

Optimized Interval Splitting in a Linear Scan Register Allocator Optimized Interval Splitting in a Linear Scan Register Allocator ABSTRACT Christian Wimmer Institute for System Software Johannes Kepler University Linz Linz, Austria wimmer@ssw.jku.at We present an optimized

More information

CSc 453 Interpreters & Interpretation

CSc 453 Interpreters & Interpretation CSc 453 Interpreters & Interpretation Saumya Debray The University of Arizona Tucson Interpreters An interpreter is a program that executes another program. An interpreter implements a virtual machine,

More information

Unrestricted and Safe Dynamic Code Evolution for Java

Unrestricted and Safe Dynamic Code Evolution for Java Unrestricted and Safe Dynamic Code Evolution for Java Thomas Würthinger a, Christian Wimmer b, Lukas Stadler a a Institute for System Software, Christian Doppler Laboratory for Automated Software Engineering,

More information

JAVA PERFORMANCE. PR SW2 S18 Dr. Prähofer DI Leopoldseder

JAVA PERFORMANCE. PR SW2 S18 Dr. Prähofer DI Leopoldseder JAVA PERFORMANCE PR SW2 S18 Dr. Prähofer DI Leopoldseder OUTLINE 1. What is performance? 1. Benchmarking 2. What is Java performance? 1. Interpreter vs JIT 3. Tools to measure performance 4. Memory Performance

More information

On the Design of the Local Variable Cache in a Hardware Translation-Based Java Virtual Machine

On the Design of the Local Variable Cache in a Hardware Translation-Based Java Virtual Machine On the Design of the Local Variable Cache in a Hardware Translation-Based Java Virtual Machine Hitoshi Oi The University of Aizu June 16, 2005 Languages, Compilers, and Tools for Embedded Systems (LCTES

More information

Compact and Efficient Strings for Java

Compact and Efficient Strings for Java Compact and Efficient Strings for Java Christian Häubl, Christian Wimmer, Hanspeter Mössenböck Institute for System Software, Christian Doppler Laboratory for Automated Software Engineering, Johannes Kepler

More information

Self-Optimizing AST Interpreters

Self-Optimizing AST Interpreters Self-Optimizing AST Interpreters Thomas Würthinger Andreas Wöß Lukas Stadler Gilles Duboscq Doug Simon Christian Wimmer Oracle Labs Institute for System Software, Johannes Kepler University Linz, Austria

More information

Automatic Object Colocation Based on Read Barriers

Automatic Object Colocation Based on Read Barriers See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/221644818 Automatic Object Colocation Based on Read Barriers Conference Paper September 2006

More information

Context Threading: A flexible and efficient dispatch technique for virtual machine interpreters

Context Threading: A flexible and efficient dispatch technique for virtual machine interpreters : A flexible and efficient dispatch technique for virtual machine interpreters Marc Berndl Benjamin Vitale Mathew Zaleski Angela Demke Brown Research supported by IBM CAS, NSERC, CITO 1 Interpreter performance

More information

IBM Research - Tokyo 数理 計算科学特論 C プログラミング言語処理系の最先端実装技術. Trace Compilation IBM Corporation

IBM Research - Tokyo 数理 計算科学特論 C プログラミング言語処理系の最先端実装技術. Trace Compilation IBM Corporation 数理 計算科学特論 C プログラミング言語処理系の最先端実装技術 Trace Compilation Trace JIT vs. Method JIT https://twitter.com/yukihiro_matz/status/533775624486133762 2 Background: Trace-based Compilation Using a Trace, a hot path identified

More information

Compiler-guaranteed Safety in Code-copying Virtual Machines

Compiler-guaranteed Safety in Code-copying Virtual Machines Compiler-guaranteed Safety in Code-copying Virtual Machines Gregory B. Prokopski Clark Verbrugge School of Computer Science Sable Research Group McGill University Montreal, Canada International Conference

More information

Truffle A language implementation framework

Truffle A language implementation framework Truffle A language implementation framework Boris Spasojević Senior Researcher VM Research Group, Oracle Labs Slides based on previous talks given by Christian Wimmer, Christian Humer and Matthias Grimmer.

More information

Just-In-Time Compilers & Runtime Optimizers

Just-In-Time Compilers & Runtime Optimizers COMP 412 FALL 2017 Just-In-Time Compilers & Runtime Optimizers Comp 412 source code IR Front End Optimizer Back End IR target code Copyright 2017, Keith D. Cooper & Linda Torczon, all rights reserved.

More information

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 16

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 16 1 Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 16 Towards JVM Dynamic Languages Toolchain Insert Picture Here Attila

More information

Java: framework overview and in-the-small features

Java: framework overview and in-the-small features Chair of Software Engineering Carlo A. Furia, Marco Piccioni, Bertrand Meyer Java: framework overview and in-the-small features Chair of Software Engineering Carlo A. Furia, Marco Piccioni, Bertrand Meyer

More information

An Introduction to Multicodes. Ben Stephenson Department of Computer Science University of Western Ontario

An Introduction to Multicodes. Ben Stephenson Department of Computer Science University of Western Ontario An Introduction to Multicodes Ben Stephenson Department of Computer Science University of Western Ontario ben@csd csd.uwo.ca Outline Java Virtual Machine Background The Current State of the Multicode Art

More information

Practical Partial Evaluation for High-Performance Dynamic Language Runtimes

Practical Partial Evaluation for High-Performance Dynamic Language Runtimes Practical Partial Evaluation for High-Performance Dynamic Language Runtimes Thomas Würthinger Christian Wimmer Christian Humer Andreas Wöß Lukas Stadler Chris Seaton Gilles Duboscq Doug Simon Matthias

More information

Swift: A Register-based JIT Compiler for Embedded JVMs

Swift: A Register-based JIT Compiler for Embedded JVMs Swift: A Register-based JIT Compiler for Embedded JVMs Yuan Zhang, Min Yang, Bo Zhou, Zhemin Yang, Weihua Zhang, Binyu Zang Fudan University Eighth Conference on Virtual Execution Environment (VEE 2012)

More information

Executing Legacy Applications on a Java Operating System

Executing Legacy Applications on a Java Operating System Executing Legacy Applications on a Java Operating System Andreas Gal, Michael Yang, Christian Probst, and Michael Franz University of California, Irvine {gal,mlyang,probst,franz}@uci.edu May 30, 2004 Abstract

More information

HydraVM: Mohamed M. Saad Mohamed Mohamedin, and Binoy Ravindran. Hot Topics in Parallelism (HotPar '12), Berkeley, CA

HydraVM: Mohamed M. Saad Mohamed Mohamedin, and Binoy Ravindran. Hot Topics in Parallelism (HotPar '12), Berkeley, CA HydraVM: Mohamed M. Saad Mohamed Mohamedin, and Binoy Ravindran Hot Topics in Parallelism (HotPar '12), Berkeley, CA Motivation & Objectives Background Architecture Program Reconstruction Implementation

More information

Snippets: Taking the High Road to a Low Level

Snippets: Taking the High Road to a Low Level Snippets: Taking the High Road to a Low Level DOUG SIMON and CHRISTIAN WIMMER, Oracle Labs BERNHARD URBAN, Institute for System Software, Johannes Kepler University Linz, Austria GILLES DUBOSCQ, LUKAS

More information

Running class Timing on Java HotSpot VM, 1

Running class Timing on Java HotSpot VM, 1 Compiler construction 2009 Lecture 3. A first look at optimization: Peephole optimization. A simple example A Java class public class A { public static int f (int x) { int r = 3; int s = r + 5; return

More information

JOVE. An Optimizing Compiler for Java. Allen Wirfs-Brock Instantiations Inc.

JOVE. An Optimizing Compiler for Java. Allen Wirfs-Brock Instantiations Inc. An Optimizing Compiler for Java Allen Wirfs-Brock Instantiations Inc. Object-Orient Languages Provide a Breakthrough in Programmer Productivity Reusable software components Higher level abstractions Yield

More information

The VMKit project: Java (and.net) on top of LLVM

The VMKit project: Java (and.net) on top of LLVM The VMKit project: Java (and.net) on top of LLVM Nicolas Geoffray Université Pierre et Marie Curie, France nicolas.geoffray@lip6.fr What is VMKit? Glue between existing VM components LLVM, GNU Classpath,

More information

Summary: Open Questions:

Summary: Open Questions: Summary: The paper proposes an new parallelization technique, which provides dynamic runtime parallelization of loops from binary single-thread programs with minimal architectural change. The realization

More information

Experiences with Multi-threading and Dynamic Class Loading in a Java Just-In-Time Compiler

Experiences with Multi-threading and Dynamic Class Loading in a Java Just-In-Time Compiler , Compilation Technology Experiences with Multi-threading and Dynamic Class Loading in a Java Just-In-Time Compiler Daryl Maier, Pramod Ramarao, Mark Stoodley, Vijay Sundaresan TestaRossa JIT compiler

More information

BEAMJIT: An LLVM based just-in-time compiler for Erlang. Frej Drejhammar

BEAMJIT: An LLVM based just-in-time compiler for Erlang. Frej Drejhammar BEAMJIT: An LLVM based just-in-time compiler for Erlang Frej Drejhammar 140407 Who am I? Senior researcher at the Swedish Institute of Computer Science (SICS) working on programming languages,

More information

Azul Systems, Inc.

Azul Systems, Inc. 1 Stack Based Allocation in the Azul JVM Dr. Cliff Click cliffc@azulsystems.com 2005 Azul Systems, Inc. Background The Azul JVM is based on Sun HotSpot a State-of-the-Art Java VM Java is a GC'd language

More information

Interprocedural Type Specialization of JavaScript Programs Without Type Analysis

Interprocedural Type Specialization of JavaScript Programs Without Type Analysis Interprocedural Type Specialization of JavaScript Programs Without Type Analysis Maxime Chevalier-Boisvert joint work with Marc Feeley ECOOP - July 20th, 2016 Overview Previous work: Lazy Basic Block Versioning

More information

MethodHandlesArrayElementGetterBench.testCreate Analysis. Copyright 2016, Oracle and/or its affiliates. All rights reserved.

MethodHandlesArrayElementGetterBench.testCreate Analysis. Copyright 2016, Oracle and/or its affiliates. All rights reserved. MethodHandlesArrayElementGetterBench.testCreate Analysis Overview Benchmark : nom.indy.methodhandlesarrayelementgetterbench.testcreate Results with JDK8 (ops/us) JDK8 Intel 234 T8 T8 with -XX:FreqInlineSize=325

More information

HotpathVM: An Effective JIT Compiler for Resource-constrained Devices

HotpathVM: An Effective JIT Compiler for Resource-constrained Devices HotpathVM: An ffective JIT ompiler for Resource-constrained evices Andreas Gal onald ren School of Information and omputer Science University of alifornia, Irvine Irvine, A 92697-3425, USA gal@uci.edu

More information

A Quantitative Evaluation of the Contribution of Native Code to Java Workloads

A Quantitative Evaluation of the Contribution of Native Code to Java Workloads A Quantitative Evaluation of the Contribution of Native Code to Java Workloads Walter Binder University of Lugano Switzerland walter.binder@unisi.ch Jarle Hulaas, Philippe Moret EPFL Switzerland {jarle.hulaas,philippe.moret}@epfl.ch

More information

Reducing the Overhead of Dynamic Compilation

Reducing the Overhead of Dynamic Compilation Reducing the Overhead of Dynamic Compilation Chandra Krintz y David Grove z Derek Lieber z Vivek Sarkar z Brad Calder y y Department of Computer Science and Engineering, University of California, San Diego

More information

Multi-threaded Queries. Intra-Query Parallelism in LLVM

Multi-threaded Queries. Intra-Query Parallelism in LLVM Multi-threaded Queries Intra-Query Parallelism in LLVM Multithreaded Queries Intra-Query Parallelism in LLVM Yang Liu Tianqi Wu Hao Li Interpreted vs Compiled (LLVM) Interpreted vs Compiled (LLVM) Interpreted

More information

Optimization Techniques

Optimization Techniques Smalltalk Implementation: Optimization Techniques Prof. Harry Porter Portland State University 1 Optimization Ideas Just-In-Time (JIT) compiling When a method is first invoked, compile it into native code.

More information

Intelligent Compilation

Intelligent Compilation Intelligent Compilation John Cavazos Department of Computer and Information Sciences University of Delaware Autotuning and Compilers Proposition: Autotuning is a component of an Intelligent Compiler. Code

More information

Efficient Runtime Tracking of Allocation Sites in Java

Efficient Runtime Tracking of Allocation Sites in Java Efficient Runtime Tracking of Allocation Sites in Java Rei Odaira, Kazunori Ogata, Kiyokuni Kawachiya, Tamiya Onodera, Toshio Nakatani IBM Research - Tokyo Why Do You Need Allocation Site Information?

More information

The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams.

The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams. The Slide does not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams. Operating System Services User Operating System Interface

More information

The Use of Traces in Optimization

The Use of Traces in Optimization The Use of Traces in Optimization by Borys Jan Bradel A thesis submitted in conformity with the requirements for the degree of Master of Applied Science Edward S. Rogers Sr. Department of Electrical and

More information

Just In Time Compilation

Just In Time Compilation Just In Time Compilation JIT Compilation: What is it? Compilation done during execution of a program (at run time) rather than prior to execution Seen in today s JVMs and elsewhere Outline Traditional

More information

Improving Mobile Program Performance Through the Use of a Hybrid Intermediate Representation

Improving Mobile Program Performance Through the Use of a Hybrid Intermediate Representation Improving Mobile Program Performance Through the Use of a Hybrid Intermediate Representation Chandra Krintz Computer Science Department University of California, Santa Barbara Abstract We present a novel

More information

Program Dynamic Analysis. Overview

Program Dynamic Analysis. Overview Program Dynamic Analysis Overview Dynamic Analysis JVM & Java Bytecode [2] A Java bytecode engineering library: ASM [1] 2 1 What is dynamic analysis? [3] The investigation of the properties of a running

More information

3/15/18. Overview. Program Dynamic Analysis. What is dynamic analysis? [3] Why dynamic analysis? Why dynamic analysis? [3]

3/15/18. Overview. Program Dynamic Analysis. What is dynamic analysis? [3] Why dynamic analysis? Why dynamic analysis? [3] Overview Program Dynamic Analysis Dynamic Analysis JVM & Java Bytecode [2] A Java bytecode engineering library: ASM [1] 2 What is dynamic analysis? [3] The investigation of the properties of a running

More information

<Insert Picture Here>

<Insert Picture Here> 1 2010-0237 The Maxine Inspector: A Specialized Tool for VM Development, Santa Clara, CA Michael L. Van De Vanter Researcher, Oracle Sun Labs The Maxine Project at Oracle Sun Labs:

More information

Parallelism of Java Bytecode Programs and a Java ILP Processor Architecture

Parallelism of Java Bytecode Programs and a Java ILP Processor Architecture Australian Computer Science Communications, Vol.21, No.4, 1999, Springer-Verlag Singapore Parallelism of Java Bytecode Programs and a Java ILP Processor Architecture Kenji Watanabe and Yamin Li Graduate

More information

Hierarchical PLABs, CLABs, TLABs in Hotspot

Hierarchical PLABs, CLABs, TLABs in Hotspot Hierarchical s, CLABs, s in Hotspot Christoph M. Kirsch ck@cs.uni-salzburg.at Hannes Payer hpayer@cs.uni-salzburg.at Harald Röck hroeck@cs.uni-salzburg.at Abstract Thread-local allocation buffers (s) are

More information

JVM Continuations. Lukas Stadler. Johannes Kepler University Linz, Austria

JVM Continuations. Lukas Stadler. Johannes Kepler University Linz, Austria JVM Continuations Lukas Stadler Johannes Kepler University Linz, Austria Agenda Continuations Uses for continuations Common implementation techniques Our lazy approach Implementation Summary Continuations

More information

UNIVERSITY OF CALIFORNIA, IRVINE. Trace-Based Compilation and Optimization in Meta-Circular Virtual Execution Environments DISSERTATION

UNIVERSITY OF CALIFORNIA, IRVINE. Trace-Based Compilation and Optimization in Meta-Circular Virtual Execution Environments DISSERTATION UNIVERSITY OF CALIFORNIA, IRVINE Trace-Based Compilation and Optimization in Meta-Circular Virtual Execution Environments DISSERTATION submitted in partial satisfaction of the requirements for the degree

More information

A Simplified Java Compilation System for Resource-Constrained Embedded Processors

A Simplified Java Compilation System for Resource-Constrained Embedded Processors A Simplified Java Compilation System for Resource-Constrained Embedded Processors Carmen Badea, Alexandru Nicolau, Alexander Veidenbaum Center for Embedded Computer Systems University of California, Irvine

More information

Delft-Java Link Translation Buffer

Delft-Java Link Translation Buffer Delft-Java Link Translation Buffer John Glossner 1,2 and Stamatis Vassiliadis 2 1 Lucent / Bell Labs Advanced DSP Architecture and Compiler Research Allentown, Pa glossner@lucent.com 2 Delft University

More information

Java On Steroids: Sun s High-Performance Java Implementation. History

Java On Steroids: Sun s High-Performance Java Implementation. History Java On Steroids: Sun s High-Performance Java Implementation Urs Hölzle Lars Bak Steffen Grarup Robert Griesemer Srdjan Mitrovic Sun Microsystems History First Java implementations: interpreters compact

More information

Escape Analysis in the Context of Dynamic Compilation and Deoptimization

Escape Analysis in the Context of Dynamic Compilation and Deoptimization Escape Analysis in the Context of Dynamic Compilation and Deoptimization ABSTRACT Thomas Kotzmann Institute for System Software Johannes Kepler University Linz Linz, Austria kotzmann@ssw.jku.at In object-oriented

More information

Dynamic Elimination of Overflow Tests in a Trace Compiler

Dynamic Elimination of Overflow Tests in a Trace Compiler Dynamic Elimination of Overflow Tests in a Trace Compiler Rodrigo Sol, Christophe Guillon, Fernando Pereira and Mariza Bigonha The Objective of this work is to improve the quality of the code produced

More information

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Copyright 2012, Oracle and/or its affiliates. All rights reserved. 1 Truffle: A Self-Optimizing Runtime System Christian Wimmer, Thomas Würthinger Oracle Labs Write Your Own Language Current situation How it should be Prototype a new language Parser and language work

More information

<Insert Picture Here> Symmetric multilanguage VM architecture: Running Java and JavaScript in Shared Environment on a Mobile Phone

<Insert Picture Here> Symmetric multilanguage VM architecture: Running Java and JavaScript in Shared Environment on a Mobile Phone Symmetric multilanguage VM architecture: Running Java and JavaScript in Shared Environment on a Mobile Phone Oleg Pliss Pavel Petroshenko Agenda Introduction to Monty JVM Motivation

More information

Identifying the Sources of Cache Misses in Java Programs Without Relying on Hardware Counters. Hiroshi Inoue and Toshio Nakatani IBM Research - Tokyo

Identifying the Sources of Cache Misses in Java Programs Without Relying on Hardware Counters. Hiroshi Inoue and Toshio Nakatani IBM Research - Tokyo Identifying the Sources of Cache Misses in Java Programs Without Relying on Hardware Counters Hiroshi Inoue and Toshio Nakatani IBM Research - Tokyo June 15, 2012 ISMM 2012 at Beijing, China Motivation

More information

Java Performance Analysis for Scientific Computing

Java Performance Analysis for Scientific Computing Java Performance Analysis for Scientific Computing Roldan Pozo Leader, Mathematical Software Group National Institute of Standards and Technology USA UKHEC: Java for High End Computing Nov. 20th, 2000

More information

High-Level Language VMs

High-Level Language VMs High-Level Language VMs Outline Motivation What is the need for HLL VMs? How are these different from System or Process VMs? Approach to HLL VMs Evolutionary history Pascal P-code Object oriented HLL VMs

More information

Towards future method hotness prediction for Virtual Machines

Towards future method hotness prediction for Virtual Machines Towards future method hotness prediction for Virtual Machines Manjiri A. Namjoshi Submitted to the Department of Electrical Engineering & Computer Science and the Faculty of the Graduate School of the

More information

Debunking Dynamic Optimization Myths

Debunking Dynamic Optimization Myths Debunking Dynamic Optimization Myths Michael Hind (Material borrowed from 3 hr PLDI 04 Tutorial by Stephen Fink, David Grove, and Michael Hind. See those slides for more details.) September 15, 2004 Future

More information

Java Instrumentation for Dynamic Analysis

Java Instrumentation for Dynamic Analysis Java Instrumentation for Dynamic Analysis and Michael Ernst MIT CSAIL Page 1 Java Instrumentation Approaches Instrument source files Java Debug Interface (JDI) Instrument class files Page 2 Advantages

More information

Legato: Bounded Region Serializability Using Commodity Hardware Transactional Memory. Aritra Sengupta Man Cao Michael D. Bond and Milind Kulkarni

Legato: Bounded Region Serializability Using Commodity Hardware Transactional Memory. Aritra Sengupta Man Cao Michael D. Bond and Milind Kulkarni Legato: Bounded Region Serializability Using Commodity Hardware al Memory Aritra Sengupta Man Cao Michael D. Bond and Milind Kulkarni 1 Programming Language Semantics? Data Races C++ no guarantee of semantics

More information

Virtual Machines and Dynamic Translation: Implementing ISAs in Software

Virtual Machines and Dynamic Translation: Implementing ISAs in Software Virtual Machines and Dynamic Translation: Implementing ISAs in Software Krste Asanovic Laboratory for Computer Science Massachusetts Institute of Technology Software Applications How is a software application

More information

YETI: a gradually Extensible Trace Interpreter

YETI: a gradually Extensible Trace Interpreter Thesis Proposal: YETI: a gradually Extensible Trace Interpreter Mathew Zaleski (for advisory committee meeting Jan 17/2007) 1 2 Contents 1 Introduction 7 1.1 Challenges of Efficient Interpretation.......................

More information

Untyped Memory in the Java Virtual Machine

Untyped Memory in the Java Virtual Machine Untyped Memory in the Java Virtual Machine Andreas Gal and Michael Franz University of California, Irvine {gal,franz}@uci.edu Christian W. Probst Technical University of Denmark probst@imm.dtu.dk July

More information

BEAMJIT, a Maze of Twisty Little Traces

BEAMJIT, a Maze of Twisty Little Traces BEAMJIT, a Maze of Twisty Little Traces A walk-through of the prototype just-in-time (JIT) compiler for Erlang. Frej Drejhammar 130613 Who am I? Senior researcher at the Swedish Institute

More information

Midterm 2. CMSC 430 Introduction to Compilers Spring Instructions Total 100. Name: April 18, 2012

Midterm 2. CMSC 430 Introduction to Compilers Spring Instructions Total 100. Name: April 18, 2012 Name: Midterm 2 CMSC 430 Introduction to Compilers Spring 2012 April 18, 2012 Instructions This exam contains 10 pages, including this one. Make sure you have all the pages. Write your name on the top

More information

Reducing the Overhead of Dynamic Compilation

Reducing the Overhead of Dynamic Compilation Reducing the Overhead of Dynamic Compilation Chandra Krintz David Grove Derek Lieber Vivek Sarkar Brad Calder Department of Computer Science and Engineering, University of California, San Diego IBM T.

More information

Evolution of Virtual Machine Technologies for Portability and Application Capture. Bob Vandette Java Hotspot VM Engineering Sept 2004

Evolution of Virtual Machine Technologies for Portability and Application Capture. Bob Vandette Java Hotspot VM Engineering Sept 2004 Evolution of Virtual Machine Technologies for Portability and Application Capture Bob Vandette Java Hotspot VM Engineering Sept 2004 Topics Virtual Machine Evolution Timeline & Products Trends forcing

More information

The JavaScriptCore Virtual Machine. Filip Pizlo Apple Inc.

The JavaScriptCore Virtual Machine. Filip Pizlo Apple Inc. The JavaScriptCore Virtual Machine Filip Pizlo Apple Inc. 3 Pizlo Keynotes / Week ICCV 17 Symmetry as the fundamental prior in human 3D vision Zygmunt Pizlo webkit.org https://svn.webkit.org/repository/webkit/trunk

More information

Atomicity via Source-to-Source Translation

Atomicity via Source-to-Source Translation Atomicity via Source-to-Source Translation Benjamin Hindman Dan Grossman University of Washington 22 October 2006 Atomic An easier-to-use and harder-to-implement primitive void deposit(int x){ synchronized(this){

More information

Improving Mobile Program Performance Through the Use of a Hybrid Intermediate Representation

Improving Mobile Program Performance Through the Use of a Hybrid Intermediate Representation Improving Mobile Program Performance Through the Use of a Hybrid Intermediate Representation Chandra Krintz Computer Science Department University of California, Santa Barbara Abstract Abstract. We present

More information

Dynamic Binary Translation for Generation of Cycle AccurateOctober Architecture 28, 2008 Simulators 1 / 1

Dynamic Binary Translation for Generation of Cycle AccurateOctober Architecture 28, 2008 Simulators 1 / 1 Dynamic Binary Translation for Generation of Cycle Accurate Architecture Simulators Institut für Computersprachen Technische Universtät Wien Austria Andreas Fellnhofer Andreas Krall David Riegler Part

More information

Mitigating the Compiler Optimization Phase-Ordering Problem using Machine Learning

Mitigating the Compiler Optimization Phase-Ordering Problem using Machine Learning Mitigating the Compiler Optimization Phase-Ordering Problem using Machine Learning Sameer Kulkarni John Cavazos University of Delaware {skulkarn,cavazos@cis.udel.edu Abstract Today s compilers have a plethora

More information

Kasper Lund, Software engineer at Google. Crankshaft. Turbocharging the next generation of web applications

Kasper Lund, Software engineer at Google. Crankshaft. Turbocharging the next generation of web applications Kasper Lund, Software engineer at Google Crankshaft Turbocharging the next generation of web applications Overview Why did we introduce Crankshaft? Deciding when and what to optimize Type feedback and

More information

ByCounter: Portable Runtime Counting of Bytecode Instructions and Method Invocations

ByCounter: Portable Runtime Counting of Bytecode Instructions and Method Invocations ByteCode 2008 ByCounter: Portable Runtime Counting of Bytecode Instructions and Method Invocations Michael Kuperberg 1 Martin Krogmann 2 Ralf Reussner 3 Chair for Software Design and Quality Institute

More information

Reducing Trace Selection Footprint for Large-scale Java Applications without Performance Loss

Reducing Trace Selection Footprint for Large-scale Java Applications without Performance Loss Reducing Trace Selection Footprint for Large-scale Java Applications without Performance Loss Peng Wu Hiroshige Hayashizaki Hiroshi Inoue Toshio Nakatani IBM Research pengwu@us.ibm.com,{hayashiz,inouehrs,nakatani}@jp.ibm.com

More information

Compilation Queuing and Graph Caching for Dynamic Compilers

Compilation Queuing and Graph Caching for Dynamic Compilers Compilation Queuing and Graph Caching for Dynamic Compilers Lukas Stadler Gilles Duboscq Hanspeter Mössenböck Johannes Kepler University Linz, Austria {stadler, duboscq, moessenboeck}@ssw.jku.at Thomas

More information

TREEGRAPH-BASED INSTRUCTION SCHEDULING FOR STACK-BASED VIRTUAL MACHINES

TREEGRAPH-BASED INSTRUCTION SCHEDULING FOR STACK-BASED VIRTUAL MACHINES TREEGRAPH-ASED INSTRUCTION SCHEDULING FOR STACK-ASED VIRTUAL MACHINES Jiin Park 1, Jinhyung Park 1, Wonjoon Song 1, Songwook Yoon 1, ernd urgstaller 1 and ernhard Scholz 2 1 Yonsei University 2 The University

More information

A Simplified Java Bytecode Compilation System for Resource-Constrained Embedded Processors

A Simplified Java Bytecode Compilation System for Resource-Constrained Embedded Processors A Simplified Java Bytecode Compilation System for Resource-Constrained Embedded Processors Carmen Badea, Alexandru Nicolau, Alexander V. Veidenbaum Center for Embedded Computer Systems University of California

More information

Hardware-Supported Pointer Detection for common Garbage Collections

Hardware-Supported Pointer Detection for common Garbage Collections 2013 First International Symposium on Computing and Networking Hardware-Supported Pointer Detection for common Garbage Collections Kei IDEUE, Yuki SATOMI, Tomoaki TSUMURA and Hiroshi MATSUO Nagoya Institute

More information

Evolution of a Java just-in-time compiler for IA-32 platforms

Evolution of a Java just-in-time compiler for IA-32 platforms Evolution of a Java just-in-time compiler for IA-32 platforms Java has gained widespread popularity in the industry, and an efficient Java virtual machine (JVM ) and just-in-time (JIT) compiler are crucial

More information