SlideShare a Scribd company logo
1 of 42
Download to read offline
Dan Heidinga, J9 VM Interpreter Lead
Daniel_Heidinga@ca.ibm.com
@DanHeidinga
18 September 2016
J9: Under the Hood of the
Next Open Source JVM
Important disclaimers
 THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY.
 WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION
CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED.
 ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED
ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR
INFRASTRUCTURE DIFFERENCES.
 ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE.
 IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT
PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE.
 IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT
OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION.
 NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF:
– CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS
OR THEIR SUPPLIERS AND/OR LICENSORS
2
Who am I?
 I've been involved with virtual machine development at IBM
since 2007 and am now the J9 Virtual Machine Team Lead.
J9 is IBM's independent implementation of the JVM.
 I've represented IBM on both the JSR 292 ('invokedynamic')
and JSR 335 ('lambda') expert groups and lead J9's
implementation of both JSRs.
 I’ve also maintain the bytecode verifier and deal with various
other parts of the runtime.
3
High performance
High reliability
Serviceability
J9: IBM’s Java Virtual Machine
4
OS
JVM
Middle ware
User application
J9: IBM’s Java Virtual Machine scales
5
J9 Architecture
6
SE 7
Operating system
Native
applications
OS-specific calls
Virtual machine
SE 6
Garbage collector
Interpreter
Exception handler
Class loader
Pluggable components
that dynamically load
into the virtual machine
Thread model
JVM Profiler
Debugger
Port Library (file IO, sockets, memory allocation)
Uses 1 of many Java
platform configurations
JCL natives
JNI
Calls to
C
libraries
CDC
MIDP
Java calls
JNI, INL, Fastcall
TR JIT
CLDC
VM
Interface
Zip, fdlibm
Java
VM
Classes
PERFORMANCE !
Java6
SR16 FP4
Java 6.1
SR8 FP4
Java 7
SR9
Java 7.1
SR3
Java 8
SR1
Apache Spark 1.4 Daytrader3 Linux Intel
Envy/Developer: J9’s Smalltalk Roots
Virtual machines on oscilloscopes?
“Lots” of ROM, very little RAM
https://upload.wikimedia.org/wikipedia/commons/7/7
e/Tektronix_TDS210_Oscilloscope.jpg
Data dominates. If you've chosen the right data
structures and organized things well, the algorithms
will almost always be self-evident. Data structures,
not algorithms, are central to programming.
– Rob Pike
10
You want me to interpret that?
11
You want me to interpret that?
Constant offsets
Fast access
Easy to find constant_pool start
12
Relative offsets
Variable sized arrays
Variable sized entries
Slow access to specific index
Conversion to ROM
13
Classfile Static
Verification
ROMClassROM Class
Builder
Essential Classfile data
Position independent (SRP)
Less variable than a Classfile
Still variable, but structured
From ROM to RAM
15
RAM Creation
Load superclases
Load superinterfaces
Calculate vtable
ROMClass J9RAMClass
 Live pointers, not SRPs
 Pointer to the ROMClass
 Live data
 Describes the shape of
this class in this VM.
 Requires its entire
hierarchy and interfaces
to be loaded.
Classloading: tying it all together
17
ROMClass J9RAMClass
J9ClassLoader
java.lang.Class java.lang.ClassLoader
Heap
Native
Bytecode loaded? Check
18
ROMClass
J9RAMClass
stack=2, locals=1, args_size=1
0: getstatic #2
3: ldc #3
5: invokevirtual #4
8: return
Threading
19
J9VMThreadJ9VMThreadJ9JavaVM
omrthread_t omrthread_t omrthread_t
Heap
Native
java.lang.Thread java.lang.Thread java.lang.Thread
SP
A0
PC
Method
Per-Thread Interpreter State
20
J9VMThread
omrthread_t
java.lang.Thread
J9Method
ROMMethod
Bytecodes
SP
A0
PC
Method
Per-Thread Interpreter State
21
J9VMThread
omrthread_t
java.lang.Thread
J9Method
ROMMethod
Bytecodes
SP
A0
PC
Method
Per-Thread Interpreter State
22
J9VMThread
omrthread_t
java.lang.Thread
Pending
Frame
Temps
Args
Java stack
J9Method
ROMMethod
Bytecodes
0
Interpreter
 Written in C++
 Switch statement / computed goto
 Executes:
