optimizing compilers cisc 673 spring 2009 dynamic compilation i
Skip this Video
Download Presentation
Optimizing Compilers CISC 673 Spring 2009 Dynamic Compilation I

Loading in 2 Seconds...

play fullscreen
1 / 15

Optimizing Compilers CISC 673 Spring 2009 Dynamic Compilation I - PowerPoint PPT Presentation

  • Uploaded on

Optimizing Compilers CISC 673 Spring 2009 Dynamic Compilation I. John Cavazos University of Delaware. Quiz Time. What’s a managed language ?. Quiz Time. What’s a managed language ? Java or C# Runs under management of a VM Object Oriented, Garbage collected Dynamic compilation.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about ' Optimizing Compilers CISC 673 Spring 2009 Dynamic Compilation I' - portia-benson

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
quiz time
Quiz Time

What’s a managed language?

quiz time1
Quiz Time

What’s a managed language? Java or C#

  • Runs under management of a VM
  • Object Oriented, Garbage collected
  • Dynamic compilation
quiz time2
Quiz Time

True or False?

  • Because they execute at runtime, dynamiccompilers must be blazingly fast?
  • Dynamic class loading is a fundamental roadblock to cross-method optimization?
  • A static compiler will always produce better code than a dynamic compiler?
  • Sophisticated profiling is too expensive to perform online?
what is a vm1
What is a VM?

A software execution engine that provides a machine-independent language implementation

what s in a vm for a managed language1
What’s in a VM for a Managed Language?
  • Program loader
  • Program “checkers”, e.g., bytecode verifiers, security services
  • Dynamic compilation system
  • Memory management
  • Thread scheduler
  • Profiling & monitoring
  • Libraries
basic vm structure
Basic VM Structure


Executing Program

Class Loader, Verifier, etc.


Thread Scheduler

Dynamic Compilation Subsystem

Garbage Collector

adaptive optimization hall of fame
Adaptive Optimization Hall of Fame
  • 1958-1962: LISP
  • 1974: Adaptive Fortran
  • 1980-1984: ParcPlace Smalltalk
  • 1986-1994: Self
  • 1995-present: Java
quick history of vms
Quick History of VMs
  • Adaptive Fortran [Hansen’74]
    • First in-depth exploration of adaptive optimization
    • Selective optimization, models, multiple optimization levels, online profiling and control systems
  • LISP Interpreters [McCarthy’78]
    • First widely used VM
    • Pioneered VM services
      • memory management,
      • Eval -> dynamic loading
quick history of vms1
Quick History of VMs
  • ParcPlace Smalltalk[Deutsch&Schiffman’84]
    • First modern VM
    • Introduced full-fledge JIT compiler
    • Demonstrated software-only VMs were viable
  • Self [Chambers&Ungar’91, Hölzle&Ungar’94]
    • Developed many advanced VM techniques
    • Introduced polymorphic inline caches, on-stack replacement, dynamic de-optimization, advanced selective optimization, type prediction and splitting, profile-directed inlining integrated with adaptive recompilation
quick history of vms2
Quick History of VMs
  • Java/JVM [Gosling, Joy, Steele ‘96]
    • First VM with mainstream market penetration
    • Java vendors embraced and improved Smalltalk and Self technology
    • Encouraged VM adoption by others → CLR
promise of dynamic optimization
Promise of Dynamic Optimization
  • Compilation tailored to current execution context performs better than ahead-of-time compiler
promise of dynamic optimization1
Promise of Dynamic Optimization
  • Common wisdom: C will always be better
  • Proof?
    • Not much
    • One interesting comparison: VM performace
      • HotSpot, J9, Apache DRLVM written in C
      • Jikes RVM, Java-in-Java
      • 1999: they performed with in 10%
      • 2007: Jikes RVM ~20% slower than HotSpot & J9, Jikes RVM ~60-0% faster Apache DRLVM
        • Aside: GCC code 20-10% slower than product compilers