IBM Software Group © 2005 IBM Corporation Compilation Technology Toward Deterministic Java Performance Mark Stoodley, Mike Fulton Toronto Lab, IBM Canada.

Slides:



Advertisements
Similar presentations
Borland Optimizeit™ Profiler for the Microsoft .NET Framework
Advertisements

Programming Technologies, MIPT, April 7th, 2012 Introduction to Binary Translation Technology Roman Sokolov SMWare
Compilation Technology Oct. 16, 2006 © 2006 IBM Corporation Software Group Reducing Startup Costs of Java Applications with Shared Relocatable Code Derek.
Model for Supporting High Integrity and Fault Tolerance Brian Dobbing, Aonix Europe Ltd Chief Technical Consultant.
Object Oriented Programming with Java (150704).   Applet  AWT (Abstract Window Toolkit)  Japplet  Swing Types of Applet.
1 © NOKIA Nokia Research Center / Performance Data Collection: Hybrid Approach Edu Metz, Raimondas Lencevicius Software Performance Architecture.
Online Performance Auditing Using Hot Optimizations Without Getting Burned Jeremy Lau (UCSD, IBM) Matthew Arnold (IBM) Michael Hind (IBM) Brad Calder (UCSD)
IBM Software Group © 2004 IBM Corporation Compilation Technology Java Synchronization : Not as bad as it used to be! Mark Stoodley J9 JIT Compiler Team.
Copyright © 2001Page Real-Time Java Fact-no-fiction Java in technical automation Paul Wijntjes Consultant Turnkiek Technical Systems.
0 Parallel and Concurrent Real-time Garbage Collection Part I: Overview and Memory Allocation Subsystem David F. Bacon T.J. Watson Research Center.
Aarhus University, 2005Esmertec AG1 Implementing Object-Oriented Virtual Machines Lars Bak & Kasper Lund Esmertec AG
Compilation Technology October 17, 2005 © 2005 IBM Corporation Software Group Reducing Compilation Overhead in J9/TR Marius Pirvu, Derek Inglis, Vijay.
© Andy Wellings, 2004 Roadmap  Introduction  Concurrent Programming  Communication and Synchronization  Completing the Java Model  Overview of the.
Programming Language Semantics Java Threads and Locks Informal Introduction The Java Specification Language Chapter 17.
Chapter 13 Embedded Systems
© Andy Wellings, 2003 Roadmap  Introduction  Concurrent Programming  Communication and Synchronization  Completing the Java Model  Overview of the.
Chapter 11 Operating Systems
PathExpander: Architectural Support for Increasing the Path Coverage of Dynamic Bug Detection S. Lu, P. Zhou, W. Liu, Y. Zhou, J. Torrellas University.
© 2007 IBM Corporation IBM Software Group September 26, 2007 Tactics for Minimal Interference from Class Loading in Real-Time Java™ The 5th International.
1 Chapter 13 Embedded Systems Embedded Systems Characteristics of Embedded Operating Systems.
© Andy Wellings, 2004 Roadmap  Introduction  Concurrent Programming  Communication and Synchronization  Completing the Java Model  Overview of the.
Memory Management for Real-Time Java Wes Beebee and Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology Supported by: DARPA.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 1 Real-time Systems 1.
Embedded Java Research Geoffrey Beers Peter Jantz December 18, 2001.
Adaptive Optimization in the Jalapeño JVM M. Arnold, S. Fink, D. Grove, M. Hind, P. Sweeney Presented by Andrew Cove Spring 2006.
Timing and Race Condition Verification of Real-time Systems Yann–Hang Lee, Gerald Gannod, and Karam Chatha Dept. of Computer Science and Eng. Arizona State.
Real-Time Software Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
P ARALLEL P ROCESSING I NSTITUTE · F UDAN U NIVERSITY 1.
© 2012 IBM Corporation Rational Insight | Back to Basis Series Chao Zhang Unit Testing.
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 13Slide 1 Architectural Design u Establishing the overall structure of a software system.
Real-Time Java Martin Schöberl. Real Time Java2 Overview What are real-time systems Real-time specification for Java RTSJ issues, subset Real-time profile.
1 소프트웨어공학 강좌 Chap 11. Real-time software Design - Designing embedded software systems whose behaviour is subject to time constraints -
Compilation Technology © 2007 IBM Corporation CGO Performance Overheads In Real-Time Java Programs Mark Stoodley and Mike Fulton Compilation.
Distributed Real- Time in the RTSJ Andrew Borg. Presentation RMI – A brief introduction The RTSJ – A (very) brief introduction The DRTSJ – The 3 Levels.
Real-Time Java on JOP Martin Schöberl. Real-Time Java on JOP2 Overview RTSJ – why not Simple RT profile Scheduler implementation User defined scheduling.
Software Performance Testing Based on Workload Characterization Elaine Weyuker Alberto Avritzer Joe Kondek Danielle Liu AT&T Labs.
Buffered dynamic run-time profiling of arbitrary data for Virtual Machines which employ interpreter and Just-In-Time (JIT) compiler Compiler workshop ’08.
Java Threads 11 Threading and Concurrent Programming in Java Introduction and Definitions D.W. Denbo Introduction and Definitions D.W. Denbo.
Instructore: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Concurrent and.
Enhancements to Java for Real Time Systems Theresa Dsena CSE Fall 2006 Prof. Ganesan.
IBM Software Group, Compilation Technology © 2007 IBM Corporation Some Challenges Facing Effective Native Code Compilation in a Modern Just-In-Time Compiler.
Reference: Ian Sommerville, Chap 15  Systems which monitor and control their environment.  Sometimes associated with hardware devices ◦ Sensors: Collect.
1 Programming Languages and the Software Production Process Informal Cardelli’s metrics of programming languages fitness to real-time applications: Economy.
Slide 1 Chapter 11 Real –time Software Designs. Slide 2 Real-time systems l Systems which monitor and control their environment l Inevitably associated.
1 G53SRP: Introduction to Real Time Specification for Java (RTSJ) Chris Greenhalgh School of Computer Science Including material © Andy Wellings from his.
EEL The Real-Time Specification for Java (1)
Real Time Programming Language. Intro A programming language represents the nexus of design and structure. But misuse of the programming language can.
©Ian Sommerville, Robin Abraham 2004CS 361, Summer 2004 Slide 1 Real-time Software Design.
U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Optimizing Compilers CISC 673 Spring 2009 Dynamic Compilation I John Cavazos University.
Real-time Software Design King Saud University College of Computer and Information Sciences Department of Computer Science Dr. S. HAMMAMI.
CSCI1600: Embedded and Real Time Software Lecture 18: Real Time Languages Steven Reiss, Fall 2015.
System Components ● There are three main protected modules of the System  The Hardware Abstraction Layer ● A virtual machine to configure all devices.
CSC Multiprocessor Programming, Spring, 2012 Chapter 11 – Performance and Scalability Dr. Dale E. Parson, week 12.
Colors In This Template Useful for testing projectors during setup.
Error Handling Tonga Institute of Higher Education.
For a good summary, visit:
Workload Scheduler plug-in for JSR 352 Java Batch IBM Workload Scheduler IBM.
CSC 331 Object Oriented Programming Using Java
Introduction to the CVM and the Timesys RI
Runtime Analysis of Hotspot Java Virtual Machine
Real-time Software Design
CSCI1600: Embedded and Real Time Software
Wake Up and Smell the Coffee: Evaluation Methodology for the 21st Century May 4th 2017 Ben Lenard.
Adaptive Code Unloading for Resource-Constrained JVMs
Inlining and Devirtualization Hal Perkins Autumn 2011
Real Time Java : Synchronization
CSCI1600: Embedded and Real Time Software
(Computer fundamental Lab)
Nikola Grcevski Testarossa JIT Compiler IBM Toronto Lab
Presentation transcript:

