SlideShare a Scribd company logo
1 of 84
Download to read offline
Copyright © 2019 Oracle and/or its affiliates.
The following is intended to outline our general product direction. It is intended for information purposes
only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code,
or functionality, and should not be relied upon in making purchasing decisions. The development,
release, timing, and pricing of any features or functionality described for Oracle’s products may change
and remains at the sole discretion of Oracle Corporation.
Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and
prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed
discussion of these factors and other risks that affect our business is contained in Oracle’s Securities and
Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10-Q
under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s website
at http://www.oracle.com/investor. All information in this presentation is current as of September 2019
and Oracle undertakes no duty to update any statement in light of new information or future events.
Safe Harbor
Copyright © 2019 Oracle and/or its affiliates.
JDK Mission Control:
Where We Are, Where We Are Going
Principal Member of Technical Staff
Java Platform Group
September 16, 2019
David Buck
Copyright © 2019 Oracle and/or its affiliates.
JVM Sustaining Engineer
OpenJDK 8 Update Project
Maintainer
JavaOne Rock Star
Co-author of Oracle WebLogic
Server 11g 構築・運用ガイド
@DavidBuckJP
https://blogs.oracle.com/buck/
Who am I? David Buck (left)
• Background / History
• Building
• Demo
• Takaways
Copyright © 2019 Oracle and/or its affiliates.
Agenda
Introduction to JDK Mission Control and JDK Flight Recorder [DEV2316]
Marcus Hirt and Klara Ward
Monday 16:00 Moscone South Room 202
Improving Observability in Your Application with JFR and JMC [DEV3460]
Marcus Hirt and Mario Torre
Tuesday 11:30 Moscone South Room 201
Java Flight Recorder: Black Box of Java Applications[DEV3957]
Poonam Parhar
Wednesday 12:30 Moscone South Room 203
Robotics on JDK 11? With Modules? Are You… [DEV2329]
Marcus Hirt, Miro Wengner, and Robert Savage
Wednesday 16:00 Moscone South Room 313
Four Productive Ways to Use Open Source JFR and JMC Revisited [DEV3118]
Sven Reimers and Martin Klähn
Thursday 11:15 Moscone South Room 304
Enhanced Java Flight Recorder at Alibaba [DEV3667]
Sanhong Li, Fangxi Yin, and Guangyu Zhu
Thursday 12:15 Moscone South Room 203
Performance Monitoring with Java Flight Recorder on OpenJDK [DEV2406]
Hirofumi Iwasaki and Hiroaki Nakada
Thursday 13:15 Moscone South Room 201
Introduction to JDK Mission Control and JDK Flight Recorder [DEV2316]
Marcus Hirt and Klara Ward
Monday 16:00 Moscone South Room 202
Improving Observability in Your Application with JFR and JMC [DEV3460]
Marcus Hirt and Mario Torre
Tuesday 11:30 Moscone South Room 201
Java Flight Recorder: Black Box of Java Applications[DEV3957]
Poonam Parhar
Wednesday 12:30 Moscone South Room 203
Robotics on JDK 11? With Modules? Are You… [DEV2329]
Marcus Hirt, Miro Wengner, and Robert Savage
Wednesday 16:00 Moscone South Room 313
Four Productive Ways to Use Open Source JFR and JMC Revisited [DEV3118]
Sven Reimers and Martin Klähn
Thursday 11:15 Moscone South Room 304
Enhanced Java Flight Recorder at Alibaba [DEV3667]
Sanhong Li, Fangxi Yin, and Guangyu Zhu
Thursday 12:15 Moscone South Room 203
Performance Monitoring with Java Flight Recorder on OpenJDK [DEV2406]
Hirofumi Iwasaki and Hiroaki Nakada
Thursday 13:15 Moscone South Room 201
Background
Several Closely Related Technologies
(JRockit / Java / JDK) Mission Control
Flight Recording
Oracle JDK: JDK 7
OpenJDK: JDK 11
JEP 167: Event-Based JVM Tracing (JDK 7)
JEP 328: Flight Recorder (JDK 11)
Flight Recorder
Technology to generate and persist JVM event data
Low-overhead
Intended for use in production
Viable for “always on” use-case
Mission Control
Eclipse-based (RCP) GUI tool
Visualization of Flight Recording data
Automated Flight Recording analysis
JMX console for real-time monitoring (and control) of target
Plug-in framework for additional functionality
Support for integration into Eclipse IDE
Mission Control
Eclipse-based (RCP) GUI tool
Visualization of Flight Recording data
Automated Flight Recording analysis
JMX console for real-time monitoring (and control) of target
Plug-in framework for additional functionality
Support for integration into Eclipse IDE
History
Our Story Begins in Sweden
By Holger.Ellgaard - Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=5623391
JRockit
Developed by Stockholm-based
Appeal Virtual Systems
JIT-only JVM (no interpreter)
Heavily focused on Intel (x86 /
AMD64 / IA64) performance
Value Add
JRockit was originally sold as a “Virtual Machine for Java”
Sun required each Java licensee to have a “value add”
“Superior performance” didn’t go over well...
JRockit’s monitoring and management tools were presented as its
value add to differentiate itself from Sun’s offerings
Alex Flury at English Wikipedia [Public domain]
By VARA - Beeld- en Geluidwiki, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=49198465
Appeal Virtual Machines
2002
Appeal Virtual Machines
BEA Systems
BEA Systems
2008
BEA Systems
BEA Systems
2009
A Combined Legacy
JRockit’s best features ported over to HotSpot
Diagnostic commands (JDK 7)
Compiler control (JDK 9)
Native memory tracking (JDK 7)
Flight Recorder (JDK 7)
Build system (behind the scenes) (JDK 8)
JRockit Mission Control -> Java Mission Control
JRockit Mission Control 1
JRockit Runtime Analyzer
Based on experience gained while consulting
“Cast a big net” to avoid multiple support iterations
Most data collection piggy-backed onto internal JVM operations
(low overhead)
Data persisted at zipped XML
JRockit Mission Control 2
JRockit Mission Control 3
JRockit Mission Control 4
Post Oracle acquisition (JRockit R28)
Flight Recorder replaces JRockit Runtime Analyzer
XML data -> binary data
Much lower overhead to collect and persist data
Java Mission Control 5
Flight Recorder in HotSpot
Flight Recorder support added in 7u40
JMC 5 bundled with JDK
JDK 7 JMC 5
JDK 8 JMC 5.5
JDK 9 JMC 6
JDK 10 JMC 6
2018
JDK Mission Control 7
Open source
No longer bundled with JDK (as of JDK 11)
Flight Recorder implementation open sourced (as of JDK 11)
Universal Permissive License
Clear patent protection
Clear & simplified relicensing
Reduced overhead in source files
It can be used as a contributor agreement
See FAQ (link at end of slide deck) for details
Universal Permissive License
Clear patent protection
Clear & simplified relicensing
Reduced overhead in source files
It can be used as a contributor agreement
See FAQ (link at end of slide deck) for details
Oracle Contributor Agreement
Must be signed and sent to Oracle to contribute code to Mission
Control
Same requirement as other OpenJDK projects
Only needs to be done once
“...you're doing an awesome job in building a real community and a
*very* open source project.“
- Red Hat Contributor to Marcus Hirt
jmc-dev alias, November 8, 2018
Compatibility
Flight Recording format changes between JDK versions
Mission Control has always been backwards compatible with flight
recordings from older HotSpot releases.
JDK 11 requires JMC 7
JMC 7 is currently the only version that supports all HotSpot based
flight recordings
Building
Requirements
Mercurial (hg)
Maven
JDK 8
OpenJDK JMC repositories
jmc Mainline Development Branch
jmc-graphics images / branding resources
jmc7 JMC 7.0 branch
Copyright © 2019 Oracle and/or its affiliates.
GitHub Mirror
Only mainline development branch
Not in full sync at the moment
Recommend using hg until project Skara migration *
* Maybe...
A Tale of Two Shells...
Shell 1
cd releng/third-party
mvn p2:site
mvn jetty:run
Shell 2
cd core
mvn install
cd ..
mvn clean package
A Tale of Two Shells...
Equinox p2: provisioning platform for OSGi artifacts and meta-data
Shell 1 sets up a p2 repository that hosts dependencies needed by
the build process run in shell 2
Cross Compilation?!
Regardless of build platform, binaries for all three target platforms
are generated
Platform-dependent bits are downloaded as dependencies
Building
Quick and easy to do
Builds virtually out of the box on most Linux distros
Build platform does not need to match target platform
Demo
Safepoints
Stop-the-World implementation
Guarantees Java state of thread is known
All threads executing Java code must stop
JNI code can continue
Cooperative suspension
Polling based
By YPLeroux at English Wikipedia, CC BY 3.0, https://commons.wikimedia.org/w/index.php?curid=17734859
Safepoints
Stop-the-World implementation
Guarantees Java state of thread is known
All threads executing Java code must stop
JNI code can continue
Cooperative suspension
Polling based
By YPLeroux at English Wikipedia, CC BY 3.0, https://commons.wikimedia.org/w/index.php?curid=17734859
Safepoint Polling
Interpreter can stop instantly
template dispatch table replaced
“polling” is essentially free
Explicit poll inserted into C1/C2 JIT output
Global safepoint polling page in address space
Poll implemented by attempted read of this address
Safepoint triggered by change in page permissions
JIT Safepoint Polling
On return from method call
Backend branches in most loops
Any transition to native code (JVM / JNI)
Collatz Conjecture
Simple rules:
If number is even, divide by 2
If number is odd, multiply by 3 and add 1
Conjecture: Start with any positive integer, and you’ll eventually
end up at 1
An open problem in math
Collatz Conjecture Examples
2 1
3 10 5 16 8 4 2 1
4 2 1
5 16 8 4 2 1
6 3 10 5 16 8 4 2 1
7 22 11 34 17 52 26 13 40 20 10 5 16 8...
Collatz Conjecture Examples
2 1
3 10 5 16 8 4 2 1
4 2 1
5 16 8 4 2 1
6 3 10 5 16 8 4 2 1
7 22 11 34 17 52 26 13 40 20 10 5 16 8...
Collatz Conjecture
By Kunashmilovich - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=48786325
Let’s test the Collatz Conjecture...
Let’s test the Collatz Conjecture...
the stupidest way imaginable!
Testing the Collatz Conjecture
private static long next(long num) {
return (num%2 == 0) ? num / 2 : 3 * num + 1;
}
Testing the Collatz Conjecture
public static void main(String[] args) {
long num;
for (int i=2; i < Integer.MAX_VALUE; i++) {
num = i;
for (int j=0; j < Integer.MAX_VALUE; j++) {
num = next(num);
if (num == 1) break;
}
if (num != 1) {
System.out.println(i + " did not end at 1.");
System.exit(-1);
} else if (i % 1000000 == 0) {
System.out.println("done with " + i);
}
}
}
Counted Loop
Loop that increments / decrements an int index
Worst case scenario, we loop 4 billion times (very short)
HotSpot may not bother adding a safepoint pool to the loop
Testing the Collatz Conjecture
public static void main(String[] args) {
long num;
for (int i=2; i < Integer.MAX_VALUE; i++) {
num = i;
for (int j=0; j < Integer.MAX_VALUE; j++) {
num = next(num);
if (num == 1) break;
}
if (num != 1) {
System.out.println(i + " did not end at 1.");
System.exit(-1);
} else if (i % 1000000 == 0) {
System.out.println("done with " + i);
}
}
}
Testing the Collatz Conjecture
public static void main(String[] args) {
long num;
for (int i=2; i < Integer.MAX_VALUE; i++) {
num = i;
for (int j=0; j < Integer.MAX_VALUE; j++) {
num = next(num);
if (num == 1) break;
}
if (num != 1) {
System.out.println(i + " did not end at 1.");
System.exit(-1);
} else if (i % 1000000 == 0) {
System.out.println("done with " + i);
}
}
}
Profiler Types
Sampling Profiler
Process sampled periodically
Invocation count is not exact
Observer effect should be
negligible
Invocation Counter Profiler
Code is instrumented
Exact number of invocations
Observer effect often distorts
results
Profiler Types
Sampling Profiler
Process sampled periodically
Invocation count is not exact
Observer effect should be
negligible
Invocation Counter Profiler
Code is instrumented
Exact number of invocations
Observer effect often distorts
results
Traditional Sampler
JVMTI / Bytecode instrumentation can only stop thread at a
safepoint poll
What happens between safpoint polls is invisible to the profiler
VisualVM
Flight Recording
Can asynchronously stop execution thread at any time
No dependence on safe points for profiling
HotSpot internal API (AsyncGetCallTrace)
Honest Profiler
Oracle Developer Studio
Flight Recorder
Mission Control
What happened?
Safepoints have corresponding metadata
Byte Code Index (bci)
Liveness data (what stack positions point to Java heap)
What happened?
By default, metadata is normally only generated for safepoints
DebugNonSafepoints flag forces metadata generation for all code
(obvious performance cost)
Flight Recorder
Mission Control
Flight Recorder
Mission Control
Takeaways
Open sourcing of JMC has been a great success
JMC 7 and higher are the ideal MC to use regardless of JDK version
Binary builds from Oracle should be available in the near future
JMC is simple to build on your own today
Flight Recording’s AsyncGetCallTrace-based profiling can provide a
level of accuracy unachievable by most other tools.
Thank You!
References
Marcus Hirt’s Blog
http://hirt.se/blog/
The Universal Permissive License (UPL)
https://oss.oracle.com/licenses/upl/
Session Survey
Help us make the content
even better. Please complete
the session survey in the
Mobile App.
Copyright © 2019 Oracle and/or its affiliates.
The preceding is intended to outline our general product direction. It is intended for information purposes
only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code,
or functionality, and should not be relied upon in making purchasing decisions. The development,
release, timing, and pricing of any features or functionality described for Oracle’s products may change
and remains at the sole discretion of Oracle Corporation.
Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and
prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed
discussion of these factors and other risks that affect our business is contained in Oracle’s Securities and
Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10-Q
under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s website
at http://www.oracle.com/investor. All information in this presentation is current as of September 2019
and Oracle undertakes no duty to update any statement in light of new information or future events.
Safe Harbor
Copyright © 2019 Oracle and/or its affiliates.

