SlideShare a Scribd company logo
1 of 100
Download to read offline
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 3
Classroom Training
Learning Subscription
Live Virtual Class
Training On Demand
Keep Learning with Oracle University
education.oracle.com
Cloud
Technology
Applications
Industries
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Session Surveys
Help us help you!!
• Oracle would like to invite you to take a moment to give us your session
feedback. Your feedback will help us to improve your conference.
• Please be sure to add your feedback for your attended sessions by using
the Mobile Survey or in Schedule Builder.
4
HotSpot Synchronization
A Peek Under the Hood
David Buck
Principal Member of Technical Staff
Java SE
October 26, 2015
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
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, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
6
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
Introduction
Java Locking Review
HotSpot’s Implementation
Profiling & Tuning
Everything Else
1
2
3
4
5
7
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Howdy!
David Buck
• Java SE Sustaining Engineering
• I Fix JVM Bugs
• Hobbies:
(non-Java) programming
8
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Introduction
9
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What We’ll Cover
synchronized(this) {
c++;
}
10
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What We’ll Cover
synchronized(this) {
c++;
}
11
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What We’ll Cover
3: monitorenter
4: aload_0
5: dup
6: getfield #2 // Field c:I
9: iconst_1
10: iadd
11: putfield #2 // Field c:I
14: aload_1
15: monitorexit
12
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What We’ll Cover
3: monitorenter
4: aload_0
5: dup
6: getfield #2 // Field c:I
9: iconst_1
10: iadd
11: putfield #2 // Field c:I
14: aload_1
15: monitorexit
13
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What We Won’t Cover
14
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What We Won’t Cover
• How to use locks
15
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What We Won’t Cover
• How to use locks
• java.util.concurrent (JSR-166)
16
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
What We Won’t Cover
• How to use locks
• java.util.concurrent (JSR-166)
• Java’s memory model
17
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Motivation
18
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Motivation
• Avoiding premature optimization
19
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Motivation
• Avoiding premature optimization
• Improve Profiling, Design, and Tuning
20
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Motivation
• Avoiding premature optimization
• Improve Profiling, Design, and Tuning
• Fun!
21
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java Locking Review
22
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Multithreading as Part of the Language
23
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
• So, what exactly is a Monitor?
24
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Mutual Exclusion
25
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Mutual Exclusion
Mut ex
26
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Mutual Exclusion
Mutex
27
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
condition variable
28
"Puffin crossing, London, UK" by
secretlondon is licensed under CC BY-SA 3.0
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Monitor = Mutex + Condition Variable
29
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Monitor = Mutex + Condition Variable
• Mutex
– synchronized keyword
30
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Monitor = Mutex + Condition Variable
• Mutex
– synchronized keyword
• Condition Variable
– Object.wait()
– Object.notify()
– Object.notifyAll()
31
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java Locks are Recursive!
public synchronized void increment() {
c++;
printValue();
}
public synchronized void printValue() {
System.out.println("My value is: " + c);
}
32
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Memory Model
Establish a “happens-before” relationship
33
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
public class NoSync {
private int c = 0;
public void increment() {
c++;
}
}
34
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
public void increment();
flags: ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
0: aload_0
1: dup
2: getfield #2 // Field c:I
5: iconst_1
6: iadd
7: putfield #2 // Field c:I
10: return
35
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Block Example
public void increment() {
synchronized(this) {
c++;
}
}
36
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Block Example
public void increment();
flags: ACC_PUBLIC
Code:
stack=3, locals=3, args_size=1
0: aload_0
1: dup
2: astore_1
3: monitorenter
4: aload_0
5: dup
6: getfield #2 // Field c:I
9: iconst_1
10: iadd
11: putfield #2 // Field c:I
14: aload_1
15: monitorexit
16: goto 24
19: astore_2
20: aload_1
21: monitorexit
22: aload_2
23: athrow
24: return
Exception table:
from to target type
4 16 19 any
19 22 19 any
37
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Block Example
public void increment();
flags: ACC_PUBLIC
Code:
stack=3, locals=3, args_size=1
0: aload_0
1: dup
2: astore_1
3: monitorenter
4: aload_0
5: dup
6: getfield #2 // Field c:I
9: iconst_1
10: iadd
11: putfield #2 // Field c:I
14: aload_1
15: monitorexit
16: goto 24
19: astore_2
20: aload_1
21: monitorexit
22: aload_2
23: athrow
24: return
Exception table:
from to target type
4 16 19 any
19 22 19 any
38
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Method Example
public synchronized void increment() {
c++;
}
39
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Method Example
public synchronized void increment();
flags: ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=1, args_size=1
0: aload_0
1: dup
2: getfield #2 // Field c:I
5: iconst_1
6: iadd
7: putfield #2 // Field c:I
10: return
40
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Method Example
public synchronized void increment();
flags: ACC_PUBLIC, ACC_SYNCHRONIZED
Code:
stack=3, locals=1, args_size=1
0: aload_0
1: dup
2: getfield #2 // Field c:I
5: iconst_1
6: iadd
7: putfield #2 // Field c:I
10: return
41
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Impossible in Java Language!
public void lockMe();
flags: ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
0: aload_0
1: monitorenter
2: return
public void unlockMe();
flags: ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
0: aload_0
1: monitorexit
2: return
42
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java Bytecode
Expressive Power
Java Language
43
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java Monitor Limitations
44
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java Monitor Limitations
• No way to check status of a lock
45
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java Monitor Limitations
• No way to check status of a lock
• No timeout
46
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java Monitor Limitations
• No way to check status of a lock
• No timeout
• No way to cancel
47
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java Monitor Limitations
• No way to check status of a lock
• No timeout
• No way to cancel
• Must be recursive
48
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java Monitor Limitations
• No way to check status of a lock
• No timeout
• No way to cancel
• Must be recursive
• No reader / writer locking
49
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java Monitor Limitations
• No way to check status of a lock
• No timeout
• No way to cancel
• Must be recursive
• No reader / writer locking
• Security Issues
50
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
java.util.concurrent
51
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
HotSpot’s Implementation
52
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Design Goals
53
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Design Goals
• Every object may be used as a monitor
54
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Design Goals
• Every object may be used as a monitor
• But most objects never are
55
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Design Goals
• Every object may be used as a monitor
• But most objects never are
• Those that are locked, are usually not used by multiple threads
56
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Design Goals
• Every object may be used as a monitor
• But most objects never are
• Those that are locked, are usually not used by multiple threads
• Those that are used by multiple threads, are usually not contended
57
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Lock Types
• Fat
• Thin
• Biased
58
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Biased Thin Fat
Footprint / Overhead
59
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Fat Lock
• Rely on OS scheduler
• Best use case: long wait times
• AKA: Heavyweight lock, inflated lock
60
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Thin Lock
• Spin until lock is available
• Best use case: short pause times
• AKA: spin lock, stack lock (HS), lightweight lock
61
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Biased Lock
• Only a single thread repeatedly locks object
• If other thread needs lock, bias needs to be revoked
62
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
BiasedLock Revocation
• Stop thread that currently holds bias (STW)
• Check if thread “really” holds lock (stack walk)
63
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
BiasedLock Banning
• Object Level
• Class Level
• Booting Phase
64
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Per-Object Data
• Field data
• Metadata
– Monitor condition
– GC bookkeeping (e.g. age)
– Hash code
65
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Object Header
Field Data
Class Pointer
Mark Word
66
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Busy Mark Word is Busy
Mark Word
Hashcode GC Data Monitor
67
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Hashcode GC Data Monitor
00Data
68
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Thin Locked
Hashcode GC Data Monitor
00Displaced Mark Word Pointer
69
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Inflating
Hashcode GC Data Monitor
00NULL
70
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Unlocked
Banned for Biased Locking
Hashcode GC Data Monitor
01Unused 0
Age /
CMS
Hashcode
71
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Biased
Hashcode GC Data Monitor
01未使用 1
Age /
CMS
Thread ID / Epoc
72
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Fat Locked
Hashcode GC Data Monitor
01MonitorObject Pointer
73
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
GC Running(STW)
Hashcode GC Data Monitor
11Reserved by GC
74
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Lock Record
Copied Mark Word
Object Pointer
75
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Lock Record
Copied Mark Word
Object Pointer
01
Age /
CMS
Hash
code
Object Pointer
Thread Stack
76
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Thin Lock
01
Age /
CMS
Hash
code
Object Pointer
Field Data
Class Pointer
Pointer 00
Thread Stack Object
77
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Thin Lock (Recursive)
01
Age /
CMS
Hash
code
Object Pointer
Field Data
Class Pointer
Pointer 00
Thread Stack Object
Unused
Object Pointer
78
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Fat Lock
Field Data
Class Pointer
Pointer 00
11Unused
Object Pointer
Thread Stack Object
ObjectMonitor
01
Age /
CMS
Hash
code
Object Pointer
79
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Lock Transitions
80
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Biased Thin Fat
Footprint / Overhead
81
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Profiling & Tuning
82
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Profiling
DANGER:
Performance Impact Ahead!
83
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Profiling
• Performance Counters
• DTrace
• Java Flight Recorder
84
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Performance Counters
• No performance impact
• Not officially supported
• Intended for HotSpot troubleshooting
• Example:
jstat -snap -J-Djstat.showUnsupported=true <JVM_PID> |grep _sync
85
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
DTrace
• Most flexible
• Higher learning curve
• Supported platforms
– Solaris
– Oracle Linux
– OSX
• Must use -XX:+DTraceMonitorProbes
86
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
DTrace
Mutex Probes
• monitor-contended-enter
• monitor-contended-entered
• monitor-contended-exit
87
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
DTrace
Condition Variable Probes
• monitor-wait
• monitor-waited
• monitor-notify
• monitor-notifyAll
88
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java Flight Recorder
• Free for development use
• Supported Platforms: all OracleJDK Java SE Platforms
89
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Options
• PrintConcurrentLocks
• UseBiasedLocking
• DTraceMonitorProbes
• BiasedLockingStartupDelay
• PrintBiasedLockingStatistics
• TraceBiasedLocking
• TraceMonitorInflation
• MonitorInUseLists
• TraceMonitorMismatch
• UseHeavyMonitors
• BiasedLockingBulkRebiasThreshold
• BiasedLockingBulkRevokeThreshold
• BiasedLockingDecayTime
• SyncKnobs
90
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Options
• PrintConcurrentLocks
• UseBiasedLocking
• DTraceMonitorProbes
• BiasedLockingStartupDelay
• PrintBiasedLockingStatistics
• TraceBiasedLocking
• TraceMonitorInflation
• MonitorInUseLists
• TraceMonitorMismatch
• UseHeavyMonitors
• BiasedLockingBulkRebiasThreshold
• BiasedLockingBulkRevokeThreshold
• BiasedLockingDecayTime
• SyncKnobs
91
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
PrintConcurrentLocks
• Displays java.util.concurrent locks in thread dumps just like normal locks!
92
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
UseBiasedLocking
• Disables biased locking
• Worth trying (benchmarking) on systems with very high contention
93
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Everything Else
94
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Concurrent Programming in Java™:
Design Principles and Patterns
• JDK 1.2 Era
– No modern memory model
– The source of java.util.concurrent
• Focus on design
• A classic
95
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Java Concurrency in Practice
• JDK 1.6 Era
– New Memory Model
– java.util.concurrent
• If you read only one book on Java
concurrency…
96
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Summary
• Leave optimization up to the JVM
• If simple monitors do not provide what you need, check out
java.util.concurrent
• Profiling tools: JFR or DTrace
– Watch out for performance impact
• Everyone really should read CPiJ and JCiP
97
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Thank You!!!
98
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
References
• [ jstat man page ]
https://docs.oracle.com/javase/8/docs/technotes/tools/unix/jstat.html
• [ DTrace Probes in HotSpot VM ]
http://docs.oracle.com/javase/8/docs/technotes/guides/vm/dtrace.html
• [ JMC Tutorial ]
http://hirt.se/blog/?p=611
• [ David Dice's Weblog ]
https://blogs.oracle.com/dave/
• [ HotSpot Internals ]
https://wiki.openjdk.java.net/display/HotSpot/Main
99
HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]

