Dynamo: A Transparent Dynamic Optimization System Bala, Dueterwald, and Banerjia www.hpl.hp.com/cambridge/ projects/Dynamo.

Slides:



Advertisements
Similar presentations
Chapt.2 Machine Architecture Impact of languages –Support – faster, more secure Primitive Operations –e.g. nested subroutine calls »Subroutines implemented.
Advertisements

8. Code Generation. Generate executable code for a target machine that is a faithful representation of the semantics of the source code Depends not only.
Overview Motivations Basic static and dynamic optimization methods ADAPT Dynamo.
OS Fall’02 Virtual Memory Operating Systems Fall 2002.
Prof. Necula CS 164 Lecture 141 Run-time Environments Lecture 8.
Program Representations. Representing programs Goals.
Programming Types of Testing.
Memory Management Questions answered in this lecture: How do processes share memory? What is static relocation? What is dynamic relocation? What is segmentation?
Snick  snack A Working Computer Slides based on work by Bob Woodham and others.
CS 536 Spring Run-time organization Lecture 19.
Virtual Memory Chapter 8. Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
3/17/2008Prof. Hilfinger CS 164 Lecture 231 Run-time organization Lecture 23.
Paging and Virtual Memory. Memory management: Review  Fixed partitioning, dynamic partitioning  Problems Internal/external fragmentation A process can.
The Procedure Abstraction Part I: Basics Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412.
JVM-1 Introduction to Java Virtual Machine. JVM-2 Outline Java Language, Java Virtual Machine and Java Platform Organization of Java Virtual Machine Garbage.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
MEMORY MANAGEMENT By KUNAL KADAKIA RISHIT SHAH. Memory Memory is a large array of words or bytes, each with its own address. It is a repository of quickly.
Demand Paging Virtual memory = indirect addressing + demand paging –Without demand paging, indirect addressing by itself is valuable because it reduces.
1 Software Testing and Quality Assurance Lecture 31 – SWE 205 Course Objective: Basics of Programming Languages & Software Construction Techniques.
Dynamic Hardware Software Partitioning A First Approach Komal Kasat Nalini Kumar Gaurav Chitroda.
COP4020 Programming Languages
Computers: Software Patrice Koehl Computer Science UC Davis.
Dynamic Optimization as typified by the Dynamo System See “Dynamo: A Transparent Dynamic Optimization System”, V. Bala, E. Duesterwald, and S. Banerjia,
A Portable Virtual Machine for Program Debugging and Directing Camil Demetrescu University of Rome “La Sapienza” Irene Finocchi University of Rome “Tor.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
The Procedure Abstraction Part I: Basics Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412.
A Simple Two-Pass Assembler
MEMORY MANAGEMENT Presented By:- Lect. Puneet Gupta G.P.C.G. Patiala.
JIT in webkit. What’s JIT See time_compilation for more info. time_compilation.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Lecture 10 : Introduction to Java Virtual Machine
Computer Systems Organization CS 1428 Foundations of Computer Science.
“Dynamo: A Transparent Dynamic Optimization System ” V. Bala, E. Duesterwald, and S. Banerjia, PLDI 2000 “Dynamo: A Transparent Dynamic Optimization System.
Microcode Source: Digital Computer Electronics (Malvino and Brown)
CS 147 June 13, 2001 Levels of Programming Languages Svetlana Velyutina.
CSc 453 Final Code Generation Saumya Debray The University of Arizona Tucson.
Memory Management Techniques
Lengthening Traces to Improve Opportunities for Dynamic Optimization Chuck Zhao, Cristiana Amza, Greg Steffan, University of Toronto Youfeng Wu Intel Research.
1.  10% Assignments/ class participation  10% Pop Quizzes  05% Attendance  25% Mid Term  50% Final Term 2.
Online partial evaluation of bytecodes (3)
Virtual Machines, Interpretation Techniques, and Just-In-Time Compilers Kostis Sagonas
Memory Management Operating Systems CS550. Memory Manager Memory manager - manages allocation and de-allocation of main memory Plays significant impact.
Replicating Memory Behavior for Performance Skeletons Aditya Toomula PC-Doctor Inc. Reno, NV Jaspal Subhlok University of Houston Houston, TX By.
Computer Architecture 2 nd year (computer and Information Sc.)
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
Chapter 1 Introduction. Chapter 1 -- Introduction2  Def: Compiler --  a program that translates a program written in a language like Pascal, C, PL/I,
Trace Fragment Selection within Method- based JVMs Duane Merrill Kim Hazelwood VEE ‘08.
Swap Space and Other Memory Management Issues Operating Systems: Internals and Design Principles.
Full and Para Virtualization
By: Cheryl Mok & Sarah Tan. Java is partially interpreted. 1. Programmer writes a program in textual form 2. Runs the compiler, which converts the textual.
NETW3005 Memory Management. Reading For this lecture, you should have read Chapter 8 (Sections 1-6). NETW3005 (Operating Systems) Lecture 07 – Memory.
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
Programming Language Concepts (CIS 635) Elsa L Gunter 4303 GITC NJIT,
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Hello world !!! ASCII representation of hello.c.
Operating Systems A Biswas, Dept. of Information Technology.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Introduction to Operating Systems
Why to use the assembly and why we need this course at all?
SOFTWARE DESIGN AND ARCHITECTURE
ENERGY 211 / CME 211 Lecture 25 November 17, 2008.
OS Virtualization.
Lecture 28: Virtual Memory-Address Translation
Virtual Machines (Introduction to Virtual Machines)
Other ISAs Next, we’ll first we look at a longer example program, starting with some C code and translating it into our assembly language. Then we discuss.
Other ISAs Next, we’ll first we look at a longer example program, starting with some C code and translating it into our assembly language. Then we discuss.
PROGRAM AT RUNTIME Subject code: CSCI-620
CSc 453 Final Code Generation
Dynamic Binary Translators and Instrumenters
Presentation transcript:

Dynamo: A Transparent Dynamic Optimization System Bala, Dueterwald, and Banerjia projects/Dynamo

What is Dynamo? Dynamic translation = quick & dirty virtual-to-native translation + focused native-to-native optimization of the most frequently executed portions of the translated code Dynamo focuses on the latter component

Motivation for Dynamo? Programs typically spend most of their execution time in a small fraction of program code Optimizing code at translation-time can be counterproductive Dynamo allows for implementation of a quick virtual-to-native optimizer while letting the native-to-native optimizer clean up the translated code “hot” at runtime.

Dynamo Implementation The native-to-native optimizer is implemented as a software layer tightly coupled to the CPU hardware

How does Dynamo work? Dynamo operates at runtime Interprets an application’s instructions via a native instruction interpreter Activates counter for application addresses satisfying a start of trace condition—an address reached by taking a backward branch in the application

Establishing “Hot” traces If a start of trace is referred to again in the program, Dynamo goes into the fragment cache thus suspending itself and resuming native execution of the program. Key: when an address becomes “hot”, it is statistically likely that the very next sequence of interpreted instructions will also be “hot”. When a counter is “hot”, the interpreter changes state and goes into trace selection mode.

What is done with hot traces? Once selected the instructions are converted into a low-level IR (intermediate representation). Next, a lightweight optimizer processes the IR to create a fragment—a single-entry, multi- exit sequence of instructions laid out contiguously in memory. Finally, a linker emits the fragment code to the fragment cache and links it with others in the cache

Continued… The linker also gives a linker stub at the bottom of each fragment for each taken branch in the fragment. If the branch cannot be found in the fragment cache then it is set to jump to its corresponding linker stub which invokes Dynamo’s interpretive loop. Once a fragment is put into the fragment cache and linked, the hot counter is recycled, thus allowing Dynamo to control the counter storage amount used for trace selection.

The above illustrates the trace selection, fragment formation, and fragment linking processes in terms of application flow

Optimization Results for Dynamo

Dynamo’s Worst-Case Scenario Designed to be an adaptive system, Dynamo can adjust its thresholds based on the changing behavior of the program running on top. This allows Dynamo to bail out of the overhead of its own operation—allowing the input program to run directly on the machine. (typical result is break even)

What’s Next? The eventual goal is to run applications that use Dynamo as a backend to optimize dynamically generated code. Virtual Machines being the primary focus.