More Related Content

What's hot

Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5
Arun Gupta
 

What's hot (20)

Clone Clone Make: a better way to build
Clone Clone Make: a better way to buildClone Clone Make: a better way to build
Clone Clone Make: a better way to build
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8
 
Hotspot & AOT
Hotspot & AOTHotspot & AOT
Hotspot & AOT
 
Java EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise SystemsJava EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise Systems
 
JavaOne 2017: Eclipse OpenJ9: Under the hood of the JVM
JavaOne 2017: Eclipse OpenJ9: Under the hood of the JVMJavaOne 2017: Eclipse OpenJ9: Under the hood of the JVM
JavaOne 2017: Eclipse OpenJ9: Under the hood of the JVM
 
Compile ahead of time. It's fine?
Compile ahead of time. It's fine?Compile ahead of time. It's fine?
Compile ahead of time. It's fine?
 
FOSDEM 2017 - Open J9 The Next Free Java VM
FOSDEM 2017 - Open J9 The Next Free Java VMFOSDEM 2017 - Open J9 The Next Free Java VM
FOSDEM 2017 - Open J9 The Next Free Java VM
 
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
 
J9: Under the hood of the next open source JVM
J9: Under the hood of the next open source JVMJ9: Under the hood of the next open source JVM
J9: Under the hood of the next open source JVM
 