More Related Content

What's hot

Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSDavid Parsons
 
Progressive Web App : Pourquoi et comment se passer des stores ?
Progressive Web App : Pourquoi et comment se passer des stores ?Progressive Web App : Pourquoi et comment se passer des stores ?
Progressive Web App : Pourquoi et comment se passer des stores ?Sébastien Ollivier
 
Php pattern matching
Php pattern matchingPhp pattern matching
Php pattern matchingJIGAR MAKHIJA
 
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesAngular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesWebStackAcademy
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsVikash Singh
 
Angular Directives | Angular 2 Custom Directives | Angular Tutorial | Angular...
Angular Directives | Angular 2 Custom Directives | Angular Tutorial | Angular...Angular Directives | Angular 2 Custom Directives | Angular Tutorial | Angular...
Angular Directives | Angular 2 Custom Directives | Angular Tutorial | Angular...Edureka!
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBhargav Anadkat
 
ORM: Object-relational mapping
ORM: Object-relational mappingORM: Object-relational mapping
ORM: Object-relational mappingAbhilash M A
 
Angular App Presentation
Angular App PresentationAngular App Presentation
Angular App PresentationElizabeth Long
 
Symfony on steroids
: Vue.js, Mercure, Panther
Symfony on steroids
: Vue.js, Mercure, PantherSymfony on steroids
: Vue.js, Mercure, Panther
Symfony on steroids
: Vue.js, Mercure, PantherLes-Tilleuls.coop
 