– bytecodes
– INLs
– builds stack frames
 Transition to the JIT
23
Primordial Call-in frame
24
JIT
Interpreter
Callin frame
Helpers
….
SharedClasses: ROM pays off
JVM 1 JVM 2 JVM 3
SharedClasses: ROM pays off
JVM 1 JVM 2 JVM 3
SharedClasses: ROM pays off
JVM 1 JVM 2 JVM 3
Shared Classes
Cache
SharedClasses: “dynamic” AOT
Shared Classes
Cache
AOTROM Classes
Diagnostic tools
 Diagnostic information (-Xdump)
– Java dump (javacore)
– Heap dump
– System dump (core)
– JIT dump
 Tracepoints (-Xtrace)
 bin/jdmpview –core <corefile>
29
J9: Meet IBM’s OpenJDK distro
Oracle JDK
JCL
Hotspot
Open JDK
JCL
Hotspot
IBM JDK JCL
IBM J9
+ IBM JCL
J9: Meet IBM’s OpenJDK & OMR distro
OMR
Oracle JDK
JCL
Hotspot
Open JDK
JCL
Hotspot
IBM JDK JCL
IBM J9
OMR
+ IBM JCL + IBM OMR
Build an open reusable language runtime foundation for cloud
platforms
– To accelerate advancement and innovation
– In full cooperation with existing language communities
– Engaging a diverse community of people interested in language
runtimes
• Professional developers
• Researchers
• Students
• Hobbyists
Eclipse OMR Mission
http://www.eclipse.org/omr
https://github.com/eclipse/omr
https://developer.ibm.com/open/omr/
Dual License:
Eclipse Public License V1.0
Apache 2.0
Users and contributors very welcome
https://github.com/eclipse/omr/blob/master/CONTRIBUTING.md
Eclipse OMR
Created March 2016
OMR components
port platform abstraction (porting) library
thread cross platform pthread-like threading library
vm APIs to manage per-interpreter and per-thread contexts
gc garbage collection framework for managed heaps
compiler extensible compiler framework
jitbuilder WIP project to simplify bring up for a new JIT compiler
omrtrace library for publishing trace events for monitoring/diagnostics
omrsigcompat signal handling compatibility library
example demonstration code to show how a language runtime might
consume OMR components, also used for testing
fvtest language independent test framework built on the example glue so that
components can be tested outside of a language runtime,
uses Google Test 1.7 framework
+ a few others
~800KLOC at this point, more components coming!
OpenJ9: Meet an OpenJDK & OMR distro
OpenJ9
OMR OMR
Open JDK
JCL
OpenJ9
OMR
Oracle JDK
JCL
Hotspot
Open JDK
JCL
Hotspot
IBM JDK JCL
IBM J9
OMR
+ IBM isms
OpenJ9: Meet an OpenJDK & OMR distro
OpenJ9
OMR OMR
Open JDK
JCL
OpenJ9
OMR
Oracle JDK
JCL
Hotspot
Open JDK
JCL
Hotspot
IBM JDK JCL
IBM J9
OMR
+ IBM isms
OMR & OpenJ9: note the arrow direction!
Open projects as the upstream repos
IBM JDK is a CONSUMER of OpenJ9
37
“We believe open ecosystems
and partnerships are key to our
future innovation.”
-- Ginni Rometty
(http://www.ibm.com/annualreport/2014/chairmans-letter.html)
38
Collaboration
Competition
Polyglot
Platforms
Really? Why are you doing this?
When
39
Soon
When
40
Goal: release concurrently
with Java 9
41
Legal Notice
IBM and the IBM logo are trademarks or registered trademarks of IBM Corporation, in the United States, other
countries or both.
Java and all Java-based marks, among others, are trademarks or registered trademarks of Oracle in the United
States, other countries or both.
Other company, product and service names may be trademarks or service marks of others.
THE INFORMATION DISCUSSED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL
PURPOSES ONLY. WHILE EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND
ACCURACY OF THE INFORMATION, IT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, AND IBM SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT
OF THE USE OF, OR OTHERWISE RELATED TO, SUCH INFORMATION. ANY INFORMATION
CONCERNING IBM'S PRODUCT PLANS OR STRATEGY IS SUBJECT TO CHANGE BY IBM WITHOUT
NOTICE.
• IBM is open sourcing its J9 JVM technology
– Includes Testarossa Just in Time (JIT) compiler
• Eclipse OMR project is leading edge: github.com/eclipse/omr
– Project created March 7, 2016 : ~300KLOC
– Compiler contributed September 16, 2016 : ~500KLOC
• Open J9 project is also coming
– We’re working on it at same time as Java 9 development
Open source

More Related Content

What's hot

#JavaOne What's in an object?
#JavaOne What's in an object?#JavaOne What's in an object?
#JavaOne What's in an object?Charlie Gracie
 
Google ART (Android RunTime)
Google ART (Android RunTime)Google ART (Android RunTime)
Google ART (Android RunTime)Niraj Solanke
 
JavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVMJavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVMPaulThwaite
 
A Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceA Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceTim Ellison
 
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...PaulThwaite
 
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]David Buck
 
