EMSOFT’02 Silicomp Research Institute JCOD 1 JCOD A Lightweight Modular Compilation Technology For Embedded Java Bertrand Delsart :

Slides:



Advertisements
Similar presentations
Why Have The OSGi Specifications Been Based On Java Technology ? By Peter Kriens, CEO aQute OSGi Technology Officer
Advertisements

New Security Issues Raised by Open Cards Pierre GirardJean-Louis Lanet GERMPLUS R&D.
IBM JIT Compilation Technology AOT Compilation in a Dynamic Environment for Startup Time Improvement Kenneth Ma Marius Pirvu Oct. 30, 2008.
In Review JAVA C++ GUIs - Windows Webopedia.com.
Lecture 16 Buffer Overflow modified from slides of Lawrie Brown.
Overview Motivations Basic static and dynamic optimization methods ADAPT Dynamo.
ASU Real-Time Operating System. Supervised by: Dr. Mohammed Sobh.
The road to reliable, autonomous distributed systems
Aarhus University, 2005Esmertec AG1 Implementing Object-Oriented Virtual Machines Lars Bak & Kasper Lund Esmertec AG
Andrea Camesi, Jarle Hulaas Software Engineering Laboratory Swiss Federal Institute of Technology in Lausanne (EPFL) Switzerland.
Java for High Performance Computing Jordi Garcia Almiñana 14 de Octubre de 1998 de la era post-internet.
Programming Language Semantics Java Threads and Locks Informal Introduction The Java Specification Language Chapter 17.
CS533 Concepts of OS Class 16 ExoKernel by Constantia Tryman.
COP4020 Programming Languages
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
Embedded Java Research Geoffrey Beers Peter Jantz December 18, 2001.
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 Security. Topics Intro to the Java Sandbox Language Level Security Run Time Security Evolution of Security Sandbox Models The Security Manager.
By Mihir Joshi Nikhil Dixit Limaye Pallavi Bhide Payal Godse.
A Portable Virtual Machine for Program Debugging and Directing Camil Demetrescu University of Rome “La Sapienza” Irene Finocchi University of Rome “Tor.
Sadegh Aliakbary Sharif University of Technology Spring 2011.
P ARALLEL P ROCESSING I NSTITUTE · F UDAN U NIVERSITY 1.
German National Research Center for Information Technology Research Institute for Computer Architecture and Software Technology German National Research.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
JIT in webkit. What’s JIT See time_compilation for more info. time_compilation.
C# Overview and Features. Content I.History of C# II.Architecture III.How to install IV.Features V.Code Sample VI.Microsoft.NET Platform VII.Why use C#
Analyzing parallel programs with Pin Moshe Bach, Mark Charney, Robert Cohn, Elena Demikhovsky, Tevi Devor, Kim Hazelwood, Aamer Jaleel, Chi- Keung Luk,
7. Just In Time Compilation Prof. O. Nierstrasz Jan Kurs.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
February 24, 1998Salt Lake Java SIG Processes In Java Patrick Tullmann Flux Research Group University of Utah.
Buffered dynamic run-time profiling of arbitrary data for Virtual Machines which employ interpreter and Just-In-Time (JIT) compiler Compiler workshop ’08.
Java 2 security model Valentina Casola. Components of Java the development environment –development lifecycle –Java language features –class files and.
CPRG 215 Introduction to Object-Oriented Programming with Java Module 1-Introduction to Java Topic 1.1 Basics of Java Produced by Harvey Peters, 2008 Copyright.
CS533 Concepts of Operating Systems Jonathan Walpole.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 7 OS System Structure.
Middleware for FIs Apeego House 4B, Tardeo Rd. Mumbai Tel: Fax:
XOberon Operating System CLAUDIA MARIN CS 550 Fall 2005.
Compilers for Embedded Systems Ram, Vasanth, and VJ Instructor : Dr. Edwin Sha Synthesis and Optimization of High-Performance Systems.
CSCI1600: Embedded and Real Time Software Lecture 18: Real Time Languages Steven Reiss, Fall 2015.
A Dynamic Operating System for Sensor Nodes Chih-Chieh Han, Ram Kumar, Roy Shea, Eddie Kohler, Mani, Srivastava, MobiSys ‘05 Oct., 2009 발표자 : 김영선, 윤상열.
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.
Vertical Profiling : Understanding the Behavior of Object-Oriented Applications Sookmyung Women’s Univ. PsLab Sewon,Moon.
Introduction to Programming 1 1 2Introduction to Java.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Introduction to JAVA Programming
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Applications Active Web Documents Active Web Documents.
Object Oriented Programming in
Interpreted languages Jakub Yaghob
Chapter 1 Introduction to Computers, Programs, and Java
Lecture 1 Runtime environments.
Runtime Analysis of Hotspot Java Virtual Machine
CMPE419 Mobile Application Development
2.1. Compilers and Interpreters
Improving java performance using Dynamic Method Migration on FPGAs
Chapter 3: Windows7 Part 1.
Mark Claypool and Jonathan Tanner Computer Science Department
Adaptive Code Unloading for Resource-Constrained JVMs
Allen D. Malony Computer & Information Science Department
CSCI1600: Embedded and Real Time Software
The Design & Implementation of Hyperupcalls
Outline Chapter 2 (cont) OS Design OS structure
Lecture 1 Runtime environments.
An XML-based System Architecture for IXA/IA Intercommunication
CMPE419 Mobile Application Development
JIT Compiler Design Maxine Virtual Machine Dhwani Pandya
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

