Thesis Proposal) Overview

Total Page:16

File Type:pdf, Size:1020Kb

Thesis Proposal) Overview YETI: Gradually Extensible Trace Interpreter Mathew Zaleski, University of Toronto [email protected] (thesis proposal) Overview ‣Introduction • Background • Efficient Interpretation • Our Approach to Mixed-Mode Execution • Results and Discussion Thesis Proposal Jan 2006 2 Why so few JIT compilers? • Complex JIT infrastructure built in “big bang”, before any generated code can run. • Rather than incrementally extend the interpreter, typical JITs is built alongside. • The code generator of current JIT compilers makes little provision to reuse the interpreter. • The method-orientation of most JITs means that cold code is compiled with hot. ‣ Interpreters should be more gradually extensible to become dynamic compilers. Thesis Proposal Jan 2006 3 Problems with current practice • Packaging of virtual instruction bodies is: • Inefficient: Interpreters slowed by branch misprediction • Non-reusable: JIT compilers must implement all virtual instructions from scratch • Method orientation of a JIT compiler forces it to compile cold code along with hot. • Code compiled cold requires complex runtime to perform late binding if it runs. • Recompiling cold code that becomes hot requires complex recompilation infrastructure. Thesis Proposal Jan 2006 4 Our Approach • Branch prediction problems of interpretation can be addressed by calling the virtual bodies. • Can speed up interpretation significantly. • Enables generated code to call the bodies. • JIT need not support all virtual instructions. • Complexity of compiling cold code can be side stepped by compiling dynamically selected regions that contain only hot code. • We describe how compiling traces allows us to compile only hot code and link on newly hot regions as they emerge. ‣ Enables gradual enhancement of interpreter Thesis Proposal Jan 2006 5 Overview of Contribution method based interpretation JIT • Callable bodies make for efficient interpretation. efficiency big bang • Reuse of callable bodies challenges development from generated code smooths “big bang”. • A trace oriented JIT reuse callable compiler is a simple and callable bodies bodies/traces promising architecture. YETI Thesis Proposal Jan 2006 6 Gradual extension of VM xTraces - compile all virtual instructions ✔ Traces- just integer x instructions compiled irtual instructions V SUB Basic Traces - sub dispatch interpreter Blocks x x x Size and Complexity of Compiled Code Regions Larger regions. More instructions compiled. Thesis Proposal Jan 2006 7 Result preview - Efficient Interpretation • Branch misprediction dealt with by calling Subroutine Threading the bodies from region of generated code. 1.0 Threading 0.8 0.90 • Relative to Direct 0.81 0.82 Threaded VM 0.6 0.63 0.4 • Geo mean 0.2 Java SpecJVM98 0 • Relative to Direct benchmarks va/P4 ja va/PPC Ocaml benchmarks ja ocaml/P4 • ocaml/PPC Thesis Proposal Jan 2006 8 Result preview - Trace based JIT • Geom mean SPECJVM98 Java/PPC970 relative to Sun Hotspot JIT 6 5.9 SABVM 5.7 • 5 • Selective inlining 4 4.3 Modified JamVM. 3 • 2 TR-LINK = traces,no JIT • 1 • JIT = trace, JIT Relative to Sun Hotspot 0 • Only 50 integer JIT SABVM bytecodes TR-LINK • Promising start Thesis Proposal Jan 2006 9 Background & Related Work Ertl & Gregg Branch misprediction Piumarta & Riccardi Selective inlining Parrot (perl6) Callable bodies Vitale, Abdelrahman Catenation, Tcl Bala, Duesterwald, Banerjia Dynamo Bruening, Garnett ,Amarasinghe Dynamo Rio Whaley Partial methods Gal, Probst, Franz Hotpath, Trace-based JIT Suganuma,Yasue,Nkatani Region based compilation Hozle, Chambers, Ungar Self Many Java, JVM and JIT authors Java Thesis Proposal Jan 2006 10 Overview •Introduction ‣ Background: ‣ Dynamo & Traces ‣ Interpretation • Our Approach to Mixed-Mode Execution • Results and Discussion Thesis Proposal Jan 2006 11 HP Dynamo • Trace-oriented dynamic optimization system. • HP PA-8000 computers. • Counter-Intuitive approach: • Don’t execute optimized binary interpret it. • Count transits of reverse branches. • Trace-generate (next slide). • Dispatch traces when encountered. • Soon, most execution from trace cache. • faster than binary on hardware of the day! Thesis Proposal Jan 2006 12 Trace with if-then-else //c => b2 if (c) c b1; • Trace is path else b1 b2 followed by program b2; b3; b3 • Conditional branches become trace exits. c texit b1 • Do not expect trace b2 exits to be taken. b3 Thesis Proposal Jan 2006 13 Overview •Introduction ‣ Background: • Dynamo & Traces ‣ Interpretation • Efficient Interpretation • Our Approach • Selecting Regions • Results and Discussion Thesis Proposal Jan 2006 14 Virtual Program Java Java Source Bytecode int f(boolean); int f(boolean parm){ Code: if (parm){ 0: iload_1 return 42; Javac 1: ifeq 7 }else{ compiler 4: bipush 42 return 0; 6: ireturn 7: iconst_0 } 8: ireturn } Thesis Proposal Jan 2006 15 Interpreter Loaded fetch execute Program Load dispatch Parms Internal Bytecode Representation bodies Execution Cycle Thesis Proposal Jan 2006 16 Switched Interpreter vPC = internalRep; while(1){ switch(*vPC++){ case iload_1: .. break; case ifeq: .. break; //and many more.. } }; slow. Burdened by switch and loop overhead. Thesis Proposal Jan 2006 17 Call Threaded Interpreter void iload_1(){ //push load 1 vPC++; } void ifeq(){ //change vPC vPC++; } static int *vPC = internalRep; interp(){ while(1){ (*vPC)(); } }; slow. burdened by function pointer call Thesis Proposal Jan 2006 18 Direct Threaded Interpreter iload_1: .. goto *vPC++; ifeq: -Execution of int f(boolean); if () vPC= Code: goto *vPC++; virtual program 0: iload_1 bipush: .. “threads” 1: ifeq 7 goto *vPC++; 4: bipush 42 ireturn: through bodies 6: ireturn .. 7: iconst_0 goto *vPC++; 8: ireturn iconst_0: .. goto *vPC++; ireturn: .. goto *vPC++; ‣ Good: one dispatch branch taken per body Thesis Proposal Jan 2006 19 Context Problem iload_1: .. goto *vPC++; ifeq: int f(boolean); if () vPC= Code: goto *vPC++; Virtual PC predicts 0: iload_1 bipush: destination. .. 1: ifeq 7 goto *vPC++; 4: bipush 42 ireturn: 6: ireturn .. Hardware PC 7: iload_1 goto *vPC++; 8: ireturn iconst_0: insufficient context .. goto *vPC++; ireturn: .. goto *vPC++; ‣ Bad: hardware has no context to predict dispatch Thesis Proposal Jan 2006 20 Overview ✓ Introduction ✓ Background ‣ Efficient Interpretation • Our Approach to Mixed-Mode Execution • Results and Discussion Thesis Proposal Jan 2006 21 Virtual Program Java Java Source Bytecode int f(boolean); int f(boolean parm){ Code: if (parm){ 0: iload_1 return 42; Javac 1: ifeq 7 }else{ compiler 4: bipush 42 return 0; 6: ireturn 7: iconst_0 } 8: ireturn } Thesis Proposal Jan 2006 22 Direct Threaded Interpreter … vPC DTT iload_1: iload_1 &&iload_1 .. ifeq 7 &&ifeq goto *vPC++; bipush 42 +4 ifeq: ireturn &&bipush if () vPC= iconst_0 42 goto *vPC++; ireturn &&ireturn … &&iconst_0 bipush: &&ireturn .. goto *vPC++; Virtual DTT - Direct C implementation Program Threading Table of each body DTT maps vPC to implementation Thesis Proposal Jan 2006 23 Context Problem iload_1: .. goto *vPC++; ifeq: int f(boolean); if () vPC= Code: goto *vPC++; Virtual PC predicts 0: iload_1 bipush: destination. .. 1: ifeq 7 goto *vPC++; 4: bipush 42 ireturn: 6: ireturn .. Hardware PC 7: iload_1 goto *vPC++; 8: ireturn iconst_0: insufficient context .. goto *vPC++; ireturn: .. goto *vPC++; ‣ Bad: hardware has no context to predict dispatch Thesis Proposal Jan 2006 24 Essence of Subroutine Threading DTT Context Threading Table ret terminated CTT call iload_1 iload_1: 4 .. call ifeq asm(ret); call bipush 42 call ireturn ifeq: vPC=.. call iconst_0 goto *vPC; call ireturn virtual branches as points to generated direct code Package bodies as subroutines and call them Thesis Proposal Jan 2006 25 Context Threading (CT) -- Generating specialized code in CTT call iload_1 vPC subl inlined code movl ;pop stack for if_eq 4 cmpl ;compare 0 jne movl ; vPC = jmp ; else context for addl ; vPC += conditional call bipush branches call ireturn DTT call iconst_0 call ireturn Specialized bodies can also be generated in CTT! Thesis Proposal Jan 2006 26 CT Performance !"#$%&'()*+',#*-.#(,#/)0 Subroutine Branch Inlining Tiny Inlining 1.00 ,"+ 0.75 /0#)%*'12 0.50 !"#$%&'()*+ 0.25 -'#).,+ 0.00 4 c 4 c /p p /p p a /p l /p v a m l a v a m j a c a j o c o ‣ CT! 1%2*is an&#$3)'4%#* efficient interpretation'5*#66#$&'7#* technique/)8*.#)#2/9* CThesisontext Th rProposaleading Jan 2006 24 27 Overview ✓ Introduction ✓ Background: Interpretation & traces ✓ Efficient Interpretation ‣ Our Approach to Mixed-Mode Execution • Selecting Regions • Results and Discussion Thesis Proposal Jan 2006 28 Gradually Extensible Trace Interpreter Three main enablers: 1. Bodies organized as callable routines so executable regions can efficiently mix compiled code and dispatched bodies. 2. The DTT can point to variously shaped execution units. 3. Efficient, flexible instrumentation. Thesis Proposal Jan 2006 29 1. Bodies are callable Packaging bytecode bodies as lightweight subroutines means that they can be efficiently called from generated code iload_1: call iload_1 .. call iload_1 ret; specialized code for iadd istore: call istore_1 .. ret; ‣ Needn’t build all virtual instructions all in one shot. Thesis Proposal Jan 2006 30 2. DTT always points to implementation ..of corresponding execution unit vPC iload_1: .. ret; DTT call iload_1 call iload_1 JIT compiled code istore: for iadd .. call istore_1 ret; ‣ DTT indirection enables any shape of execution unit to be dispatched. Thesis Proposal Jan 2006 31 3. Flexible, Efficient Instrumentation A dispatcher describes an execution unit while(1){ //dispatch
Recommended publications
  • WEP12 Writing TINE Servers in Java
    Proceedings of PCaPAC2005, Hayama, Japan WRITING TINE SERVERS IN JAVA Philip Duval and Josef Wilgen Deutsches Elektronen Synchrotron /MST Abstract that the TINE protocol does not deal so much with ‘puts’ The TINE Control System [1] is used to some degree in and ‘gets’ as with data ‘links’. all accelerator facilities at DESY (Hamburg and Zeuthen) One’s first inclination when offering Java in the and plays a major role in HERA. It supports a wide Control System’s portfolio is to say that we don’t need to variety of platforms, which enables engineers and worry about a Java Server API since front-end servers machine physicists as well as professional programmers will always have to access their hardware and that is best to develop and integrate front-end server software into the left to code written in C. Furthermore, if there are real- control system using the operating system and platform of time requirements, Java would not be an acceptable their choice. User applications have largely been written platform owing to Java’s garbage collection kicking in at for Windows platforms (often in Visual Basic). In the next indeterminate intervals. generation of accelerators at DESY (PETRA III and Nevertheless, Java is a powerful language and offers VUV-FEL), it is planned to write the TINE user- numerous features and a wonderful framework for applications primarily in Java. Java control applications avoiding and catching nagging program errors. Thus have indeed enjoyed widespread acceptance within the there does in fact exist a strong desire to develop control controls community. The next step is then to offer Java as system servers using Java.
    [Show full text]
  • A Post-Apocalyptic Sun.Misc.Unsafe World
    A Post-Apocalyptic sun.misc.Unsafe World http://www.superbwallpapers.com/fantasy/post-apocalyptic-tower-bridge-london-26546/ Chris Engelbert Twitter: @noctarius2k Jatumba! 2014, 2015, 2016, … Disclaimer This talk is not going to be negative! Disclaimer But certain things are highly speculative and APIs or ideas might change by tomorrow! sun.misc.Scissors http://www.underwhelmedcomic.com/wp-content/uploads/2012/03/runningdude.jpg sun.misc.Unsafe - What you (don’t) know sun.misc.Unsafe - What you (don’t) know • Internal class (sun.misc Package) sun.misc.Unsafe - What you (don’t) know • Internal class (sun.misc Package) sun.misc.Unsafe - What you (don’t) know • Internal class (sun.misc Package) • Used inside the JVM / JRE sun.misc.Unsafe - What you (don’t) know • Internal class (sun.misc Package) • Used inside the JVM / JRE // Unsafe mechanics private static final sun.misc.Unsafe U; private static final long QBASE; private static final long QLOCK; private static final int ABASE; private static final int ASHIFT; static { try { U = sun.misc.Unsafe.getUnsafe(); Class<?> k = WorkQueue.class; Class<?> ak = ForkJoinTask[].class; example: QBASE = U.objectFieldOffset (k.getDeclaredField("base")); java.util.concurrent.ForkJoinPool QLOCK = U.objectFieldOffset (k.getDeclaredField("qlock")); ABASE = U.arrayBaseOffset(ak); int scale = U.arrayIndexScale(ak); if ((scale & (scale - 1)) != 0) throw new Error("data type scale not a power of two"); ASHIFT = 31 - Integer.numberOfLeadingZeros(scale); } catch (Exception e) { throw new Error(e); } } } sun.misc.Unsafe
    [Show full text]
  • Free Java Developer Room
    Room: AW1.121 Free Java Developer Room Saturday 2008-02-23 14:00-15:00 Welcome to the Free Java Meeting Welcome and introduction to the projects, people and themes that make Rich Sands – Mark Reinhold – Mark up the Free Java Meeting at Fosdem. ~ GNU Classpath ~ OpenJDK Wielaard – Tom Marble 15:00-16:00 Mobile Java Take your freedom to the max! Make your Free Java mobile. Christian Thalinger - Guillaume ~ CACAO Embedded ~ PhoneME ~ Midpath Legris - Ray Gans 16:00-16:40 Women in Java Technology Female programmers are rare. Female Java programmers are even more Clara Ko - Linda van der Pal rare. ~ Duchess, Ladies in Java Break 17:00-17:30 Hacking OpenJDK & Friends Hear about directions in hacking Free Java from the front lines. Roman Kennke - Andrew Hughes ~ OpenJDK ~ BrandWeg ~ IcePick 17:30-19:00 VM Rumble, Porting and Architectures Dalibor Topic - Robert Lougher - There are lots of runtimes able to execute your java byte code. But which Peter Kessler - Ian Rogers - one is the best, coolest, smartest, easiest portable or just simply the most fun? ~ Kaffe ~ JamVM ~ HotSpot ~ JikesRVM ~ CACAO ~ ikvm ~ Zero- Christian Thalinger - Jeroen Frijters assembler Port ~ Mika - Gary Benson - Chris Gray Sunday 2008-02-24 9:00-10:00 Distro Rumble So which GNU/Linux distribution integrates java packages best? Find out Petteri Raty - Tom Fitzsimmons - during this distro shootout! ~ Gentoo ~ Fedora ~ Debian ~ Ubuntu Matthias Klose 10:00-11:30 The Free Java Factory OpenJDK and IcedTea, how are they made and how do you test them? David Herron - Lillian Angel - Tom ~ OpenJDK ~ IcedTea Fitzsimmons 11:30-13:00 JIT Session: Discussion Topics Dynamically Loaded Want to hear about -- or talk about -- something the Free Java world and don't see a topic on the agenda? This time is reserved for late binding Tom Marble discussion.
    [Show full text]
  • Fedora Core, Java™ and You
    Fedora Core, Java™ and You Gary Benson Software Engineer What is Java? The word ªJavaº is used to describe three things: The Java programming language The Java virtual machine The Java platform To support Java applications Fedora needs all three. What Fedora uses: GCJ and ECJ GCJ is the core of Fedora©s Java support: GCJ includes gcj, a compiler for the Java programming language. GCJ also has a runtime and class library, collectively called libgcj. The class library is separately known as GNU Classpath. ECJ is the Eclipse Compiler for Java: GCJ©s compiler gcj is not used for ªtraditionalº Java compilation. More on that later... Why libgcj? There are many free Java Virtual machines: Cacao, IKVM, JamVM, Jikes RVM, Kaffe, libgcj, Sable VM, ... There are two main reasons Fedora uses libgcj: Availability on many platforms. Ability to use precompiled native code. GNU Classpath Free core class library for Java virtual machines and compilers. The JPackage Project A collection of some 1,600 Java software packages for Linux: Distribution-agnostic RPM packages. Both runtimes/development kits and applications. Segregation between free and non-free packages. All free packages built entirely from source. Multiple runtimes/development kits may be installed. Fedora includes: JPackage-compatible runtime and development kit packages. A whole bunch of applications. JPackage JOnAS Fedora©s Java Compilers gcj can operate in several modes: Java source (.java) to Java bytecode (.class) Java source (.java) to native machine code (.o) Java bytecode (.class, .jar) to native machine code (.o) In Fedora: ECJ compiles Java source to bytecode. gcj compiles that bytecode to native machine code.
    [Show full text]
  • Towards Architectural Programming of Embedded Systems
    Towards Architectural Programming of Embedded Systems Arne Haber, Jan O. Ringert, Bernhard Rumpe Software Engineering, RWTH Aachen University, Germany http://www.se-rwth.de/ Abstract: Integrating architectural elements with a modern programming language is essential to ensure a smooth combination of architectural design and programming. In this position statement, we motivate a combination of architectural description for distributed, asynchronously communicating systems and Java as an example for such an integration. The result is an ordinary programming language, that exhibits archi- tecture, data structure and behavior within one view. Mappings or tracing between different views is unnecessary. A prototypical implementation of a compiler demon- strates the possibilities and challenges of architectural programming. 1 Java with Architectural Elements As stated in [MT00] there are a number of languages that support design, analysis, and further development of software-system-architectures. These languages are commonly known as Architecture Description Languages (ADL) and allow a high level description of software systems of a specific domain. Using an ADL enables reasoning about specific system properties in an early development stage [GMW97]. Furthermore, there are quite often mappings from architecture to a General Purpose Language (GPL), producing code frames for the GPL. This helps ensuring the architectural consistency initially, but when the code evolves the architecture becomes implicitly polluted or when the architecture shall be evolved this needs to be done on the code level. Tracing is therefore important to keep architecture and code aligned. However, it would be much better to integrate both, architecture and code into one single artifact such that tracing is not necessary anymore.
    [Show full text]
  • Virtual Machines Due Date: 6/3 Demo Date: 6/4
    INF 212 Analysis of Programming Languages Project 8 – Virtual Machines Due date: 6/3 Demo date: 6/4 Goal: Get acquainted with a virtual machine. Similarly to the type checking homework, the concrete task in this homework is very simple, but it requires you to analyze and understand an existing Java VM implementation. The task is just a means to the end goal, and not the goal in itself. In process of achieving the goal, students with Windows machines will get the extra benefit of getting acquainted with another kind of virtual machine: an entire operating system virtual machine. For this one, you will not be looking inside, you will only install and use it. Students with Macs and Linux will not need this (and hence miss the opportunity to use it...). Description You will be using JamVM, an open source Java virtual machine (http://jamvm.sourceforge.net/). Start by downloading the latest release. In this project you will create new Opcodes for JamVM. Opcodes 248-255 are unused by JamVM and thus are the Opcodes that you will be adding additional functionality for. A testcase is provided for you (here). Since the compiler will not be aware of your new opcodes, you will need to edit your .class files manually using a binary/hex editor if you wish to create different test cases. The new opcodes will replace the IADD opcode during a standard arithmetic expression. For an expression x + y you need to replace the byte representing IADD (60 in hexadecimal) with the value of the new opcode.
    [Show full text]
  • Icedtea and Icedtea-Web
    IcedTea and IcedTea-Web Andrew Overholt Principal Software Engineer Red Hat Canada 2011-11-03 1 ● IcedTea Persistent index will always show current point ● OpenJDK vs JDK ● What? ● Who? ● Why? JavaOne Slide Template Title ● Future ● IcedTea-Web Agenda ● What? ● History ● Why? ● Features ● Future ● Questions This presentation is designed to be used with audio as a primary mode of content delivery. If you have downloaded it, see notes section for rough notes on applicable slides (draft quality). For pdf, it should be at the end of the slide deck. OpenJDK vs JDK ● IcedTea ● OpenJDK vs JDK ● Deployment tools ● What? ● Serviceability tools ● Who? ● Why? ● HotSpot Virtual machine ● Future ● Interpreter ● JIT compiler ● IcedTea-Web JDK ● What? ● Tools (javac, javadoc, etc.) ● History OpenJDK ● Why? ● Class libraries ● Features Closed ● ● Future Public API 95%+ 5%+ ● Questions + Last heard, for OpenJDK7 and JDK7 What is IcedTea? ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? …... ● Future ● IcedTea-Web ● What? ● History ● Why? ● Features IcedTea ● Future ● Questions Image sources: http://www.openclipart.org/detail/22436 http://www.openclipart.org/detail/22712 Some of the users... ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Future ● IcedTea-Web ● What? ● History ● Why? (IcedTea-Web only) ● Features ● Future ● Questions Some of the contributors... ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Future ● IcedTea-Web ● What? ● History ● Why? (IcedTea-Web only) ● Features ● Future (Indirectly through OpenJDK) ● Questions All logos are copyright by their respective owners Why was IcedTea created? ● IcedTea ● OpenJDK vs JDK ● What? ● Who? ● Why? ● Future ● IcedTea-Web Build ● What? ● History ● Why? ● Features (For the first release...) ● Future ● Questions Image sources: http://www.openclipart.org/detail/30223 To fix the build..
    [Show full text]
  • GNU Classpath
    GNU Classpath Core Classes for a Diversity of Java Virtual Machines February 2004 ■ Sascha Brawer [email protected] http://www.dandelis.ch/people/brawer/ ■ Mark Wielaard [email protected] http://www.klomp.org/mark/ Overview ■ Overview – Motivation – Anatomy of a Java-like system – Documentation, Quality assurance, Releases ■ Demo ■ Details – Current state – VMs using GNU Classpath ■ How you can help 2 Motivation ■ Currently, most free software is written in C The Good The Bad The Ugly Close to hardware Easy to make bugs Libraries not Fast execution, even Lacks “modern” well integrated with bad compilers language concepts Difficult to learn Large code base, (“modern” = 1980’ies) many libraries Hard to write Ubiquitous portable code 3 Motivation ■ Java is a good foundation for many projects – Type-safety ● Avoids many typical bugs, crashes, security problems ● More opportunities for optimizing compilers – Modular, object-oriented, concurrent, dynamic – Easier to write structured, portable code – Very rich library, reasonably well designed (mostly) – Large developer base (“COBOL of the 1990’ies”) ● There exist lots of other good (even better?) languages: Oberon, Eiffel, O’Caml, Haskell, Erlang, TOM, Cedar, ... ● But: They have not many free applications/libraries 4 Motivation ■ But: Java does not solve every problem – Over-hyped as a solution to everything – Bad reputation for wasting resources (CPU, RAM) ● It is easy to write inefficient programs ● Early implementations were very slow ● Type-safety and memory management have their cost – Often over-estimated: Array bounds checking (→ no buffer overflows) costs ~2% execution time, avoids ~50% security-related bugs – Syntax similar to C++ → not very easy to learn 5 Motivation ■ Java is a compromise Why GNU Will Be – Not necessarily ideal, Compatible with UNIX but reasonable Unix is not my ideal system, but it is not too bad.
    [Show full text]
  • By Mathew Zaleski a Thesis Submitted in Conformity with the Requirements
    YETI: A GRADUALLYEXTENSIBLE TRACE INTERPRETER by Mathew Zaleski A thesis submitted in conformity with the requirements for the degree of Doctor of Philosophy Graduate Department of Computer Science University of Toronto Copyright c 2007 by Mathew Zaleski ii Abstract YETI: a graduallY Extensible Trace Interpreter Mathew Zaleski Doctor of Philosophy Graduate Department of Computer Science University of Toronto 2007 The implementation of new programming languages benefits from interpretation because it is simple, flexible and portable. The only downside is speed of execution, as there remains a large performance gap between even efficient interpreters and systems that include a just-in- time (JIT) compiler. Augmenting an interpreter with a JIT, however, is not a small task. Today, Java JITs are typically method-based. To compile whole methods, the JIT must re-implement much functionality already provided by the interpreter, leading to a “big bang” development effort before the JIT can be deployed. Adding a JIT to an interpreter would be easier if we could more gradually shift from dispatching virtual instructions bodies implemented for the interpreter to running instructions compiled into native code by the JIT. We show that virtual instructions implemented as lightweight callable routines can form the basis for a very efficient interpreter. Our new technique, interpreted traces, identifies hot paths, or traces, as a virtual program is interpreted. By exploiting the way traces predict branch desti- nations our technique markedly reduces branch mispredictions caused by dispatch. Interpreted traces are a high-performance technique, running about 25% faster than direct threading. We show that interpreted traces are a good starting point for a trace-based JIT.
    [Show full text]
  • The Openjdk Project? How Is It Run? How Can I Contribute? Where Now and Next?
    TheThe OpenJDKOpenJDK ProjectProject PastPast AndAnd PresentPresent Andrew Dinn Red Hat Open Source Java Team March 2014 1 Andrew Dinn AgendaAgenda What Is the OpenJDK Project? How Is It Run? How Can I Contribute? Where Now and Next? 2 Andrew Dinn AgendaAgenda What Is the OpenJDK Project? How Is It Run? How Can I Contribute? Where Now and Next? 3 Andrew Dinn What Is The OpenJDK Project? ● The Open Source Java project ● Started by Sun in 2006 ● Released Hotspot JVM and Class Library (JDK) ● under GPL ● with Classpath Exception ● Still basis of Sun/Oracle proprietary Java ● Other contributors include ● Red Hat, SAP, IBM ● http://openjdk.java.net 4 Andrew Dinn What Is The OpenJDK Project? (2) ● Distributes mainline OpenJDK releases ● JDK9 (dev) ● JDK8, JDK7 (update) ● JDK6 (Oracle eol – security patches only) ● Produces many OpenJDK versions/variants ● ports ● operating system – Linux/Windows/AIX/Solaris/OSX/BSD ● cpu – x86_32/x86_64/AArch64/ppc/SPARC/zero ● R&D variants ● Lambda, DaVinci, Jigsaw, Graal, Sumatra 5 Andrew Dinn What Else Is OpenJDK? ● The Reference Implementation of Java SE ● Strictly only since JDK7 ● Java SE based on Java Language Spec ● available online or as a printed book ● Each JDK defined by JCP using JSRs ● R&D projects pave the way for new JSRs ● Conformance ensured by JCK ● Every JSR required to provide a TCK ● JCK freely available for GPL derived works ● But not to other Free java projects 6 Andrew Dinn What is IcedTea? Original code base included non-free code ● provided as binary 'plugs' ● Red Hat IcedTea replaced plugs with free code ● with help from Sun/Oracle and others ● Free OpenJDK6 in June 2008 ● Free OpenJDK7 in April 2009 ● Most widely distributed Free Java runtime ● Initially patch-based ● Download OpenJDK as release bundles ● patch src + make tree then build 7 Andrew Dinn What Else is IcedTea? OpenJDK7+ code is now fully free ● IcedTea src/make tree changes upstreamed ● Red Hat now build OpenJDK from cloned repositories ● pull down upstream changes ● still maintain variant code base to support .
    [Show full text]
  • Guideline Document and Peripheral Input/Output Libraries for Developments
    Keeping Emulation Environments Portable FP7-ICT-231954 Guideline document and peripheral input/output libraries for developments Deliverable number D 5.1 Nature Other Dissemination level PU Delivery date Due: M8 (September 2009) Actual: M8 (September 2009) Status Final Workpackage number WP5 Lead beneficiary UPHEC Author(s) Antonio Ciuffreda, UPHEC David Anderson, UPHEC Janet Delve, UPHEC Getaneh Agegn Alemu, UPHEC Dan Pinchbeck, UPHEC Bram Lohman,TSSP David Michel, TSSP Bart Kiers, KB Vincent Joguin, JOG D 5.1 Guideline document and peripheral input/output libraries for developments Document history Revisions Version Date Author Changes 0.1 3 September 2009 Bram Lohman Sections 3.2 and 3.3 0.2 5 September 2009 Vincent Joguin Section 3.3 0.3 11 September 2009 David Michel Sections 1.2, 2.1, 2.2, 2.3, 3.1.1, 3.1.2, 3.1.4, 3.2, 3.3, 4.2.1 and 4.2.7 0.4 15 September 2009 Vincent Joguin Executive Summary, Abbreviations, Sections 3.1.1 and 3.1.4 0.5 15 September 2009 David Anderson Executive Summary, Abbreviations, Sections 1, 2, 3 and 4 Reviews Date Name Result 23/09/2009 Jean Marc Saffroy Approved with changes 29/09/2009 Jeffrey van der Hoeven Approved with changes Signature/Approval Approved by (signature) Date Accepted by at European Commission (signature) Date KEEP_WP5_D5.1_Guideline-Document-and-Peripheral-Input-Output-Libraries-for-Developments_v1.0.doc 2/23 D 5.1 Guideline document and peripheral input/output libraries for developments Executive Summary This report presents the initial integration strategy of the KEEP Emulation Access Platform (EAP) components, with a focus on the methodologies used to integrate the Core Emulation Framework (CEF) with the Olonys Virtual Machine (VM), the Front-end Emulation Framework (FEF) and external web services.
    [Show full text]
  • Implementation and Evaluation of Fast Untyped Memory in a Java Virtual Machine
    Implementation and Evaluation of Fast Untyped Memory in a Java Virtual Machine Study Thesis in Computer Science by Isabella Thomm born October 2, 1983, in Vaihingen a.d. Enz Department of Computer Science Distributed Systems and Operating Systems University of Erlangen-Nuremberg Tutors: Dipl. Inf. Andreas Gal Dipl. Inf. Christian Wawersich Prof. Dr.-Ing. W. Schroder-Preikschat¨ Prof. Michael Franz Begin: April 1, 2006 Submission: July 15, 2006 2 Implementierung und Auswertung von schnellem untypisiertem Speicher in einer Java Virtual Machine Studienarbeit im Fach Informatik vorgelegt von Isabella Thomm geb. am 2. Oktober 1983 in Vaihingen a.d. Enz Angefertigt am Lehrstuhl fur¨ Informatik 4 (Verteilte Systeme und Betriebssysteme) Friedrich-Alexander-Universitat¨ Erlangen-Nurnberg¨ Betreuer: Dipl. Inf. Andreas Gal Dipl. Inf. Christian Wawersich Prof. Dr.-Ing. W. Schroder-Preikschat¨ Prof. Michael Franz Beginn der Arbeit: 1. April 2006 Abgabe der Arbeit: 15. Juli 2006 4 5 Ich versichere, dass ich die Arbeit ohne fremde Hilfe und ohne Benutzung anderer als der angegebenen Quellen angefertigt habe, und dass die Arbeit in gleicher oder ahnlicher¨ Form noch keiner anderen Prufungsbeh¨ orde¨ vorgelegen hat und von dieser als Teil einer Prufungsleistung¨ angenommen wurde. Alle Ausfuhrungen,¨ die wortlich¨ oder sinngemass¨ ubernommen¨ wurden, sind als solche gekennzeichnet. Erlangen, den 15. Juli 2006 6 Abstract The Java virtual machine (JVM) was developed to execute bytecode programs written in the object-oriented Java programming language and is part of the Java runtime en- vironment (JRE). Virtual machines allow the execution of programs in a controlled environment. JVMs are available for all prevalent platforms. JSim is an emulator, that allows to execute legacy applications on modern host architectures by simulating a legacy instruction set architecture (guest architecture) on top of the Java virtual machine.
    [Show full text]