CompletableFuture уже здесь
CompletableFuture уже здесьCompletableFuture уже здесь
CompletableFuture уже здесь
 
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013
Java EE 7: Whats New in the Java EE Platform @ Devoxx 2013
 
Hierarchy Viewer Internals
Hierarchy Viewer InternalsHierarchy Viewer Internals
Hierarchy Viewer Internals
 
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
 
Javaee6 Overview
Javaee6 OverviewJavaee6 Overview
Javaee6 Overview
 
Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5Java EE 7: Boosting Productivity and Embracing HTML5
Java EE 7: Boosting Productivity and Embracing HTML5
 
J9's MethodHandle Compilation Pipeline #JFokus2015
J9's MethodHandle Compilation Pipeline #JFokus2015J9's MethodHandle Compilation Pipeline #JFokus2015
J9's MethodHandle Compilation Pipeline #JFokus2015
 
FOSDEM 2017 - A different Lua JIT using Eclipse OMR
FOSDEM 2017 - A different Lua JIT using Eclipse OMRFOSDEM 2017 - A different Lua JIT using Eclipse OMR
FOSDEM 2017 - A different Lua JIT using Eclipse OMR
 
Readme
ReadmeReadme
Readme
 
JDK9 Features (Summary, 31/Jul/2015) #JJUG
JDK9 Features (Summary, 31/Jul/2015) #JJUGJDK9 Features (Summary, 31/Jul/2015) #JJUG
JDK9 Features (Summary, 31/Jul/2015) #JJUG
 