EMSOFT’02 Silicomp Research Institute JCOD 1 JCOD A Lightweight Modular Compilation Technology For Embedded Java Bertrand Delsart : Vania Joloboff : Eric Paire : Silicomp Research Institute

EMSOFT’02 Silicomp Research Institute JCOD 2 Plan Java and JIT compilers JCOD solution Dynamic profiling Experimental results

EMSOFT’02 Silicomp Research Institute JCOD 3 Java Advantages –Productivity gain (GC, object oriented) –Portability (CPU + OS) –Mobility (dynamic loading, security…) –Code size Drawback –Performance

EMSOFT’02 Silicomp Research Institute JCOD 4 Improving performance Use native methods for the critical parts Generate optimized bytecode Replace the interpreter by a dedicated hardware Transform the bytecode into native code –before installation : Ahead Of Time and / or –during execution : Just In Time SRI works on both compilation techniques

EMSOFT’02 Silicomp Research Institute JCOD 5 Just In Time compilers Compile the byte code just before its first execution Advantage –Preservation of dynamic loading and mobility Drawbacks –Compilation delay –Compilation resources –Code size expansion

EMSOFT’02 Silicomp Research Institute JCOD 6 JCOD solution Compilation delay  start in interpreted mode Compilation resources  compile on a remote compilation server Code size expansion  optimize the compiled code size  select the best compilation candidates Java Compilation On Demand

EMSOFT’02 Silicomp Research Institute JCOD 7 Remote mechanism Support JVM independent compilers Use a downloadable JVM dependent plug-in Already handle : –remote administration –remote debugging –reconnection 100 % Java Extensions : secure protocol, code mobility …

EMSOFT’02 Silicomp Research Institute JCOD 8 Code size optimizations Favor code size over performance Use a library for complex bytecodes (64 bits, lookupswitch, tableswitch…) Share prelude and postlude (synchronization, call traces, stack handling, …) Share wrappers for external calls (exception delivery, call backs, …) …

EMSOFT’02 Silicomp Research Institute JCOD 9 Method selection At least test several policies during our research If possible after deployment, allow –other policies by third parties –tailoring of the policy for a kind application or platform flexible, programmable but efficient policies

EMSOFT’02 Silicomp Research Institute JCOD 10 Profiling Java objet –Profiling information efficiently gathered for one or more methods –Notification mechanism for some events (enter, exit, “interesting method” …) Programmable notification listeners Flexible notification policy

EMSOFT’02 Silicomp Research Institute JCOD 11 Decision Maker (in Java) Control the profiling mechanism –Associate interpreted methods with a profiling object –Select the notification policy of each profiling object Handle the profiling information –Asynchronously parse the profiling objects –Provide the notifications listeners for each kind of profiling object

EMSOFT’02 Silicomp Research Institute JCOD 12 Example of policies Cruise mode select a method only when interpreting more than X bytecode/s Exit sampling “promote” the N th executed method, or the current method when the interpreter has parsed X bytecodes Asynchronous focused profiling 1) starts with a single profiling object 2) allocate a methodData for “interesting” methods 3) asynchronously select the best profiling object

EMSOFT’02 Silicomp Research Institute JCOD 13 Cost of method calls callee caller interpretedcompiled interpreted12.5 compiled x10

EMSOFT’02 Silicomp Research Institute JCOD 14 Lion’s share rule 90% of the time is spent in 10% of the code Compile the “hotspots” –bytecode inside a loop –methods called often (…by a loop) But detect them without a per method history to reduce the memory consumption rely on cross calls to identify method called often

EMSOFT’02 Silicomp Research Institute JCOD 15 Profiling information and notifiers increase the considered set thanks to data in a global profiling object (efficiently updated on method exit ) : –number of interaction with compiled methods –interpretation cost due to loops –interpretation cost (for sampling, …) –number of execution (for sampling, …) decide thanks to per method profiling object and : –global interpretation cost (to detect the cruise mode, …) –number of interaction with interpreted methods (to avoid cross calls) the notifiers receives the caller ID to let complex decision maker build a call graph

EMSOFT’02 Silicomp Research Institute JCOD 16 Notifiers Global interpretation cost overflow Exit notifier : –methodData interpretation cost overflow –After the N th executions : NOTIFY_EXIT_ALL_METHODS NOTIFY_EXIT_ON_CROSSCALL NOTIFY_EXIT_ON_LOOP (Enter notifier)

EMSOFT’02 Silicomp Research Institute JCOD 17 Experimental results : overhead Small support code in ROM on the VM (  20 K) Negligible CPU profiling overhead Small memory overhead for profiling information thanks to the focusing techniques Small memory overhead for the compiled code Huge compilation delay due to the remote features … but not critical since compilation is asynchronous

EMSOFT’02 Silicomp Research Institute JCOD 18 Experimental results : efficiency Taking the worst case for the compiler : –Acceleration factor : x4 –Code size expansion : x3 And the lion’s share rule (90% CPU in 10% code) –Performance : x3 (100s  10 + (90 / 4) = 32.5s) –Memory : x1.2 (100K  90 + (10 x 3) = 120K)

EMSOFT’02 Silicomp Research Institute JCOD 19 Conclusion Efficient profiling Low cost solution Portable and extensible –JVM independent compiler in Java –CPU independent JVM resolver in Java –High level profiling in Java Already repackaged to work in AOT mode !