1 Introduction To Java Technology
1 Introduction To Java Technology 1 Introduction To Java Technology
1 Introduction To Java Technology dM Technologies
 
Checkliste Corporate Newsroom
Checkliste Corporate NewsroomCheckliste Corporate Newsroom
Checkliste Corporate NewsroomBernet Relations
 
An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)iFour Technolab Pvt. Ltd.
 

What's hot (20)

Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Progressive Web App : Pourquoi et comment se passer des stores ?
Progressive Web App : Pourquoi et comment se passer des stores ?Progressive Web App : Pourquoi et comment se passer des stores ?
Progressive Web App : Pourquoi et comment se passer des stores ?
 
AEM - Client Libraries
AEM - Client LibrariesAEM - Client Libraries
AEM - Client Libraries
 
Php pattern matching
Php pattern matchingPhp pattern matching
Php pattern matching
 
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP ServicesAngular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP Services
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Node js
Node jsNode js
Node js
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Angular Directives | Angular 2 Custom Directives | Angular Tutorial | Angular...
Angular Directives | Angular 2 Custom Directives | Angular Tutorial | Angular...Angular Directives | Angular 2 Custom Directives | Angular Tutorial | Angular...
Angular Directives | Angular 2 Custom Directives | Angular Tutorial | Angular...
 