Building a web application with ontinuation monads
Building a web application with ontinuation monadsBuilding a web application with ontinuation monads
Building a web application with ontinuation monads
 

Similar to JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]

Oracle E2.0 WebCenter Portal Strategy
Oracle E2.0 WebCenter Portal StrategyOracle E2.0 WebCenter Portal Strategy
Oracle E2.0 WebCenter Portal Strategy
Fumiko Yamashita
 
Android presentation
Android presentationAndroid presentation
Android presentation
Imam Raza
 
VLSI Training presentation
VLSI Training presentationVLSI Training presentation
VLSI Training presentation
Daola Khungur
 

Similar to JDK Mission Control: Where We Are, Where We Are Going [Code One 2019] (20)

Java Mission Control in Java SE 7U40
Java Mission Control in Java SE 7U40Java Mission Control in Java SE 7U40
Java Mission Control in Java SE 7U40
 
Embedding Oracle Weblogic Server 1871199
Embedding Oracle Weblogic Server 1871199Embedding Oracle Weblogic Server 1871199
Embedding Oracle Weblogic Server 1871199
 
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...
MuleSoft Surat Meetup#45 - Anypoint Flex Gateway as a Kubernetes Ingress Cont...
 
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
 
Oracle E2.0 WebCenter Portal Strategy
Oracle E2.0 WebCenter Portal StrategyOracle E2.0 WebCenter Portal Strategy
Oracle E2.0 WebCenter Portal Strategy
 