Install MariaDB on IBM i - Tips, troubleshooting, and more
Install MariaDB on IBM i - Tips, troubleshooting, and moreInstall MariaDB on IBM i - Tips, troubleshooting, and more
Install MariaDB on IBM i - Tips, troubleshooting, and moreRod Flohr
 
Automation framework design and implementation
Automation framework design and implementationAutomation framework design and implementation
Automation framework design and implementationgaoliang641
 
Sys ml helperprofile-rhapsody813-obtainandinstall-v1
Sys ml helperprofile-rhapsody813-obtainandinstall-v1Sys ml helperprofile-rhapsody813-obtainandinstall-v1
Sys ml helperprofile-rhapsody813-obtainandinstall-v1Fraser Chadburn
 
Highly Surmountable Challenges in Ruby+OMR JIT Compilation
Highly Surmountable Challenges in Ruby+OMR JIT CompilationHighly Surmountable Challenges in Ruby+OMR JIT Compilation
Highly Surmountable Challenges in Ruby+OMR JIT CompilationMatthew Gaudet
 
Concierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded DevicesConcierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded DevicesJan S. Rellermeyer
 
Bci for Beginners
Bci for BeginnersBci for Beginners
Bci for BeginnersIainLewis
 
Java Presentation
Java PresentationJava Presentation
Java PresentationAmr Salah
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaEdureka!
 
Database Refactoring
Database RefactoringDatabase Refactoring
Database RefactoringAnton Keks
 
Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Kevin Sutter
 
Os Grossupdated
Os GrossupdatedOs Grossupdated
Os Grossupdatedoscon2007
 
Ordina Accelerator program 2019 - Jenkins blue ocean pipelines
Ordina Accelerator program 2019 - Jenkins blue ocean pipelinesOrdina Accelerator program 2019 - Jenkins blue ocean pipelines
Ordina Accelerator program 2019 - Jenkins blue ocean pipelinesBert Koorengevel
 

What's hot (20)

#JavaOne What's in an object?
#JavaOne What's in an object?#JavaOne What's in an object?
#JavaOne What's in an object?
 
Google ART (Android RunTime)
Google ART (Android RunTime)Google ART (Android RunTime)
Google ART (Android RunTime)
 
JavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVMJavaOne 2012 CON3978 Scripting Languages on the JVM
JavaOne 2012 CON3978 Scripting Languages on the JVM
 
A Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark PerformanceA Java Implementer's Guide to Better Apache Spark Performance
A Java Implementer's Guide to Better Apache Spark Performance
 
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
JavaOne 2012 CON 3961 Innovative Testing Techniques Using Bytecode Instrument...
 
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]
 
Install MariaDB on IBM i - Tips, troubleshooting, and more
Install MariaDB on IBM i - Tips, troubleshooting, and moreInstall MariaDB on IBM i - Tips, troubleshooting, and more
Install MariaDB on IBM i - Tips, troubleshooting, and more
 
Automation framework design and implementation
Automation framework design and implementationAutomation framework design and implementation
Automation framework design and implementation
 
Sys ml helperprofile-rhapsody813-obtainandinstall-v1
Sys ml helperprofile-rhapsody813-obtainandinstall-v1Sys ml helperprofile-rhapsody813-obtainandinstall-v1
Sys ml helperprofile-rhapsody813-obtainandinstall-v1
 
Highly Surmountable Challenges in Ruby+OMR JIT Compilation
Highly Surmountable Challenges in Ruby+OMR JIT CompilationHighly Surmountable Challenges in Ruby+OMR JIT Compilation
Highly Surmountable Challenges in Ruby+OMR JIT Compilation
 