IBM Software Group © 2005 IBM Corporation Compilation Technology Toward Deterministic Java Performance Mark Stoodley, Mike Fulton Toronto Lab, IBM Canada Ltd.

IBM Software Group © 2005 IBM Corporation Compilation Technology The Real-Time World  Responsive in “real time” –Often keyed to real world events –Performing work on a regular basis –Asynchronous events –Graceful handling of truly exceptional conditions  Deterministic performance key to meet response time requirements  Java performance not really responsive as-is –But it’s a nice development environment –Motivates the Real-Time Specification for Java

IBM Software Group © 2005 IBM Corporation Compilation Technology Overview  Real-Time Java  Java performance isn’t really deterministic  Mitigating the Chaos  Summary

IBM Software Group © 2005 IBM Corporation Compilation Technology Real-Time Java  JSR #1: Real-Time Specification for Java  Facilities to support Real-Time programming –Make performance more controllable & predictable –Large-scale enhancements to Java Threading, scheduling Memory management Asynchronous event handling, control transfer, termination Physical memory access

IBM Software Group © 2005 IBM Corporation Compilation Technology Example 1: Memory Management  SPEC assumes that managed memory (garbage collection) is incompatible with real-time needs  New memory areas that are not collected –Immortal memory –Memory scopes  New thread type “No Heap Realtime Thread” –Not permitted to even see a heap reference –No need to stop for any reason when GC occurs