Production Time Profiling Out of the Box
Production Time Profiling Out of the BoxProduction Time Profiling Out of the Box
Production Time Profiling Out of the Box
 
EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18EclipseOMRBuildingBlocks4Polyglot_TURBO18
EclipseOMRBuildingBlocks4Polyglot_TURBO18
 
Revised Adf security in a project centric environment
Revised Adf security in a project centric environmentRevised Adf security in a project centric environment
Revised Adf security in a project centric environment
 
Enabling NFV features in kubernetes
Enabling NFV features in kubernetesEnabling NFV features in kubernetes
Enabling NFV features in kubernetes
 
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
 
Android presentation
Android presentationAndroid presentation
Android presentation
 
Open j9 jdk on RISC-V
Open j9 jdk on RISC-VOpen j9 jdk on RISC-V
Open j9 jdk on RISC-V
 
Synopsis on online shopping by sudeep singh
Synopsis on online shopping by  sudeep singhSynopsis on online shopping by  sudeep singh
Synopsis on online shopping by sudeep singh
 
Integrating Ansible Tower with security orchestration and cloud management
Integrating Ansible Tower with security orchestration and cloud managementIntegrating Ansible Tower with security orchestration and cloud management
Integrating Ansible Tower with security orchestration and cloud management
 
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 RICOH THETA x IoT Developers Contest : Cloud API Seminar RICOH THETA x IoT Developers Contest : Cloud API Seminar
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 
Selenium Training in Chandigarh
Selenium Training in ChandigarhSelenium Training in Chandigarh
Selenium Training in Chandigarh
 
VLSI Training presentation
VLSI Training presentationVLSI Training presentation
VLSI Training presentation
 
Selenium Training in Jalandhar
Selenium Training in JalandharSelenium Training in Jalandhar
Selenium Training in Jalandhar
 
Selenium Training in Amritsar
Selenium Training in AmritsarSelenium Training in Amritsar
Selenium Training in Amritsar
 
[Oracle Webcast] Discover the Oracle Blockchain Platform through the eyes of ...
[Oracle Webcast] Discover the Oracle Blockchain Platform through the eyes of ...[Oracle Webcast] Discover the Oracle Blockchain Platform through the eyes of ...
[Oracle Webcast] Discover the Oracle Blockchain Platform through the eyes of ...
 

More from David Buck

More from David Buck (20)

JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
JDK 13 New Features [MeetUp with Java Experts! @Gaienmae/Dojima 2019]
 
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
JDK Mission Control: Where We Are, Where We Are Going [Groundbreakers APAC 20...
 
Z Garbage Collector
Z Garbage CollectorZ Garbage Collector
Z Garbage Collector
 
Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019
 
Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018
 
JDK 10 へようこそ
JDK 10 へようこそJDK 10 へようこそ
JDK 10 へようこそ
 
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
Java SE 8におけるHotSpotの進化 [Java Day Tokyo 2014 C-2]
 
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ JVM 特集 2015年8月]
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ  JVM 特集  2015年8月]HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ  JVM 特集  2015年8月]
HotSpot のロック: A Peek Under the Hood [JJUG ナイトセミナ JVM 特集 2015年8月]
 
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
Java Concurrency, A(nother) Peek Under the Hood [JavaOne 2016 CON1497]
 
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
Bytecode Verification, the Hero That Java Needs [JavaOne 2016 CON1500]
 
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]
Java Debuggers: A Peek Under the Hood [JavaOne 2016 CON1503]
 
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
Lambda: A Peek Under The Hood [Java Day Tokyo 2015 6-3]
 
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
Java Concurrency, A(nother) Peek Under the Hood [Java Day Tokyo 2016 3-C]
 
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
Ahead-of-Time Compilation with JDK 9 [Java Day Tokyo 2017 D1-A1]
 
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
 
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]
 
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584] Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
Let’s Write Our Own Chip-8 Interpreter! [JavaOne 2017 CON3584]
 
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
Everything You Wanted to Know About JIT Compilation but Were Afraid to Ask [J...
 
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]
Full Speed Ahead! (Ahead-of-Time Compilation for Java SE) [JavaOne 2017 CON3738]
 
OpenJDK: How to Join In on All the Fun [JavaOne 2017 CON3667]
OpenJDK: How to Join In on All the Fun [JavaOne 2017 CON3667]OpenJDK: How to Join In on All the Fun [JavaOne 2017 CON3667]
OpenJDK: How to Join In on All the Fun [JavaOne 2017 CON3667]
 

Recently uploaded

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 