Os Lattner
Os LattnerOs Lattner
Os Lattner
 
Concierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded DevicesConcierge - Bringing OSGi (back) to Embedded Devices
Concierge - Bringing OSGi (back) to Embedded Devices
 
Bci for Beginners
Bci for BeginnersBci for Beginners
Bci for Beginners
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
 
03 - Continuous Integration
03 - Continuous Integration03 - Continuous Integration
03 - Continuous Integration
 
Database Refactoring
Database RefactoringDatabase Refactoring
Database Refactoring
 
Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1Haj 4344-java se 9 and the application server-1
Haj 4344-java se 9 and the application server-1
 
Os Grossupdated
Os GrossupdatedOs Grossupdated
Os Grossupdated
 
Ordina Accelerator program 2019 - Jenkins blue ocean pipelines
Ordina Accelerator program 2019 - Jenkins blue ocean pipelinesOrdina Accelerator program 2019 - Jenkins blue ocean pipelines
Ordina Accelerator program 2019 - Jenkins blue ocean pipelines
 

Similar to J9: Under the hood of the next open source JVM

Java on z overview 20161107
Java on z overview 20161107Java on z overview 20161107
Java on z overview 20161107Marcel Mitran
 
SemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSumanMitra22
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best PracticesDavid Delabassee
 
EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18Xiaoli Liang
 
Splunk Conf 2014 - Splunking the Java Virtual Machine
Splunk Conf 2014 - Splunking the Java Virtual MachineSplunk Conf 2014 - Splunking the Java Virtual Machine
Splunk Conf 2014 - Splunking the Java Virtual MachineDamien Dallimore
 
Debugging Native heap OOM - JavaOne 2013
Debugging Native heap OOM - JavaOne 2013Debugging Native heap OOM - JavaOne 2013
Debugging Native heap OOM - JavaOne 2013MattKilner
 
JavaOne2015-What's in an Object?
JavaOne2015-What's in an Object?JavaOne2015-What's in an Object?
JavaOne2015-What's in an Object?Charlie Gracie
 
Great cup of java
Great  cup of javaGreat  cup of java
Great cup of javaCIB Egypt
 
OpenStack and z/VM – What is it and how do I get it?
OpenStack and z/VM – What is it and how do I get it?OpenStack and z/VM – What is it and how do I get it?
OpenStack and z/VM – What is it and how do I get it?Anderson Bassani
 
Unleashing Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Inside the ...
Unleashing Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Inside the ...Unleashing Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Inside the ...
Unleashing Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Inside the ...Intel® Software
 
Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Shaun Smith
 
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...timfanelli
 
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...zOSCommserver
 
Java on zSystems zOS
Java on zSystems zOSJava on zSystems zOS
Java on zSystems zOSTim Ellison
 
Three key concepts for java batch
Three key concepts for java batchThree key concepts for java batch
Three key concepts for java batchtimfanelli
 
Simple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVMSimple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVMJamie Coleman
 
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise ApplicationsDaniel Oh
 

Similar to J9: Under the hood of the next open source JVM (20)

Open j9 jdk on RISC-V
Open j9 jdk on RISC-VOpen j9 jdk on RISC-V
Open j9 jdk on RISC-V
 
Java on z overview 20161107
Java on z overview 20161107Java on z overview 20161107
Java on z overview 20161107
 
SemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptxSemeruRuntimesUnderTheCover .pptx
SemeruRuntimesUnderTheCover .pptx
 
JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best Practices
 
EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18
 
Splunk Conf 2014 - Splunking the Java Virtual Machine
Splunk Conf 2014 - Splunking the Java Virtual MachineSplunk Conf 2014 - Splunking the Java Virtual Machine
Splunk Conf 2014 - Splunking the Java Virtual Machine
 
JVMs in Containers
JVMs in ContainersJVMs in Containers
JVMs in Containers
 
Debugging Native heap OOM - JavaOne 2013
Debugging Native heap OOM - JavaOne 2013Debugging Native heap OOM - JavaOne 2013
Debugging Native heap OOM - JavaOne 2013
 
JavaOne2015-What's in an Object?
JavaOne2015-What's in an Object?JavaOne2015-What's in an Object?
JavaOne2015-What's in an Object?
 