NodeJS
NodeJSNodeJS
NodeJS
 
Basic Concept of Node.js & NPM
Basic Concept of Node.js & NPMBasic Concept of Node.js & NPM
Basic Concept of Node.js & NPM
 
Hands on the Gradle
Hands on the GradleHands on the Gradle
Hands on the Gradle
 
ORM: Object-relational mapping
ORM: Object-relational mappingORM: Object-relational mapping
ORM: Object-relational mapping
 
Angular App Presentation
Angular App PresentationAngular App Presentation
Angular App Presentation
 
Symfony on steroids
: Vue.js, Mercure, Panther
Symfony on steroids
: Vue.js, Mercure, PantherSymfony on steroids
: Vue.js, Mercure, Panther
Symfony on steroids
: Vue.js, Mercure, Panther
 
1 Introduction To Java Technology
1 Introduction To Java Technology 1 Introduction To Java Technology
1 Introduction To Java Technology
 
Checkliste Corporate Newsroom
Checkliste Corporate NewsroomCheckliste Corporate Newsroom
Checkliste Corporate Newsroom
 
An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)An Introduction of Node Package Manager (NPM)
An Introduction of Node Package Manager (NPM)
 
Web service architecture
Web service architectureWeb service architecture
Web service architecture
 

Similar to HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]

Oracle Cloud에서 애플리케이션을 개발하고 테스트하는 손쉬운 방법
Oracle Cloud에서 애플리케이션을 개발하고 테스트하는 손쉬운 방법Oracle Cloud에서 애플리케이션을 개발하고 테스트하는 손쉬운 방법
Oracle Cloud에서 애플리케이션을 개발하고 테스트하는 손쉬운 방법Mee Nam Lee
 
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]David Buck
 
JShell: An Interactive Shell for the Java Platform
JShell: An Interactive Shell for the Java PlatformJShell: An Interactive Shell for the Java Platform
JShell: An Interactive Shell for the Java PlatformJavaDayUA
 
How to Thrive on REST/WebSocket-Based Microservices
How to Thrive on REST/WebSocket-Based MicroservicesHow to Thrive on REST/WebSocket-Based Microservices
How to Thrive on REST/WebSocket-Based MicroservicesPavel Bucek
 
Take Full Advantage of the Oracle PL/SQL Compiler
Take Full Advantage of the Oracle PL/SQL CompilerTake Full Advantage of the Oracle PL/SQL Compiler
Take Full Advantage of the Oracle PL/SQL CompilerSteven Feuerstein
 
OOW15 - Maintenance Strategies for Oracle E-Business Suite
OOW15 - Maintenance Strategies for Oracle E-Business SuiteOOW15 - Maintenance Strategies for Oracle E-Business Suite
OOW15 - Maintenance Strategies for Oracle E-Business Suitevasuballa
 
10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em StartupsMySQL Brasil
 
CompletableFuture уже здесь
CompletableFuture уже здесьCompletableFuture уже здесь
CompletableFuture уже здесьDmitry Chuyko
 
Interactive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureInteractive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureJavaDayUA
 
Using Edition-Based Redefinition for Zero Downtime PL/SQL Changes
Using Edition-Based Redefinition for Zero Downtime PL/SQL ChangesUsing Edition-Based Redefinition for Zero Downtime PL/SQL Changes
Using Edition-Based Redefinition for Zero Downtime PL/SQL ChangesChris Saxon
 
