P ARALLEL P ROCESSING I NSTITUTE · F UDAN U NIVERSITY 1.

Slides:



Advertisements
Similar presentations
Link-Time Path-Sensitive Memory Redundancy Elimination Manel Fernández and Roger Espasa Computer Architecture Department Universitat.
Advertisements

1 Write Barrier Elision for Concurrent Garbage Collectors Martin T. Vechev Cambridge University David F. Bacon IBM T.J.Watson Research Center.
A Process Splitting Transformation for Kahn Process Networks Sjoerd Meijer.
Optimizing single thread performance Dependence Loop transformations.
Extensibility, Safety and Performance in the SPIN Operating System Presented by Allen Kerr.
ABCD: Eliminating Array-Bounds Checks on Demand Rastislav Bodík Rajiv Gupta Vivek Sarkar U of Wisconsin U of Arizona IBM TJ Watson recent experiments.
The Java Language. Topics of this Course  Introduction to Java  The Java Language  Object Oriented Programming in Java  Exceptions Handling  Threads.
CIS 101: Computer Programming and Problem Solving Lecture 8 Usman Roshan Department of Computer Science NJIT.
IBM Software Group © 2005 IBM Corporation Compilation Technology Toward Deterministic Java Performance Mark Stoodley, Mike Fulton Toronto Lab, IBM Canada.
Memory Systems Performance Workshop 2004© David Ryan Koes MSP 2004 Programmer Specified Pointer Independence David Koes Mihai Budiu Girish Venkataramani.
Java for High Performance Computing Jordi Garcia Almiñana 14 de Octubre de 1998 de la era post-internet.
Previous finals up on the web page use them as practice problems look at them early.
Tentative Schedule 20/12 Interpreter+ Code Generation 27/12 Code Generation for Control Flow 3/1 Activation Records 10/1 Program Analysis 17/1 Register.
An Approach to Safe Object Sharing Ciaran Bryce & Chrislain Razafimahefa University of Geneva, Switzerland.
C++ vs. Java: Similiarities & Differences Dr. Jeyakesavan Veerasamy Director of CS UTDesign program & CS Teaching Faculty University.
CS884 (Prasad)Java Goals1 “Perfect Quote” You know you've achieved perfection in design, Not when you have nothing more to add, But when you have nothing.
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
Java Introduction 劉登榮 Deng-Rung Liu 87/7/15. Outline 4 History 4 Why Java? 4 Java Concept 4 Java in Real World 4 Language Overview 4 Java Performance!?
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
SEC(R) 2008 Intel® Concurrent Collections for C++ - a model for parallel programming Nikolay Kurtov Software and Services.
Java Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
Just-In-Time Java Compilation for the Itanium Processor Tatiana Shpeisman Guei-Yuan Lueh Ali-Reza Adl-Tabatabai Intel Labs.
Fast, Effective Code Generation in a Just-In-Time Java Compiler Rejin P. James & Roshan C. Subudhi CSE Department USC, Columbia.
Automatic Data Partitioning in Software Transactional Memories Torvald Riegel, Christof Fetzer, Pascal Felber (TU Dresden, Germany / Uni Neuchatel, Switzerland)
Flex Compiler Compiler Case Study By Mee Ka Chang.
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
Clone-Cloud. Motivation With the increasing use of mobile devices, mobile applications with richer functionalities are becoming ubiquitous But mobile.
Advanced Programming Collage of Information Technology University of Palestine, Gaza Prepared by: Mahmoud Rafeek Alfarra Lecture 2: Major Concepts of Programming.
O VERVIEW OF THE IBM J AVA J UST - IN -T IME C OMPILER Presenters: Zhenhua Liu, Sanjeev Singh 1.
University of Houston-Clear Lake Proprietary© 1997 Evolution of Programming Languages Basic cycle of improvement –Experience software difficulties –Theory.
Java Virtual Machine Case Study on the Design of JikesRVM.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
1 COMP 3438 – Part II-Lecture 1: Overview of Compiler Design Dr. Zili Shao Department of Computing The Hong Kong Polytechnic Univ.
Buffered dynamic run-time profiling of arbitrary data for Virtual Machines which employ interpreter and Just-In-Time (JIT) compiler Compiler workshop ’08.
1 Fast and Efficient Partial Code Reordering Xianglong Huang (UT Austin, Adverplex) Stephen M. Blackburn (Intel) David Grove (IBM) Kathryn McKinley (UT.
Netprog: Java Intro1 Crash Course in Java. Netprog: Java Intro2 Why Java? Network Programming in Java is very different than in C/C++ –much more language.
1 Optimizing compiler tools and building blocks project Alexander Drozdov, PhD Sergey Novikov, PhD.
ABCD: Eliminating Array-Bounds Checks on Demand Rastislav Bodík Rajiv Gupta Vivek Sarkar U of Wisconsin U of Arizona IBM TJ Watson recent experiments.
We will talking about story of JAVA language. By Kristsada Songpartom.
U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Optimizing Compilers CISC 673 Spring 2009 Overview of Compilers and JikesRVM John.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
1 Garbage Collection Advantage: Improving Program Locality Xianglong Huang (UT) Stephen M Blackburn (ANU), Kathryn S McKinley (UT) J Eliot B Moss (UMass),
Using Types to Analyze and Optimize Object-Oriented Programs By: Amer Diwan Presented By: Jess Martin, Noah Wallace, and Will von Rosenberg.
CSE 598c – Virtual Machines Survey Proposal: Improving Performance for the JVM Sandra Rueda.
Escape Analysis for Java Will von Rosenberg Noah Wallace.
A Region-Based Compilation Technique for a Java Just-In-Time Compiler Toshio Suganuma, Toshiaki Yasue and Toshio Nakatani Presenter: Ioana Burcea.
Vertical Profiling : Understanding the Behavior of Object-Oriented Applications Sookmyung Women’s Univ. PsLab Sewon,Moon.
ECE 750 Topic 8 Meta-programming languages, systems, and applications Automatic Program Specialization for J ava – U. P. Schultz, J. L. Lawall, C. Consel.
Eliminating External Fragmentation in a Non-Moving Garbage Collector for Java Author: Fridtjof Siebert, CASES 2000 Michael Sallas Object-Oriented Languages.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
A Single Intermediate Language That Supports Multiple Implemtntation of Exceptions Delvin Defoe Washington University in Saint Louis Department of Computer.
Object Oriented Programming in
Compositional Pointer and Escape Analysis for Java programs
Threads vs. Events SEDA – An Event Model 5204 – Operating Systems.
Introduction to Compiler Construction
Interpreted languages Jakub Yaghob
Compiler Construction (CS-636)
Compositional Pointer and Escape Analysis for Java Programs
Introduction Enosis Learning.
Java Virtual Machine Complete subject details are available at:
Capriccio – A Thread Model
Introduction Enosis Learning.
Chapter 4: Threads.
Adaptive Code Unloading for Resource-Constrained JVMs
Inlining and Devirtualization Hal Perkins Autumn 2011
Inlining and Devirtualization Hal Perkins Autumn 2009
자바 언어를 위한 정적 분석 (Static Analyses for Java) ‘99 한국정보과학회 가을학술발표회 튜토리얼
Exception Handling.
CSc 453 Interpreters & Interpretation
Presentation transcript:

P ARALLEL P ROCESSING I NSTITUTE · F UDAN U NIVERSITY 1

Outline Motivation Design & Implementation Evaluation Future work 2

The popularity of Java The popularity of Java %

Java! Java! Architecture neutral Simplified memory management Security and Productivity …… 4 Write Once Run Anywhere How to further improve Java runtime performance?

Our Research Leverage the synergy between static and dynamic optimizations Dynamic environment while leveraging static benefits Finding performance opportunities before runtime Static annotation to help runtime optimization 5

Opencj Opencj It is our first milestone in the whole project Develop based on Open64 Takes Java source files or Class files as input Outputs executable code for Linux/IA32&x86-64 Compilation process is similar to compiling C/C++ applications 6

Outline Outline Motivation Design & Implementation Evaluation Future work 7

Design Overview of Opencj Design Overview of Opencj Migrate frontend of gcj into Open64 8

Java exception handling Java exception handling Similar to C++ exception, but has some differences, such as  runtime exceptions: a/0, NullPointerException  No “catch-all” handler used in C++  “finally” mechanism, makes Java exception more complex than C++ The key point of Java exception handling is to record the relationship among try/catch/finally blocks. 9

Devirtualization Easy to reuse code for programmers but hard to analyze for compiler Resolve java virtual function call to promote indirect call into direct call Class hierarchy analysis and Rapid type analysis Devirtualization is implemented at IPA phase Many optimizations can benefit from this transformation In SciMark 2.0 Java benchmark test, it can resolve all 21 user defined virtual function calls. 10

Synchronization elimination Based on Escape Analysis  Flow-insensitive & interprocedural analysis  Connection Graph: captures the connectivity relationship among objects and object references.  Easily determine whether an object is local to a thread.  If a synchronized object is local to a thread, the synchronized operation can be removed 11

Building connect graph Only five kinds of statements 1. p = new P() 2. p = return_new_P() 3. p = q 4. p = q.f 5. p.f = q 12

Analysis process Analysis process Intra-procedural analysis  Check every call graph node to find out whether there is a synchronized call in a PU  Set initial escape state of each reference node Inter-procedural analysis  Start from main function and traverse the call graph in depth-first order  Pass escape states between caller and callee 13

Example 1 Example 1 14 GlobalEscape OutEscape GlobalEscape NoEscape OutEscape

Example 1 Example 1 15 GlobalEscape NoEscape GlobalEscape NoEscape

Example2 16 GlobalEscape ArgEscape NoEscape GlobalEscape

Example2 17 NoEscape GlobalEscape NoEscape

Array bounds check elimination Array bounds check elimination Array bounds check to guarantee Java type- safe execution Prevent many useful code optimizations since array bounds check may raise exceptions Fully elimination: if the check never fails Partial elimination: whenever possible, moves bounds check out of loops 18

Example of ABCE 19

Fully redundant check elimination Example 20 0<=i1<100 jc1

Fully redundant check elimination Example 21

Partial elimination Partial elimination Adopting loop versioning technique to guarantee the exception semantic for Java Set trigger conditions before and after the optimized loop 22

Example Partial redundant check elimination 23

Checks elimination of ABCE 24 Total: the total number checks in the test case PRCE: the number of Partial Redundant Check Elimination FRCE: the number of Fully Redundant Check Elimination ABCE: FPCE+PRCE 28.4% speedup in Scimark2 test, lower than we expected

Outline Motivation Design & Implementation Evaluation Future work 25

Performance gap between Java & C 26 opencj -O3 -IPA -fno-bounds-check opencc -O3 -IPA gcj -O3 -fno-bounds-check -funroll-loops gcc -O3 -funroll-loops higher is better

Static compilation vs JIT 27 higher is better Comparing two Java running modes.  Running in JVM  Running executable file directly

Static compilation vs JIT 28 lower is better JDK 1.6 is best except mpegaudio More analysis work need to do.

Outline Motivation Design & Implementation Evaluation Future work 29

Future Trends – for Java Future Trends – for Java Where is Java headed with its dynamic optimization framework:  Exploring opportunities to achieve performance parity with native code  Online profiling mechanisms and feedback- directed optimizations becoming mainstream  … 30

Java advantages Several studies show that Java could potentially be faster than C/C++ for some reasons:  C/C++ Pointers make optimization difficult  It is easier to do memory management in Java than C/C++ as Java only allocates memory through object instantiation. So Java garbage collectors can achieve better cache coherence  Dynamic compilation of Java can use additional information available at run-time to optimize code more effectively. 31

Future of Opencj Opencj will achieve better runtime performance by using JVM as the execution environment  Static annotation with annotation-aware JIT - Runtime IPA  Using just-in-time compiler - Apply more effective optimizations by profiling run- time information  Using garbage collection - Better performance due to cache coherence There are three steps in our schedule 32

Framework---step1 33

Framework—step2 34

Framework---final 35

Discussion Shin is the leader of this project Q&A 36

P ARALLEL P ROCESSING I NSTITUTE · F UDAN U NIVERSITY 37