OpenPOWER Update
OpenPOWER UpdateOpenPOWER Update
OpenPOWER Update
 
Great cup of java
Great  cup of javaGreat  cup of java
Great cup of java
 
OpenStack and z/VM – What is it and how do I get it?
OpenStack and z/VM – What is it and how do I get it?OpenStack and z/VM – What is it and how do I get it?
OpenStack and z/VM – What is it and how do I get it?
 
Unleashing Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Inside the ...
Unleashing Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Inside the ...Unleashing Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Inside the ...
Unleashing Intel® Advanced Vector Extensions 512 (Intel® AVX-512) Inside the ...
 
Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019Serverless Java: JJUG CCC 2019
Serverless Java: JJUG CCC 2019
 
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
Three Key Concepts for Understanding JSR-352: Batch Programming for the Java ...
 
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
z/OS V2.4 Preview: z/OS Container Extensions - Running Linux on Z docker cont...
 
Java on zSystems zOS
Java on zSystems zOSJava on zSystems zOS
Java on zSystems zOS
 
Three key concepts for java batch
Three key concepts for java batchThree key concepts for java batch
Three key concepts for java batch
 
Simple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVMSimple tweaks to get the most out of your JVM
Simple tweaks to get the most out of your JVM
 
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
 

Recently uploaded

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