2015 CJUG MVC 1.0
2015 CJUG MVC 1.02015 CJUG MVC 1.0
2015 CJUG MVC 1.0mnriem
 
How to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of DatabasesHow to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of DatabasesGuatemala User Group
 
MySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best PracticesMySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best PracticesFrederic Descamps
 
Modern App Development with Oracle Cloud
Modern App Development with Oracle CloudModern App Development with Oracle Cloud
Modern App Development with Oracle CloudJuan Carlos Ruiz Rico
 
What is DevOps?
What is DevOps?What is DevOps?
What is DevOps?jeckels
 

Similar to HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570] (20)

Oracle Cloud에서 애플리케이션을 개발하고 테스트하는 손쉬운 방법
Oracle Cloud에서 애플리케이션을 개발하고 테스트하는 손쉬운 방법Oracle Cloud에서 애플리케이션을 개발하고 테스트하는 손쉬운 방법
Oracle Cloud에서 애플리케이션을 개발하고 테스트하는 손쉬운 방법
 
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]
 
JShell: An Interactive Shell for the Java Platform
JShell: An Interactive Shell for the Java PlatformJShell: An Interactive Shell for the Java Platform
JShell: An Interactive Shell for the Java Platform
 
How to Thrive on REST/WebSocket-Based Microservices
How to Thrive on REST/WebSocket-Based MicroservicesHow to Thrive on REST/WebSocket-Based Microservices
How to Thrive on REST/WebSocket-Based Microservices
 
Take Full Advantage of the Oracle PL/SQL Compiler
Take Full Advantage of the Oracle PL/SQL CompilerTake Full Advantage of the Oracle PL/SQL Compiler
Take Full Advantage of the Oracle PL/SQL Compiler
 
Partitioning 101
Partitioning 101Partitioning 101
Partitioning 101
 
OOW15 - Maintenance Strategies for Oracle E-Business Suite
OOW15 - Maintenance Strategies for Oracle E-Business SuiteOOW15 - Maintenance Strategies for Oracle E-Business Suite
OOW15 - Maintenance Strategies for Oracle E-Business Suite
 
Cool SQL Features
Cool SQL FeaturesCool SQL Features
Cool SQL Features
 
MVC 1.0 / JSR 371
MVC 1.0 / JSR 371MVC 1.0 / JSR 371
MVC 1.0 / JSR 371
 
10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups
 
CompletableFuture уже здесь
CompletableFuture уже здесьCompletableFuture уже здесь
CompletableFuture уже здесь
 
Interactive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureInteractive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and Architecture
 
Using Edition-Based Redefinition for Zero Downtime PL/SQL Changes
Using Edition-Based Redefinition for Zero Downtime PL/SQL ChangesUsing Edition-Based Redefinition for Zero Downtime PL/SQL Changes
Using Edition-Based Redefinition for Zero Downtime PL/SQL Changes
 
Brickman-Brunette 2015-ICMC
Brickman-Brunette 2015-ICMCBrickman-Brunette 2015-ICMC
Brickman-Brunette 2015-ICMC
 
2015 CJUG MVC 1.0
2015 CJUG MVC 1.02015 CJUG MVC 1.0
2015 CJUG MVC 1.0
 
JavaMicroBenchmarkpptm
JavaMicroBenchmarkpptmJavaMicroBenchmarkpptm
JavaMicroBenchmarkpptm
 
How to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of DatabasesHow to Upgrade Hundreds or Thousands of Databases
How to Upgrade Hundreds or Thousands of Databases
 
MySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best PracticesMySQL Group Replication: Handling Network Glitches - Best Practices
MySQL Group Replication: Handling Network Glitches - Best Practices
 
Modern App Development with Oracle Cloud
Modern App Development with Oracle CloudModern App Development with Oracle Cloud
Modern App Development with Oracle Cloud
 
What is DevOps?
What is DevOps?What is DevOps?
What is DevOps?
 

More from David Buck

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]David Buck
 
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...David Buck
 
Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]David Buck
 
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...David Buck
 
invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]David Buck
 
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...David Buck
 
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
 
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]David Buck
 
Z Garbage Collector
Z Garbage CollectorZ Garbage Collector
Z Garbage CollectorDavid Buck
 
Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019Valhalla Update JJUG CCC Spring 2019
Valhalla Update JJUG CCC Spring 2019David Buck
 
Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018Var handles jjug_ccc_spring_2018
Var handles jjug_ccc_spring_2018David Buck
 