JDK Mission Control: Where We Are, Where We Are Going [Code One 2019]

  • 1. Copyright © 2019 Oracle and/or its affiliates.
  • 2. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed discussion of these factors and other risks that affect our business is contained in Oracle’s Securities and Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10-Q under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s website at http://www.oracle.com/investor. All information in this presentation is current as of September 2019 and Oracle undertakes no duty to update any statement in light of new information or future events. Safe Harbor Copyright © 2019 Oracle and/or its affiliates.
  • 3. JDK Mission Control: Where We Are, Where We Are Going Principal Member of Technical Staff Java Platform Group September 16, 2019 David Buck Copyright © 2019 Oracle and/or its affiliates.
  • 4. JVM Sustaining Engineer OpenJDK 8 Update Project Maintainer JavaOne Rock Star Co-author of Oracle WebLogic Server 11g 構築・運用ガイド @DavidBuckJP https://blogs.oracle.com/buck/ Who am I? David Buck (left)
  • 5. • Background / History • Building • Demo • Takaways Copyright © 2019 Oracle and/or its affiliates. Agenda
  • 6. Introduction to JDK Mission Control and JDK Flight Recorder [DEV2316] Marcus Hirt and Klara Ward Monday 16:00 Moscone South Room 202 Improving Observability in Your Application with JFR and JMC [DEV3460] Marcus Hirt and Mario Torre Tuesday 11:30 Moscone South Room 201 Java Flight Recorder: Black Box of Java Applications[DEV3957] Poonam Parhar Wednesday 12:30 Moscone South Room 203 Robotics on JDK 11? With Modules? Are You… [DEV2329] Marcus Hirt, Miro Wengner, and Robert Savage Wednesday 16:00 Moscone South Room 313 Four Productive Ways to Use Open Source JFR and JMC Revisited [DEV3118] Sven Reimers and Martin Klähn Thursday 11:15 Moscone South Room 304 Enhanced Java Flight Recorder at Alibaba [DEV3667] Sanhong Li, Fangxi Yin, and Guangyu Zhu Thursday 12:15 Moscone South Room 203 Performance Monitoring with Java Flight Recorder on OpenJDK [DEV2406] Hirofumi Iwasaki and Hiroaki Nakada Thursday 13:15 Moscone South Room 201
  • 7. Introduction to JDK Mission Control and JDK Flight Recorder [DEV2316] Marcus Hirt and Klara Ward Monday 16:00 Moscone South Room 202 Improving Observability in Your Application with JFR and JMC [DEV3460] Marcus Hirt and Mario Torre Tuesday 11:30 Moscone South Room 201 Java Flight Recorder: Black Box of Java Applications[DEV3957] Poonam Parhar Wednesday 12:30 Moscone South Room 203 Robotics on JDK 11? With Modules? Are You… [DEV2329] Marcus Hirt, Miro Wengner, and Robert Savage Wednesday 16:00 Moscone South Room 313 Four Productive Ways to Use Open Source JFR and JMC Revisited [DEV3118] Sven Reimers and Martin Klähn Thursday 11:15 Moscone South Room 304 Enhanced Java Flight Recorder at Alibaba [DEV3667] Sanhong Li, Fangxi Yin, and Guangyu Zhu Thursday 12:15 Moscone South Room 203 Performance Monitoring with Java Flight Recorder on OpenJDK [DEV2406] Hirofumi Iwasaki and Hiroaki Nakada Thursday 13:15 Moscone South Room 201
  • 9. Several Closely Related Technologies (JRockit / Java / JDK) Mission Control Flight Recording Oracle JDK: JDK 7 OpenJDK: JDK 11 JEP 167: Event-Based JVM Tracing (JDK 7) JEP 328: Flight Recorder (JDK 11)
  • 10. Flight Recorder Technology to generate and persist JVM event data Low-overhead Intended for use in production Viable for “always on” use-case
  • 11. Mission Control Eclipse-based (RCP) GUI tool Visualization of Flight Recording data Automated Flight Recording analysis JMX console for real-time monitoring (and control) of target Plug-in framework for additional functionality Support for integration into Eclipse IDE
  • 12. Mission Control Eclipse-based (RCP) GUI tool Visualization of Flight Recording data Automated Flight Recording analysis JMX console for real-time monitoring (and control) of target Plug-in framework for additional functionality Support for integration into Eclipse IDE
  • 14. Our Story Begins in Sweden By Holger.Ellgaard - Own work, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=5623391
  • 15. JRockit Developed by Stockholm-based Appeal Virtual Systems JIT-only JVM (no interpreter) Heavily focused on Intel (x86 / AMD64 / IA64) performance
  • 16. Value Add JRockit was originally sold as a “Virtual Machine for Java” Sun required each Java licensee to have a “value add” “Superior performance” didn’t go over well... JRockit’s monitoring and management tools were presented as its value add to differentiate itself from Sun’s offerings
  • 17. Alex Flury at English Wikipedia [Public domain]
  • 18. By VARA - Beeld- en Geluidwiki, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=49198465
  • 20. 2002
  • 23. 2008
  • 26. 2009
  • 27.
  • 28.
  • 29. A Combined Legacy JRockit’s best features ported over to HotSpot Diagnostic commands (JDK 7) Compiler control (JDK 9) Native memory tracking (JDK 7) Flight Recorder (JDK 7) Build system (behind the scenes) (JDK 8) JRockit Mission Control -> Java Mission Control
  • 31. JRockit Runtime Analyzer Based on experience gained while consulting “Cast a big net” to avoid multiple support iterations Most data collection piggy-backed onto internal JVM operations (low overhead) Data persisted at zipped XML
  • 34. JRockit Mission Control 4 Post Oracle acquisition (JRockit R28) Flight Recorder replaces JRockit Runtime Analyzer XML data -> binary data Much lower overhead to collect and persist data
  • 36. Flight Recorder in HotSpot Flight Recorder support added in 7u40 JMC 5 bundled with JDK
  • 37. JDK 7 JMC 5 JDK 8 JMC 5.5 JDK 9 JMC 6 JDK 10 JMC 6
  • 38. 2018
  • 39. JDK Mission Control 7 Open source No longer bundled with JDK (as of JDK 11) Flight Recorder implementation open sourced (as of JDK 11)
  • 40. Universal Permissive License Clear patent protection Clear & simplified relicensing Reduced overhead in source files It can be used as a contributor agreement See FAQ (link at end of slide deck) for details
  • 41. Universal Permissive License Clear patent protection Clear & simplified relicensing Reduced overhead in source files It can be used as a contributor agreement See FAQ (link at end of slide deck) for details
  • 42. Oracle Contributor Agreement Must be signed and sent to Oracle to contribute code to Mission Control Same requirement as other OpenJDK projects Only needs to be done once
  • 43. “...you're doing an awesome job in building a real community and a *very* open source project.“ - Red Hat Contributor to Marcus Hirt jmc-dev alias, November 8, 2018
  • 44. Compatibility Flight Recording format changes between JDK versions Mission Control has always been backwards compatible with flight recordings from older HotSpot releases. JDK 11 requires JMC 7 JMC 7 is currently the only version that supports all HotSpot based flight recordings
  • 47. OpenJDK JMC repositories jmc Mainline Development Branch jmc-graphics images / branding resources jmc7 JMC 7.0 branch Copyright © 2019 Oracle and/or its affiliates.
  • 48. GitHub Mirror Only mainline development branch Not in full sync at the moment Recommend using hg until project Skara migration * * Maybe...
  • 49. A Tale of Two Shells... Shell 1 cd releng/third-party mvn p2:site mvn jetty:run Shell 2 cd core mvn install cd .. mvn clean package
  • 50. A Tale of Two Shells... Equinox p2: provisioning platform for OSGi artifacts and meta-data Shell 1 sets up a p2 repository that hosts dependencies needed by the build process run in shell 2
  • 51. Cross Compilation?! Regardless of build platform, binaries for all three target platforms are generated Platform-dependent bits are downloaded as dependencies
  • 52. Building Quick and easy to do Builds virtually out of the box on most Linux distros Build platform does not need to match target platform
  • 53. Demo
  • 54. Safepoints Stop-the-World implementation Guarantees Java state of thread is known All threads executing Java code must stop JNI code can continue Cooperative suspension Polling based By YPLeroux at English Wikipedia, CC BY 3.0, https://commons.wikimedia.org/w/index.php?curid=17734859
  • 55. Safepoints Stop-the-World implementation Guarantees Java state of thread is known All threads executing Java code must stop JNI code can continue Cooperative suspension Polling based By YPLeroux at English Wikipedia, CC BY 3.0, https://commons.wikimedia.org/w/index.php?curid=17734859
  • 56. Safepoint Polling Interpreter can stop instantly template dispatch table replaced “polling” is essentially free Explicit poll inserted into C1/C2 JIT output Global safepoint polling page in address space Poll implemented by attempted read of this address Safepoint triggered by change in page permissions
  • 57. JIT Safepoint Polling On return from method call Backend branches in most loops Any transition to native code (JVM / JNI)
  • 58. Collatz Conjecture Simple rules: If number is even, divide by 2 If number is odd, multiply by 3 and add 1 Conjecture: Start with any positive integer, and you’ll eventually end up at 1 An open problem in math
  • 59. Collatz Conjecture Examples 2 1 3 10 5 16 8 4 2 1 4 2 1 5 16 8 4 2 1 6 3 10 5 16 8 4 2 1 7 22 11 34 17 52 26 13 40 20 10 5 16 8...
  • 60. Collatz Conjecture Examples 2 1 3 10 5 16 8 4 2 1 4 2 1 5 16 8 4 2 1 6 3 10 5 16 8 4 2 1 7 22 11 34 17 52 26 13 40 20 10 5 16 8...
  • 61. Collatz Conjecture By Kunashmilovich - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=48786325
  • 62. Let’s test the Collatz Conjecture...
  • 63. Let’s test the Collatz Conjecture... the stupidest way imaginable!
  • 64. Testing the Collatz Conjecture private static long next(long num) { return (num%2 == 0) ? num / 2 : 3 * num + 1; }
  • 65. Testing the Collatz Conjecture public static void main(String[] args) { long num; for (int i=2; i < Integer.MAX_VALUE; i++) { num = i; for (int j=0; j < Integer.MAX_VALUE; j++) { num = next(num); if (num == 1) break; } if (num != 1) { System.out.println(i + " did not end at 1."); System.exit(-1); } else if (i % 1000000 == 0) { System.out.println("done with " + i); } } }
  • 66. Counted Loop Loop that increments / decrements an int index Worst case scenario, we loop 4 billion times (very short) HotSpot may not bother adding a safepoint pool to the loop
  • 67. Testing the Collatz Conjecture public static void main(String[] args) { long num; for (int i=2; i < Integer.MAX_VALUE; i++) { num = i; for (int j=0; j < Integer.MAX_VALUE; j++) { num = next(num); if (num == 1) break; } if (num != 1) { System.out.println(i + " did not end at 1."); System.exit(-1); } else if (i % 1000000 == 0) { System.out.println("done with " + i); } } }
  • 68. Testing the Collatz Conjecture public static void main(String[] args) { long num; for (int i=2; i < Integer.MAX_VALUE; i++) { num = i; for (int j=0; j < Integer.MAX_VALUE; j++) { num = next(num); if (num == 1) break; } if (num != 1) { System.out.println(i + " did not end at 1."); System.exit(-1); } else if (i % 1000000 == 0) { System.out.println("done with " + i); } } }
  • 69. Profiler Types Sampling Profiler Process sampled periodically Invocation count is not exact Observer effect should be negligible Invocation Counter Profiler Code is instrumented Exact number of invocations Observer effect often distorts results
  • 70. Profiler Types Sampling Profiler Process sampled periodically Invocation count is not exact Observer effect should be negligible Invocation Counter Profiler Code is instrumented Exact number of invocations Observer effect often distorts results
  • 71. Traditional Sampler JVMTI / Bytecode instrumentation can only stop thread at a safepoint poll What happens between safpoint polls is invisible to the profiler
  • 73.
  • 74. Flight Recording Can asynchronously stop execution thread at any time No dependence on safe points for profiling HotSpot internal API (AsyncGetCallTrace) Honest Profiler Oracle Developer Studio
  • 76. What happened? Safepoints have corresponding metadata Byte Code Index (bci) Liveness data (what stack positions point to Java heap)
  • 77. What happened? By default, metadata is normally only generated for safepoints DebugNonSafepoints flag forces metadata generation for all code (obvious performance cost)
  • 80. Takeaways Open sourcing of JMC has been a great success JMC 7 and higher are the ideal MC to use regardless of JDK version Binary builds from Oracle should be available in the near future JMC is simple to build on your own today Flight Recording’s AsyncGetCallTrace-based profiling can provide a level of accuracy unachievable by most other tools.
  • 82. References Marcus Hirt’s Blog http://hirt.se/blog/ The Universal Permissive License (UPL) https://oss.oracle.com/licenses/upl/
  • 83. Session Survey Help us make the content even better. Please complete the session survey in the Mobile App. Copyright © 2019 Oracle and/or its affiliates.
  • 84. The preceding is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. Statements in this presentation relating to Oracle’s future plans, expectations, beliefs, intentions and prospects are “forward-looking statements” and are subject to material risks and uncertainties. A detailed discussion of these factors and other risks that affect our business is contained in Oracle’s Securities and Exchange Commission (SEC) filings, including our most recent reports on Form 10-K and Form 10-Q under the heading “Risk Factors.” These filings are available on the SEC’s website or on Oracle’s website at http://www.oracle.com/investor. All information in this presentation is current as of September 2019 and Oracle undertakes no duty to update any statement in light of new information or future events. Safe Harbor Copyright © 2019 Oracle and/or its affiliates.