IBM Software Group © 2005 IBM Corporation Compilation Technology Java performance isn’t really deterministic  Chaos lurks everywhere: üThread scheduling is at the whim of the operating system üGarbage collection occurs “whenever” for “however long” –JIT compilations occur “whenever” for “however long” –Aggressive JITs recompile methods that seem “hot” –JIT compilers employ many speculative optimizations –Class loading occurs on demand

IBM Software Group © 2005 IBM Corporation Compilation Technology Mitigating the JIT Chaos: stop doing “bad” stuff  JIT compiling delays are unacceptable –Also derivative effects: profiling, sampling –Could run at low priority BUT risk priority inversion  Ahead-of-Time (AOT) compilation a better option –Takes compiler out of the run-time performance equation –Possibly lower performance to deal with resolution order –Derivative effects also removed –BUT maybe more difficult to achieve high performance

IBM Software Group © 2005 IBM Corporation Compilation Technology Mitigating the JIT Chaos: stop doing “bad” stuff  Stop doing speculative optimizations –No flat-word monitors Also simplifies priority-inversion support –No monitor coarsening –Profiling-based optimizations –Not easy because JIT compilers speculate a LOT  Devirtualization ok if all classes are pre-loaded

IBM Software Group © 2005 IBM Corporation Compilation Technology Mitigating the JIT Chaos: stop doing “bad” stuff  Class loading is a trouble spot –Loading one class often requires loading other classes –Once class is loaded, devirtualizations may be invalid Lots of call sites may need to be patched for correctness –Updates many VM data structures also accessed by GC Particularly a problem for NoHeapRealtimeThreads  Application-level pre-loading is one option –Collect list of loaded classes in one execution –“Force” class to load before application begins executing

IBM Software Group © 2005 IBM Corporation Compilation Technology Summary  Java not suitable as-is for Real-Time workloads  Real-Time Specification enhances Java for RT  Java VMs have many sources of nondeterminism –GC, thread scheduling, JIT compiler  These problems can be largely mitigated –Ahead-of-Time compiles, class preloading, stop doing speculative optimizations –Lower sustained performance but more deterministic

IBM Software Group © 2005 IBM Corporation Compilation Technology Contact Information and Acknowledgments Mark Stoodley Toronto Lab, IBM Canada Ltd. With thanks to: Mike Fulton

IBM Software Group © 2005 IBM Corporation Compilation Technology Backup Slides

IBM Software Group © 2005 IBM Corporation Compilation Technology Example 2: Asynchronous Transfer of Control (ATC)  RT programs need to respond to truly exceptional conditions quickly and drastically  Thread that detects condition may need to interrupt other threads actively working  ATC provides facilities to mark methods that can be safely interrupted –More draconian exception semantics in such methods  Also mechanisms to initiate such interruptions