JDK 10 へようこそ
JDK 10 へようこそJDK 10 へようこそ
JDK 10 へようこそDavid Buck
 
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]David Buck
 
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月]David Buck
 
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]David Buck
 
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]David Buck
 
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]David Buck
 
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]David Buck
 
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]David Buck
 
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]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...
 
Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]Java Bytecode Crash Course [Code One 2019]
Java Bytecode Crash Course [Code One 2019]
 
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
CSI (Crash Scene Investigation) HotSpot: Common JVM Crash Causes and Solution...
 
invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]invokedynamic for Mere Mortals [Code One 2019]
invokedynamic for Mere Mortals [Code One 2019]
 
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
Hangs, Slowdowns, Starvation—Oh My! A Deep Dive into the Life of a Java Threa...
 
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]
 
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
Java Concurrency, A(nother) Peek Under the Hood [Code One 2019]
 
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]
 

Recently uploaded

Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 

Recently uploaded (20)

Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 

HotSpot Synchronization, A Peek Under the Hood [JavaOne 2015 CON7570]

  • 1.
  • 2.
  • 3. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | 3 Classroom Training Learning Subscription Live Virtual Class Training On Demand Keep Learning with Oracle University education.oracle.com Cloud Technology Applications Industries
  • 4. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Session Surveys Help us help you!! • Oracle would like to invite you to take a moment to give us your session feedback. Your feedback will help us to improve your conference. • Please be sure to add your feedback for your attended sessions by using the Mobile Survey or in Schedule Builder. 4
  • 5. HotSpot Synchronization A Peek Under the Hood David Buck Principal Member of Technical Staff Java SE October 26, 2015 Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
  • 6. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement 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, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 6
  • 7. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Program Agenda Introduction Java Locking Review HotSpot’s Implementation Profiling & Tuning Everything Else 1 2 3 4 5 7
  • 8. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Howdy! David Buck • Java SE Sustaining Engineering • I Fix JVM Bugs • Hobbies: (non-Java) programming 8
  • 9. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Introduction 9
  • 10. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What We’ll Cover synchronized(this) { c++; } 10
  • 11. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What We’ll Cover synchronized(this) { c++; } 11
  • 12. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What We’ll Cover 3: monitorenter 4: aload_0 5: dup 6: getfield #2 // Field c:I 9: iconst_1 10: iadd 11: putfield #2 // Field c:I 14: aload_1 15: monitorexit 12
  • 13. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What We’ll Cover 3: monitorenter 4: aload_0 5: dup 6: getfield #2 // Field c:I 9: iconst_1 10: iadd 11: putfield #2 // Field c:I 14: aload_1 15: monitorexit 13
  • 14. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What We Won’t Cover 14
  • 15. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What We Won’t Cover • How to use locks 15
  • 16. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What We Won’t Cover • How to use locks • java.util.concurrent (JSR-166) 16
  • 17. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | What We Won’t Cover • How to use locks • java.util.concurrent (JSR-166) • Java’s memory model 17
  • 18. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Motivation 18
  • 19. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Motivation • Avoiding premature optimization 19
  • 20. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Motivation • Avoiding premature optimization • Improve Profiling, Design, and Tuning 20
  • 21. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Motivation • Avoiding premature optimization • Improve Profiling, Design, and Tuning • Fun! 21
  • 22. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Java Locking Review 22
  • 23. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Multithreading as Part of the Language 23
  • 24. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | • So, what exactly is a Monitor? 24
  • 25. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Mutual Exclusion 25
  • 26. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Mutual Exclusion Mut ex 26
  • 27. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Mutual Exclusion Mutex 27
  • 28. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | condition variable 28 "Puffin crossing, London, UK" by secretlondon is licensed under CC BY-SA 3.0
  • 29. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Monitor = Mutex + Condition Variable 29
  • 30. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Monitor = Mutex + Condition Variable • Mutex – synchronized keyword 30
  • 31. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Monitor = Mutex + Condition Variable • Mutex – synchronized keyword • Condition Variable – Object.wait() – Object.notify() – Object.notifyAll() 31
  • 32. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Java Locks are Recursive! public synchronized void increment() { c++; printValue(); } public synchronized void printValue() { System.out.println("My value is: " + c); } 32
  • 33. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Memory Model Establish a “happens-before” relationship 33
  • 34. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | public class NoSync { private int c = 0; public void increment() { c++; } } 34
  • 35. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | public void increment(); flags: ACC_PUBLIC Code: stack=3, locals=1, args_size=1 0: aload_0 1: dup 2: getfield #2 // Field c:I 5: iconst_1 6: iadd 7: putfield #2 // Field c:I 10: return 35
  • 36. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Block Example public void increment() { synchronized(this) { c++; } } 36
  • 37. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Block Example public void increment(); flags: ACC_PUBLIC Code: stack=3, locals=3, args_size=1 0: aload_0 1: dup 2: astore_1 3: monitorenter 4: aload_0 5: dup 6: getfield #2 // Field c:I 9: iconst_1 10: iadd 11: putfield #2 // Field c:I 14: aload_1 15: monitorexit 16: goto 24 19: astore_2 20: aload_1 21: monitorexit 22: aload_2 23: athrow 24: return Exception table: from to target type 4 16 19 any 19 22 19 any 37
  • 38. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Block Example public void increment(); flags: ACC_PUBLIC Code: stack=3, locals=3, args_size=1 0: aload_0 1: dup 2: astore_1 3: monitorenter 4: aload_0 5: dup 6: getfield #2 // Field c:I 9: iconst_1 10: iadd 11: putfield #2 // Field c:I 14: aload_1 15: monitorexit 16: goto 24 19: astore_2 20: aload_1 21: monitorexit 22: aload_2 23: athrow 24: return Exception table: from to target type 4 16 19 any 19 22 19 any 38
  • 39. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Method Example public synchronized void increment() { c++; } 39
  • 40. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Method Example public synchronized void increment(); flags: ACC_PUBLIC, ACC_SYNCHRONIZED Code: stack=3, locals=1, args_size=1 0: aload_0 1: dup 2: getfield #2 // Field c:I 5: iconst_1 6: iadd 7: putfield #2 // Field c:I 10: return 40
  • 41. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Method Example public synchronized void increment(); flags: ACC_PUBLIC, ACC_SYNCHRONIZED Code: stack=3, locals=1, args_size=1 0: aload_0 1: dup 2: getfield #2 // Field c:I 5: iconst_1 6: iadd 7: putfield #2 // Field c:I 10: return 41
  • 42. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Impossible in Java Language! public void lockMe(); flags: ACC_PUBLIC Code: stack=1, locals=1, args_size=1 0: aload_0 1: monitorenter 2: return public void unlockMe(); flags: ACC_PUBLIC Code: stack=1, locals=1, args_size=1 0: aload_0 1: monitorexit 2: return 42
  • 43. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Java Bytecode Expressive Power Java Language 43
  • 44. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Java Monitor Limitations 44
  • 45. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Java Monitor Limitations • No way to check status of a lock 45
  • 46. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Java Monitor Limitations • No way to check status of a lock • No timeout 46
  • 47. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Java Monitor Limitations • No way to check status of a lock • No timeout • No way to cancel 47
  • 48. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Java Monitor Limitations • No way to check status of a lock • No timeout • No way to cancel • Must be recursive 48
  • 49. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Java Monitor Limitations • No way to check status of a lock • No timeout • No way to cancel • Must be recursive • No reader / writer locking 49
  • 50. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Java Monitor Limitations • No way to check status of a lock • No timeout • No way to cancel • Must be recursive • No reader / writer locking • Security Issues 50
  • 51. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | java.util.concurrent 51
  • 52. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | HotSpot’s Implementation 52
  • 53. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Design Goals 53
  • 54. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Design Goals • Every object may be used as a monitor 54
  • 55. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Design Goals • Every object may be used as a monitor • But most objects never are 55
  • 56. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Design Goals • Every object may be used as a monitor • But most objects never are • Those that are locked, are usually not used by multiple threads 56
  • 57. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Design Goals • Every object may be used as a monitor • But most objects never are • Those that are locked, are usually not used by multiple threads • Those that are used by multiple threads, are usually not contended 57
  • 58. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Lock Types • Fat • Thin • Biased 58
  • 59. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Biased Thin Fat Footprint / Overhead 59
  • 60. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Fat Lock • Rely on OS scheduler • Best use case: long wait times • AKA: Heavyweight lock, inflated lock 60
  • 61. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Thin Lock • Spin until lock is available • Best use case: short pause times • AKA: spin lock, stack lock (HS), lightweight lock 61
  • 62. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Biased Lock • Only a single thread repeatedly locks object • If other thread needs lock, bias needs to be revoked 62
  • 63. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | BiasedLock Revocation • Stop thread that currently holds bias (STW) • Check if thread “really” holds lock (stack walk) 63
  • 64. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | BiasedLock Banning • Object Level • Class Level • Booting Phase 64
  • 65. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Per-Object Data • Field data • Metadata – Monitor condition – GC bookkeeping (e.g. age) – Hash code 65
  • 66. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Object Header Field Data Class Pointer Mark Word 66
  • 67. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Busy Mark Word is Busy Mark Word Hashcode GC Data Monitor 67
  • 68. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Hashcode GC Data Monitor 00Data 68
  • 69. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Thin Locked Hashcode GC Data Monitor 00Displaced Mark Word Pointer 69
  • 70. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Inflating Hashcode GC Data Monitor 00NULL 70
  • 71. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Unlocked Banned for Biased Locking Hashcode GC Data Monitor 01Unused 0 Age / CMS Hashcode 71
  • 72. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Biased Hashcode GC Data Monitor 01未使用 1 Age / CMS Thread ID / Epoc 72
  • 73. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Fat Locked Hashcode GC Data Monitor 01MonitorObject Pointer 73
  • 74. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | GC Running(STW) Hashcode GC Data Monitor 11Reserved by GC 74
  • 75. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Lock Record Copied Mark Word Object Pointer 75
  • 76. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Lock Record Copied Mark Word Object Pointer 01 Age / CMS Hash code Object Pointer Thread Stack 76
  • 77. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Thin Lock 01 Age / CMS Hash code Object Pointer Field Data Class Pointer Pointer 00 Thread Stack Object 77
  • 78. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Thin Lock (Recursive) 01 Age / CMS Hash code Object Pointer Field Data Class Pointer Pointer 00 Thread Stack Object Unused Object Pointer 78
  • 79. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Fat Lock Field Data Class Pointer Pointer 00 11Unused Object Pointer Thread Stack Object ObjectMonitor 01 Age / CMS Hash code Object Pointer 79
  • 80. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Lock Transitions 80
  • 81. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Biased Thin Fat Footprint / Overhead 81
  • 82. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Profiling & Tuning 82
  • 83. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Profiling DANGER: Performance Impact Ahead! 83
  • 84. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Profiling • Performance Counters • DTrace • Java Flight Recorder 84
  • 85. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Performance Counters • No performance impact • Not officially supported • Intended for HotSpot troubleshooting • Example: jstat -snap -J-Djstat.showUnsupported=true <JVM_PID> |grep _sync 85
  • 86. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | DTrace • Most flexible • Higher learning curve • Supported platforms – Solaris – Oracle Linux – OSX • Must use -XX:+DTraceMonitorProbes 86
  • 87. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | DTrace Mutex Probes • monitor-contended-enter • monitor-contended-entered • monitor-contended-exit 87
  • 88. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | DTrace Condition Variable Probes • monitor-wait • monitor-waited • monitor-notify • monitor-notifyAll 88
  • 89. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Java Flight Recorder • Free for development use • Supported Platforms: all OracleJDK Java SE Platforms 89
  • 90. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Options • PrintConcurrentLocks • UseBiasedLocking • DTraceMonitorProbes • BiasedLockingStartupDelay • PrintBiasedLockingStatistics • TraceBiasedLocking • TraceMonitorInflation • MonitorInUseLists • TraceMonitorMismatch • UseHeavyMonitors • BiasedLockingBulkRebiasThreshold • BiasedLockingBulkRevokeThreshold • BiasedLockingDecayTime • SyncKnobs 90
  • 91. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Options • PrintConcurrentLocks • UseBiasedLocking • DTraceMonitorProbes • BiasedLockingStartupDelay • PrintBiasedLockingStatistics • TraceBiasedLocking • TraceMonitorInflation • MonitorInUseLists • TraceMonitorMismatch • UseHeavyMonitors • BiasedLockingBulkRebiasThreshold • BiasedLockingBulkRevokeThreshold • BiasedLockingDecayTime • SyncKnobs 91
  • 92. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | PrintConcurrentLocks • Displays java.util.concurrent locks in thread dumps just like normal locks! 92
  • 93. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | UseBiasedLocking • Disables biased locking • Worth trying (benchmarking) on systems with very high contention 93
  • 94. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Everything Else 94
  • 95. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Concurrent Programming in Java™: Design Principles and Patterns • JDK 1.2 Era – No modern memory model – The source of java.util.concurrent • Focus on design • A classic 95
  • 96. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Java Concurrency in Practice • JDK 1.6 Era – New Memory Model – java.util.concurrent • If you read only one book on Java concurrency… 96
  • 97. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Summary • Leave optimization up to the JVM • If simple monitors do not provide what you need, check out java.util.concurrent • Profiling tools: JFR or DTrace – Watch out for performance impact • Everyone really should read CPiJ and JCiP 97
  • 98. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Thank You!!! 98
  • 99. Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | References • [ jstat man page ] https://docs.oracle.com/javase/8/docs/technotes/tools/unix/jstat.html • [ DTrace Probes in HotSpot VM ] http://docs.oracle.com/javase/8/docs/technotes/guides/vm/dtrace.html • [ JMC Tutorial ] http://hirt.se/blog/?p=611 • [ David Dice's Weblog ] https://blogs.oracle.com/dave/ • [ HotSpot Internals ] https://wiki.openjdk.java.net/display/HotSpot/Main 99