J9: Under the hood of the next open source JVM

  • 1. Dan Heidinga, J9 VM Interpreter Lead Daniel_Heidinga@ca.ibm.com @DanHeidinga 18 September 2016 J9: Under the Hood of the Next Open Source JVM
  • 2. Important disclaimers  THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY.  WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.  ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR INFRASTRUCTURE DIFFERENCES.  ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE.  IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE.  IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION.  NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF: – CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR SUPPLIERS AND/OR LICENSORS 2
  • 3. Who am I?  I've been involved with virtual machine development at IBM since 2007 and am now the J9 Virtual Machine Team Lead. J9 is IBM's independent implementation of the JVM.  I've represented IBM on both the JSR 292 ('invokedynamic') and JSR 335 ('lambda') expert groups and lead J9's implementation of both JSRs.  I’ve also maintain the bytecode verifier and deal with various other parts of the runtime. 3
  • 4. High performance High reliability Serviceability J9: IBM’s Java Virtual Machine 4 OS JVM Middle ware User application
  • 5. J9: IBM’s Java Virtual Machine scales 5
  • 6. J9 Architecture 6 SE 7 Operating system Native applications OS-specific calls Virtual machine SE 6 Garbage collector Interpreter Exception handler Class loader Pluggable components that dynamically load into the virtual machine Thread model JVM Profiler Debugger Port Library (file IO, sockets, memory allocation) Uses 1 of many Java platform configurations JCL natives JNI Calls to C libraries CDC MIDP Java calls JNI, INL, Fastcall TR JIT CLDC VM Interface Zip, fdlibm Java VM Classes
  • 7. PERFORMANCE ! Java6 SR16 FP4 Java 6.1 SR8 FP4 Java 7 SR9 Java 7.1 SR3 Java 8 SR1 Apache Spark 1.4 Daytrader3 Linux Intel
  • 9. Virtual machines on oscilloscopes? “Lots” of ROM, very little RAM https://upload.wikimedia.org/wikipedia/commons/7/7 e/Tektronix_TDS210_Oscilloscope.jpg
  • 10. Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming. – Rob Pike 10
  • 11. You want me to interpret that? 11
  • 12. You want me to interpret that? Constant offsets Fast access Easy to find constant_pool start 12 Relative offsets Variable sized arrays Variable sized entries Slow access to specific index
  • 13. Conversion to ROM 13 Classfile Static Verification ROMClassROM Class Builder
  • 14. Essential Classfile data Position independent (SRP) Less variable than a Classfile Still variable, but structured
  • 15. From ROM to RAM 15 RAM Creation Load superclases Load superinterfaces Calculate vtable ROMClass J9RAMClass
  • 16.  Live pointers, not SRPs  Pointer to the ROMClass  Live data  Describes the shape of this class in this VM.  Requires its entire hierarchy and interfaces to be loaded.
  • 17. Classloading: tying it all together 17 ROMClass J9RAMClass J9ClassLoader java.lang.Class java.lang.ClassLoader Heap Native
  • 18. Bytecode loaded? Check 18 ROMClass J9RAMClass stack=2, locals=1, args_size=1 0: getstatic #2 3: ldc #3 5: invokevirtual #4 8: return
  • 23. Interpreter  Written in C++  Switch statement / computed goto  Executes: – bytecodes – INLs – builds stack frames  Transition to the JIT 23
  • 25. SharedClasses: ROM pays off JVM 1 JVM 2 JVM 3
  • 26. SharedClasses: ROM pays off JVM 1 JVM 2 JVM 3
  • 27. SharedClasses: ROM pays off JVM 1 JVM 2 JVM 3 Shared Classes Cache
  • 28. SharedClasses: “dynamic” AOT Shared Classes Cache AOTROM Classes
  • 29. Diagnostic tools  Diagnostic information (-Xdump) – Java dump (javacore) – Heap dump – System dump (core) – JIT dump  Tracepoints (-Xtrace)  bin/jdmpview –core <corefile> 29
  • 30. J9: Meet IBM’s OpenJDK distro Oracle JDK JCL Hotspot Open JDK JCL Hotspot IBM JDK JCL IBM J9 + IBM JCL
  • 31. J9: Meet IBM’s OpenJDK & OMR distro OMR Oracle JDK JCL Hotspot Open JDK JCL Hotspot IBM JDK JCL IBM J9 OMR + IBM JCL + IBM OMR
  • 32. Build an open reusable language runtime foundation for cloud platforms – To accelerate advancement and innovation – In full cooperation with existing language communities – Engaging a diverse community of people interested in language runtimes • Professional developers • Researchers • Students • Hobbyists Eclipse OMR Mission
  • 33. http://www.eclipse.org/omr https://github.com/eclipse/omr https://developer.ibm.com/open/omr/ Dual License: Eclipse Public License V1.0 Apache 2.0 Users and contributors very welcome https://github.com/eclipse/omr/blob/master/CONTRIBUTING.md Eclipse OMR Created March 2016
  • 34. OMR components port platform abstraction (porting) library thread cross platform pthread-like threading library vm APIs to manage per-interpreter and per-thread contexts gc garbage collection framework for managed heaps compiler extensible compiler framework jitbuilder WIP project to simplify bring up for a new JIT compiler omrtrace library for publishing trace events for monitoring/diagnostics omrsigcompat signal handling compatibility library example demonstration code to show how a language runtime might consume OMR components, also used for testing fvtest language independent test framework built on the example glue so that components can be tested outside of a language runtime, uses Google Test 1.7 framework + a few others ~800KLOC at this point, more components coming!
  • 35. OpenJ9: Meet an OpenJDK & OMR distro OpenJ9 OMR OMR Open JDK JCL OpenJ9 OMR Oracle JDK JCL Hotspot Open JDK JCL Hotspot IBM JDK JCL IBM J9 OMR + IBM isms
  • 36. OpenJ9: Meet an OpenJDK & OMR distro OpenJ9 OMR OMR Open JDK JCL OpenJ9 OMR Oracle JDK JCL Hotspot Open JDK JCL Hotspot IBM JDK JCL IBM J9 OMR + IBM isms OMR & OpenJ9: note the arrow direction! Open projects as the upstream repos IBM JDK is a CONSUMER of OpenJ9
  • 37. 37 “We believe open ecosystems and partnerships are key to our future innovation.” -- Ginni Rometty (http://www.ibm.com/annualreport/2014/chairmans-letter.html)
  • 41. 41 Legal Notice IBM and the IBM logo are trademarks or registered trademarks of IBM Corporation, in the United States, other countries or both. Java and all Java-based marks, among others, are trademarks or registered trademarks of Oracle in the United States, other countries or both. Other company, product and service names may be trademarks or service marks of others. THE INFORMATION DISCUSSED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. WHILE EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION, IT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, AND IBM SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, SUCH INFORMATION. ANY INFORMATION CONCERNING IBM'S PRODUCT PLANS OR STRATEGY IS SUBJECT TO CHANGE BY IBM WITHOUT NOTICE.
  • 42. • IBM is open sourcing its J9 JVM technology – Includes Testarossa Just in Time (JIT) compiler • Eclipse OMR project is leading edge: github.com/eclipse/omr – Project created March 7, 2016 : ~300KLOC – Compiler contributed September 16, 2016 : ~500KLOC • Open J9 project is also coming – We’re working on it at same time as Java 9 development Open source