SlideShare a Scribd company logo
1 of 66
Download to read offline
mjprof : 
A Monadic Approach 
for JVM Profiling 
Haim Yadid 
Performize-IT 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
About Me: Haim Yadid 
• 21 Years of SW development experience 
• independent Performance Expert 
• Consulting R&D Groups 
• Training: Java Performance Optimization 
• Community leader : Java.IL 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Java.IL 
• Israeli Java Community and User Group 
• Meetup : www.meetup.com/JavaIL/ 
• Twitter: @java_il 
• ~ 400 members 
• Meeting every month 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Background 
& 
Motivation 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
The Two Most Important Questions 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
The Two Most Important Questions 
My wife asks me 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
The Two Most Important Questions 
My wife asks me 
What are you doing? When will you be back? 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Profiler 
• A Performance analysis tool 
• Which answers questions about method calls: 
• E.g. : Number of invocation, Average duration,CPU 
consumptions Contention Memory allocation IO, Cache 
misses etc….. 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Statistical Profiler 
• A.k.a. as Sampling Profiler 
• Samples the treads activity every several milliseconds 
• Not very accurate for short tasks 
• Low/Medium overhead 
• Do not provide the number of invocations 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Instrumenting Profiler 
• A.k.a Tracing 
• Instruments the code 
• Knows when a method starts and when it ends 
• High overhead (depends on instrumentation) 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Instrumenting Profiler 
• A.k.a Tracing 
• Instruments the code 
• Knows when a method starts and when it ends 
• High overhead (depends on instrumentation) 
Public void foo(a) { 
Measure start time 
increase invocation count 
bla bla; 
Measure end time 
} 
Injected 
code 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
jstack - A Poor Man’s Profiler 
• The most trivial sampling profiler 
• Part of the JDK 
• Connects to a running JVM and samples all the threads 
• Only once ! 
• Writes to standard output 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
And it looks like this 
• For each thread we have the following block 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
And it looks like this 
• For each thread we have the following block 
Thread name Priority Id and native id 
"pool-35-thread-1" prio=5 tid=10315b800 nid=0x12c1fe000 waiting on condition 
[12c1fd000] 
java.lang.Thread.State: TIMED_WAITING (parking) 
at sun.misc.Unsafe.park(Native Method) 
- parking to wait for <107ac0140> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) 
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198) 
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos 
..... 
Locked ownable synchronizers: 
- None 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Now do this a Million Times! 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Now do this a Million Times! 
• Tons of threads 
• Deep stacks 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
mjprof 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
mjprof 
• A command line tool 
• Acts on jstack output 
• Extends it (enriched thread dumps) 
• Applies a sequence of operations (monads) to 
• Filter 
• Aggregate 
• Manipulate 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Prerequisites 
• Java installed 
• Set JAVA_HOME (JDK1.7 or later) 
• Add ${JAVA_HOME}/bin to path 
• Attaching to processes requires JDK and not JRE 
• Can run on a headless machine 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Installing mjprof 
• Git repo : 
https://github.com/AdoptOpenJDK/mjprof 
• Download and unzip 
unzip mjprof1.0-bin.zip 
• Or clone and build 
mvn install assembly:assembly 
• Add mjprof directory to your path 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Synopsis and Help (Smoke test) 
• Running mjprof without parameters will print help 
• It is a good way to see it is functioning 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Synopsis and Help (Smoke test) 
• Running mjprof without parameters will print help 
• It is a good way to see it is functioning 
➜ mjprof git:(master) ✗ mjprof 
Synopsis 
A list of the following monads concatenated with . 
… 
Data sources: 
jstack/pid,[count],[sleep]/ -Generate dumps using stack 
path/path/ -Read thread dump from file 
stdin -Read thread dumps from standard input 
visualvm/path/ -Read profiling session from xml export of VisualVM 
…. 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Monads 
• Pipeline Building blocks 
• Monads can 
• Collect data 
• Filter out certain threads 
• Transform threads information 
• Aggregate threads information 
• Snapshot write state to a file or GUI 
• Concatenate with a . (period) 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Data Sources 
stdin 
file 
jstack 
jmx 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Data Sources 
stdin • cat mythreaddump.txt | mjprof … 
file 
jstack 
jmx 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Data Sources 
• cat mythreaddump.txt | mjprof … 
• mjprof path/mythreaddump.txt/ 
stdin 
file 
jstack 
jmx 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Data Sources 
• cat mythreaddump.txt | mjprof … 
• mjprof path/mythreaddump.txt/ 
• mjprof jstack/19873/ 
stdin 
file 
jstack 
jmx 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Data Sources 
• cat mythreaddump.txt | mjprof … 
• mjprof path/mythreaddump.txt/ 
• mjprof jstack/19873/ 
• mjprof jmx/myhost:65327/ 
stdin 
file 
jstack 
jmx 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Monads 
Filters Aggregations Stack frame level 
contains -contains group 
-prop -fn 
merge 
sort 
-sort 
frame 
waiting -locks 
count 
mergedcalles 
-frame 
top 
bottom 
trimbelow 
namesuf 
-fn 
-pkg 
jvm -jvm 
blocked 
locks 
running withstack 
output 
stdout 
gui 
snapshot 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Extending mjprof 
• mjprof is inherently extensible 
• Macros 
• A text file named macros.properties 
• Contains a sequence of macros 
• Plugins 
• Annotate your extension with @Plugin 
• Compile it and place your jar in the directory plugins under mjprof 
installation 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
10 mjprof Recipes 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How many threads my process has? 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How many threads my process has? 
path/stack.txt/ 
mjprof jstack/1971/ 
jstack/MainClass/ 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How many threads my process has? 
path/stack.txt/ 
mjprof jstack/1971/ . count 
jstack/MainClass/ 
➜ distro mjprof jstack/1971/.count 
2014-11-01 10:34:10 
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.0-b70 mixed mode): 
Total number of threads is 1045 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How many jetty thread are working ATM? 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How many jetty thread are working ATM? 
mjprof jstack/MyApp/ 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How many jetty thread are working ATM? 
mjprof jstack/MyApp/ . contains/name,qtp/ 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How many jetty thread are working ATM? 
mjprof jstack/MyApp/ . contains/name,qtp/ 
. contains/state,RUN/ 
➜ 04112014 mjprof jstack/My4tApp/.contains/name,qtp/ 
2014-11-04 20:05:03 
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.0-b70 mixed mode): 
"qtp817406040-17-selector-ServerConnectorManager@69b87e8d/3" prio=5 ….3 runnable 
[0x000000011bc5f000] 
java.lang.Thread.State: RUNNABLE 
at sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method) 
at sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:202) 
at sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:103) 
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) 
- locked <0x0000000780209080> (a sun.nio.ch.Util$2) 
- locked <0x0000000780209070> (a java.util.Collections$UnmodifiableSet) 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How many jetty thread are working ATM? 
mjprof jstack/MyApp/ . contains/name,qtp/ 
. contains/state,RUN/ . count 
➜ 04112014 mjprof jstack/My4tApp/.contains/name,qtp/ 
2014-11-04 20:05:03 
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.0-b70 mixed mode): 
"qtp817406040-17-selector-ServerConnectorManager@69b87e8d/3" prio=5 ….3 runnable 
[0x000000011bc5f000] 
java.lang.Thread.State: RUNNABLE 
at sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method) 
at sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:202) 
at sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:103) 
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) 
- locked <0x0000000780209080> (a sun.nio.ch.Util$2) 
- locked <0x0000000780209070> (a java.util.Collections$UnmodifiableSet) 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: Which threads are running my logic ? 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: Which threads are running my logic ? 
mjprof jstack/MyApp/ . contains/stack,myapp/ 
2014-11-04 20:11:55 
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.0-b70 mixed mode): 
"Indexing daemon" prio=5 tid=0x00007fb306bf4800 nid=0x6307 waiting on condition 
[0x000000011c171000] 
java.lang.Thread.State: TIMED_WAITING (sleeping) 
at java.lang.Thread.sleep(Native Method) 
at com.myapp.IndexManagement$1.run(IndexManagement.java:148) 
"main" prio=5 tid=0x00007fb303809000 nid=0x1303 in Object.wait() 
[0x0000000105500000] 
java.lang.Thread.State: WAITING (on object monitor) 
at java.lang.Object.wait(Native Method) 
at java.lang.Object.wait(Object.java:502) 
at com.myapp.MyAppApp.main(MyAppApp.java:18) 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: Stack-trace is cluttered, how do I shorten it ? 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: Stack-trace is cluttered, how do I shorten it ? 
mjprof jmx/MyApp/ . 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: Stack-trace is cluttered, how do I shorten it ? 
mjprof jmx/MyApp/ . frame/mycompany/ 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: Stack-trace is cluttered, how do I shorten it ? 
mjprof jmx/MyApp/ . frame/mycompany/ 
-frame/grizzly/ 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: Stack-trace is cluttered, how do I shorten it ? 
mjprof jmx/MyApp/ . frame/mycompany/ 
-frame/grizzly/ 
top/3/ 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How can I group threads by state ? 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How can I group threads by state ? 
mjprof jmx/MyApp/ . group/state/ . gui 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How do I aggregate several thread dumps 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How do I aggregate several thread dumps 
mjprof jmx/MyApp,10,1000/ 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How do I aggregate several thread dumps 
mjprof jmx/MyApp,10,1000/ . 
group/state/ 
merge 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How do I aggregate several thread dumps 
mjprof jmx/MyApp,10,1000/ . 
group/state/ 
merge . 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How can I combine thread dumps from several processes? 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: How can I combine thread dumps from several processes? 
mjprof jmx/myhost1.com:5467/ . 
jmx/myhost2.com:5467/ . 
group/state/ . gui 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
#Devoxx #Performance #AdoptOpenJDK @lifeyx
How do I measure thread pool CPU consumption? 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
How do I measure thread pool CPU consumption? 
mjprof jmxc/MyApp/ 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
How do I measure thread pool CPU consumption? 
mjprof jmxc/MyApp/ . contains/name,COFFEE/ 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
How do I measure thread pool CPU consumption? 
mjprof jmxc/MyApp/ . contains/name,COFFEE/ 
. -pkg . group 
"*" count=7 tid=* cpu_ns=1164536000 wall_ms=4804 %cpu=24.24 
java.lang.Thread.State: TIMED_WAITING 
100.00% [7/7] at Thread.run(Thread.java:744) 
100.00% [7/7]  at Sleeper.run(Sleeper.java:51) 
100.00% [7/7]  at Sleeper.loopForever(Sleeper.java:37) 
100.00% [7/7]  at Sleeper.longerStackTrace(Sleeper.java:32) 
100.00% [7/7]  at Sleeper.longerStackTrace(Sleeper.java:32) 
100.00% [7/7]  at Sleeper.longerStackTrace(Sleeper.java:32) 
100.00% [7/7]  at Sleeper.longerStackTrace(Sleeper.java:32) 
100.00% [7/7]  at Sleeper.longerStackTrace(Sleeper.java:32) 
100.00% [7/7]  at Sleeper.longerStackTrace(Sleeper.java:30) 
100.00% [7/7]  at Recurse.singleCycle(Recurse.java:16) 
100.00% [7/7]  at Recurse.doRecursion(Recurse.java:25) 
100.00% [7/7]  at Recurse.doRecursion(Recurse.java:25) 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: Which threads are blocked by the lock I hold 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: Which threads are blocked by the lock I hold 
mjprof path/threaddump.txt/ . 
blocked 
. 
contains/stack,0x00000007aab51b38/ 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: What is the overall locking state of my application 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Question: What is the overall locking state of my application 
mjprof path/threaddump.txt/ . 
contains/stack,myapp/ 
locks 
. 
"CPU3_5" prio=5 tid=0x00007fc4f4889800 nid=0x5703 waiting for monitor… 
java.lang.Thread.State: BLOCKED (on object monitor) 
- waiting to lock <0x00000007aad98988> (a java.lang.Object) 
"CPU3_4" prio=5 tid=0x00007fc4f404a800 nid=0x5503 waiting for monitor… 
java.lang.Thread.State: BLOCKED (on object monitor) 
- waiting to lock <0x00000007aad98988> (a java.lang.Object) 
"CPU3_3" prio=5 tid=0x00007fc4f4049800 nid=0x5303 waiting on … 
java.lang.Thread.State: TIMED_WAITING (sleeping) 
- locked <0x00000007aad98988> (a java.lang.Object) 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
3#! 
#Devoxx #Performance #AdoptOpenJDK @lifeyx
Thanks / Contact Me 
lifey@performize-it.com 
blog.performize-it.com 
www.performize-it.com 
https://github.com/lifey 
http://il.linkedin.com/in/haimyadid 
@lifeyx 
#Devoxx #Performance #AdoptOpenJDK @lifeyx

More Related Content

What's hot

Beyond JVM - YOW Melbourne 2013
Beyond JVM - YOW Melbourne 2013Beyond JVM - YOW Melbourne 2013
Beyond JVM - YOW Melbourne 2013Charles Nutter
 
Vulnerability desing patterns
Vulnerability desing patternsVulnerability desing patterns
Vulnerability desing patternsPeter Hlavaty
 
DeathNote of Microsoft Windows Kernel
DeathNote of Microsoft Windows KernelDeathNote of Microsoft Windows Kernel
DeathNote of Microsoft Windows KernelPeter Hlavaty
 
NovaProva, a new generation unit test framework for C programs
NovaProva, a new generation unit test framework for C programsNovaProva, a new generation unit test framework for C programs
NovaProva, a new generation unit test framework for C programsGreg Banks
 
Devoxx PL: Is your profiler speaking the same language as you?
Devoxx PL: Is your profiler speaking the same language as you?Devoxx PL: Is your profiler speaking the same language as you?
Devoxx PL: Is your profiler speaking the same language as you?Simon Maple
 
DevoxxUK: Is your profiler speaking the same language as you?
DevoxxUK: Is your profiler speaking the same language as you?DevoxxUK: Is your profiler speaking the same language as you?
DevoxxUK: Is your profiler speaking the same language as you?Simon Maple
 
Power of linked list
Power of linked listPower of linked list
Power of linked listPeter Hlavaty
 
Guardians of your CODE
Guardians of your CODEGuardians of your CODE
Guardians of your CODEPeter Hlavaty
 
How to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineHow to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineChun-Yu Wang
 
Solaris DTrace, An Introduction
Solaris DTrace, An IntroductionSolaris DTrace, An Introduction
Solaris DTrace, An Introductionsatyajit_t
 
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the CoreNSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the CoreNoSuchCon
 
You didnt see it’s coming? "Dawn of hardened Windows Kernel"
You didnt see it’s coming? "Dawn of hardened Windows Kernel" You didnt see it’s coming? "Dawn of hardened Windows Kernel"
You didnt see it’s coming? "Dawn of hardened Windows Kernel" Peter Hlavaty
 

What's hot (19)

De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14
 
Attack on the Core
Attack on the CoreAttack on the Core
Attack on the Core
 
Beyond JVM - YOW Melbourne 2013
Beyond JVM - YOW Melbourne 2013Beyond JVM - YOW Melbourne 2013
Beyond JVM - YOW Melbourne 2013
 
De Java 8 a Java 17
De Java 8 a Java 17De Java 8 a Java 17
De Java 8 a Java 17
 
Back to the CORE
Back to the COREBack to the CORE
Back to the CORE
 
Vulnerability desing patterns
Vulnerability desing patternsVulnerability desing patterns
Vulnerability desing patterns
 
DeathNote of Microsoft Windows Kernel
DeathNote of Microsoft Windows KernelDeathNote of Microsoft Windows Kernel
DeathNote of Microsoft Windows Kernel
 
NovaProva, a new generation unit test framework for C programs
NovaProva, a new generation unit test framework for C programsNovaProva, a new generation unit test framework for C programs
NovaProva, a new generation unit test framework for C programs
 
Devoxx PL: Is your profiler speaking the same language as you?
Devoxx PL: Is your profiler speaking the same language as you?Devoxx PL: Is your profiler speaking the same language as you?
Devoxx PL: Is your profiler speaking the same language as you?
 
DevoxxUK: Is your profiler speaking the same language as you?
DevoxxUK: Is your profiler speaking the same language as you?DevoxxUK: Is your profiler speaking the same language as you?
DevoxxUK: Is your profiler speaking the same language as you?
 
Power of linked list
Power of linked listPower of linked list
Power of linked list
 
Guardians of your CODE
Guardians of your CODEGuardians of your CODE
Guardians of your CODE
 
De Java 8 ate Java 14
De Java 8 ate Java 14De Java 8 ate Java 14
De Java 8 ate Java 14
 
Thread dumps
Thread dumpsThread dumps
Thread dumps
 
How to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machineHow to implement a simple dalvik virtual machine
How to implement a simple dalvik virtual machine
 
Solaris DTrace, An Introduction
Solaris DTrace, An IntroductionSolaris DTrace, An Introduction
Solaris DTrace, An Introduction
 
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the CoreNSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
NSC #2 - D3 02 - Peter Hlavaty - Attack on the Core
 
Threads
ThreadsThreads
Threads
 
You didnt see it’s coming? "Dawn of hardened Windows Kernel"
You didnt see it’s coming? "Dawn of hardened Windows Kernel" You didnt see it’s coming? "Dawn of hardened Windows Kernel"
You didnt see it’s coming? "Dawn of hardened Windows Kernel"
 

Viewers also liked

Java 8 Launch - MetaSpaces
Java 8 Launch - MetaSpacesJava 8 Launch - MetaSpaces
Java 8 Launch - MetaSpacesHaim Yadid
 
Coding for Android on steroids with Kotlin
Coding for Android on steroids with KotlinCoding for Android on steroids with Kotlin
Coding for Android on steroids with KotlinKai Koenig
 
Taking Kotlin to production, Seriously
Taking Kotlin to production, SeriouslyTaking Kotlin to production, Seriously
Taking Kotlin to production, SeriouslyHaim Yadid
 
A topology of memory leaks on the JVM
A topology of memory leaks on the JVMA topology of memory leaks on the JVM
A topology of memory leaks on the JVMRafael Winterhalter
 
The Future of Futures - A Talk About Java 8 CompletableFutures
The Future of Futures - A Talk About Java 8 CompletableFuturesThe Future of Futures - A Talk About Java 8 CompletableFutures
The Future of Futures - A Talk About Java 8 CompletableFuturesHaim Yadid
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaRick Warren
 
Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8AppDynamics
 
Playing with State Monad
Playing with State MonadPlaying with State Monad
Playing with State MonadDavid Galichet
 

Viewers also liked (10)

Java 8 Launch - MetaSpaces
Java 8 Launch - MetaSpacesJava 8 Launch - MetaSpaces
Java 8 Launch - MetaSpaces
 
Coding for Android on steroids with Kotlin
Coding for Android on steroids with KotlinCoding for Android on steroids with Kotlin
Coding for Android on steroids with Kotlin
 
Taking Kotlin to production, Seriously
Taking Kotlin to production, SeriouslyTaking Kotlin to production, Seriously
Taking Kotlin to production, Seriously
 
A topology of memory leaks on the JVM
A topology of memory leaks on the JVMA topology of memory leaks on the JVM
A topology of memory leaks on the JVM
 
The Future of Futures - A Talk About Java 8 CompletableFutures
The Future of Futures - A Talk About Java 8 CompletableFuturesThe Future of Futures - A Talk About Java 8 CompletableFutures
The Future of Futures - A Talk About Java 8 CompletableFutures
 
ClassLoader Leaks
ClassLoader LeaksClassLoader Leaks
ClassLoader Leaks
 
The Java Memory Model
The Java Memory ModelThe Java Memory Model
The Java Memory Model
 
Building Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJavaBuilding Scalable Stateless Applications with RxJava
Building Scalable Stateless Applications with RxJava
 
Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8Memory Management: What You Need to Know When Moving to Java 8
Memory Management: What You Need to Know When Moving to Java 8
 
Playing with State Monad
Playing with State MonadPlaying with State Monad
Playing with State Monad
 

Similar to mjprof: Monadic approach for JVM profiling

Terraform Modules and Continuous Deployment
Terraform Modules and Continuous DeploymentTerraform Modules and Continuous Deployment
Terraform Modules and Continuous DeploymentZane Williamson
 
Oracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuningOracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuningMichel Schildmeijer
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.jsorkaplan
 
GOTO Night with Charles Nutter Slides
GOTO Night with Charles Nutter SlidesGOTO Night with Charles Nutter Slides
GOTO Night with Charles Nutter SlidesAlexandra Masterson
 
JDK Tools For Performance Diagnostics
JDK Tools For Performance DiagnosticsJDK Tools For Performance Diagnostics
JDK Tools For Performance DiagnosticsBaruch Sadogursky
 
Toward dynamic analysis of obfuscated android malware
Toward dynamic analysis of obfuscated android malwareToward dynamic analysis of obfuscated android malware
Toward dynamic analysis of obfuscated android malwareZongXian Shen
 
Byte code manipulation and instrumentalization in Java
Byte code manipulation and instrumentalization in JavaByte code manipulation and instrumentalization in Java
Byte code manipulation and instrumentalization in JavaAlex Moskvin
 
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"Daniel Bryant
 
Server-Side JavaScript Developement - Node.JS Quick Tour
Server-Side JavaScript Developement - Node.JS Quick TourServer-Side JavaScript Developement - Node.JS Quick Tour
Server-Side JavaScript Developement - Node.JS Quick Tourq3boy
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Ryan Cuprak
 
Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Ryan Cuprak
 
1 java programming- introduction
1  java programming- introduction1  java programming- introduction
1 java programming- introductionjyoti_lakhani
 
Sista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceSista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceESUG
 
What we can expect from Java 9 by Ivan Krylov
What we can expect from Java 9 by Ivan KrylovWhat we can expect from Java 9 by Ivan Krylov
What we can expect from Java 9 by Ivan KrylovJ On The Beach
 
PostgreSQL and Linux Containers
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux ContainersJignesh Shah
 
DanNotes 2013: OpenNTF Domino API
DanNotes 2013: OpenNTF Domino APIDanNotes 2013: OpenNTF Domino API
DanNotes 2013: OpenNTF Domino APIPaul Withers
 
Postgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh ShahPostgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh ShahPivotalOpenSourceHub
 

Similar to mjprof: Monadic approach for JVM profiling (20)

Terraform Modules and Continuous Deployment
Terraform Modules and Continuous DeploymentTerraform Modules and Continuous Deployment
Terraform Modules and Continuous Deployment
 
Oracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuningOracle WebLogic Diagnostics & Perfomance tuning
Oracle WebLogic Diagnostics & Perfomance tuning
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
GOTO Night with Charles Nutter Slides
GOTO Night with Charles Nutter SlidesGOTO Night with Charles Nutter Slides
GOTO Night with Charles Nutter Slides
 
JDK Tools For Performance Diagnostics
JDK Tools For Performance DiagnosticsJDK Tools For Performance Diagnostics
JDK Tools For Performance Diagnostics
 
.NET Debugging Workshop
.NET Debugging Workshop.NET Debugging Workshop
.NET Debugging Workshop
 
Toward dynamic analysis of obfuscated android malware
Toward dynamic analysis of obfuscated android malwareToward dynamic analysis of obfuscated android malware
Toward dynamic analysis of obfuscated android malware
 
Byte code manipulation and instrumentalization in Java
Byte code manipulation and instrumentalization in JavaByte code manipulation and instrumentalization in Java
Byte code manipulation and instrumentalization in Java
 
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
 
Server-Side JavaScript Developement - Node.JS Quick Tour
Server-Side JavaScript Developement - Node.JS Quick TourServer-Side JavaScript Developement - Node.JS Quick Tour
Server-Side JavaScript Developement - Node.JS Quick Tour
 
Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)Exploring Java Heap Dumps (Oracle Code One 2018)
Exploring Java Heap Dumps (Oracle Code One 2018)
 
HotSpotコトハジメ
HotSpotコトハジメHotSpotコトハジメ
HotSpotコトハジメ
 
Heap & thread dump
Heap & thread dumpHeap & thread dump
Heap & thread dump
 
Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]Top 50 java ee 7 best practices [con5669]
Top 50 java ee 7 best practices [con5669]
 
1 java programming- introduction
1  java programming- introduction1  java programming- introduction
1 java programming- introduction
 
Sista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performanceSista: Improving Cog’s JIT performance
Sista: Improving Cog’s JIT performance
 
What we can expect from Java 9 by Ivan Krylov
What we can expect from Java 9 by Ivan KrylovWhat we can expect from Java 9 by Ivan Krylov
What we can expect from Java 9 by Ivan Krylov
 
PostgreSQL and Linux Containers
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux Containers
 
DanNotes 2013: OpenNTF Domino API
DanNotes 2013: OpenNTF Domino APIDanNotes 2013: OpenNTF Domino API
DanNotes 2013: OpenNTF Domino API
 
Postgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh ShahPostgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh Shah
 

More from Haim Yadid

Loom me up Scotty! Project Loom - What's in it for Me?
Loom me up Scotty!  Project Loom - What's in it for Me?Loom me up Scotty!  Project Loom - What's in it for Me?
Loom me up Scotty! Project Loom - What's in it for Me?Haim Yadid
 
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
“Show Me the Garbage!”, Garbage Collection a Friend or a FoeHaim Yadid
 
Kotlin Backend Development 6 Yrs Recap. The Good, the Bad and the Ugly
Kotlin Backend Development 6 Yrs Recap. The Good, the Bad and the UglyKotlin Backend Development 6 Yrs Recap. The Good, the Bad and the Ugly
Kotlin Backend Development 6 Yrs Recap. The Good, the Bad and the UglyHaim Yadid
 
“Show Me the Garbage!”, Understanding Garbage Collection
“Show Me the Garbage!”, Understanding Garbage Collection“Show Me the Garbage!”, Understanding Garbage Collection
“Show Me the Garbage!”, Understanding Garbage CollectionHaim Yadid
 
Java Memory Structure
Java Memory Structure Java Memory Structure
Java Memory Structure Haim Yadid
 
Basic JVM Troubleshooting With Jmx
Basic JVM Troubleshooting With JmxBasic JVM Troubleshooting With Jmx
Basic JVM Troubleshooting With JmxHaim Yadid
 
The Freelancer Journey
The Freelancer JourneyThe Freelancer Journey
The Freelancer JourneyHaim Yadid
 
Building microservices with Kotlin
Building microservices with KotlinBuilding microservices with Kotlin
Building microservices with KotlinHaim Yadid
 
Let's talk about Garbage Collection
Let's talk about Garbage CollectionLet's talk about Garbage Collection
Let's talk about Garbage CollectionHaim Yadid
 
JVM Garbage Collection logs, you do not want to ignore them! - Reversim Summi...
JVM Garbage Collection logs, you do not want to ignore them! - Reversim Summi...JVM Garbage Collection logs, you do not want to ignore them! - Reversim Summi...
JVM Garbage Collection logs, you do not want to ignore them! - Reversim Summi...Haim Yadid
 
Java 8 - Stamped Lock
Java 8 - Stamped LockJava 8 - Stamped Lock
Java 8 - Stamped LockHaim Yadid
 
Concurrency and Multithreading Demistified - Reversim Summit 2014
Concurrency and Multithreading Demistified - Reversim Summit 2014Concurrency and Multithreading Demistified - Reversim Summit 2014
Concurrency and Multithreading Demistified - Reversim Summit 2014Haim Yadid
 
A short Intro. to Java Mission Control
A short Intro. to Java Mission ControlA short Intro. to Java Mission Control
A short Intro. to Java Mission ControlHaim Yadid
 
Java Enterprise Edition Concurrency Misconceptions
Java Enterprise Edition Concurrency Misconceptions Java Enterprise Edition Concurrency Misconceptions
Java Enterprise Edition Concurrency Misconceptions Haim Yadid
 
Tales About Scala Performance
Tales About Scala PerformanceTales About Scala Performance
Tales About Scala PerformanceHaim Yadid
 
Israeli JUG - IL JUG presentation
Israeli JUG -  IL JUG presentation Israeli JUG -  IL JUG presentation
Israeli JUG - IL JUG presentation Haim Yadid
 

More from Haim Yadid (16)

Loom me up Scotty! Project Loom - What's in it for Me?
Loom me up Scotty!  Project Loom - What's in it for Me?Loom me up Scotty!  Project Loom - What's in it for Me?
Loom me up Scotty! Project Loom - What's in it for Me?
 
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
 
Kotlin Backend Development 6 Yrs Recap. The Good, the Bad and the Ugly
Kotlin Backend Development 6 Yrs Recap. The Good, the Bad and the UglyKotlin Backend Development 6 Yrs Recap. The Good, the Bad and the Ugly
Kotlin Backend Development 6 Yrs Recap. The Good, the Bad and the Ugly
 
“Show Me the Garbage!”, Understanding Garbage Collection
“Show Me the Garbage!”, Understanding Garbage Collection“Show Me the Garbage!”, Understanding Garbage Collection
“Show Me the Garbage!”, Understanding Garbage Collection
 
Java Memory Structure
Java Memory Structure Java Memory Structure
Java Memory Structure
 
Basic JVM Troubleshooting With Jmx
Basic JVM Troubleshooting With JmxBasic JVM Troubleshooting With Jmx
Basic JVM Troubleshooting With Jmx
 
The Freelancer Journey
The Freelancer JourneyThe Freelancer Journey
The Freelancer Journey
 
Building microservices with Kotlin
Building microservices with KotlinBuilding microservices with Kotlin
Building microservices with Kotlin
 
Let's talk about Garbage Collection
Let's talk about Garbage CollectionLet's talk about Garbage Collection
Let's talk about Garbage Collection
 
JVM Garbage Collection logs, you do not want to ignore them! - Reversim Summi...
JVM Garbage Collection logs, you do not want to ignore them! - Reversim Summi...JVM Garbage Collection logs, you do not want to ignore them! - Reversim Summi...
JVM Garbage Collection logs, you do not want to ignore them! - Reversim Summi...
 
Java 8 - Stamped Lock
Java 8 - Stamped LockJava 8 - Stamped Lock
Java 8 - Stamped Lock
 
Concurrency and Multithreading Demistified - Reversim Summit 2014
Concurrency and Multithreading Demistified - Reversim Summit 2014Concurrency and Multithreading Demistified - Reversim Summit 2014
Concurrency and Multithreading Demistified - Reversim Summit 2014
 
A short Intro. to Java Mission Control
A short Intro. to Java Mission ControlA short Intro. to Java Mission Control
A short Intro. to Java Mission Control
 
Java Enterprise Edition Concurrency Misconceptions
Java Enterprise Edition Concurrency Misconceptions Java Enterprise Edition Concurrency Misconceptions
Java Enterprise Edition Concurrency Misconceptions
 
Tales About Scala Performance
Tales About Scala PerformanceTales About Scala Performance
Tales About Scala Performance
 
Israeli JUG - IL JUG presentation
Israeli JUG -  IL JUG presentation Israeli JUG -  IL JUG presentation
Israeli JUG - IL JUG presentation
 

Recently uploaded

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
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
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
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
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
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
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
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
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
 

Recently uploaded (20)

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
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
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
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
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...
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
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...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
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...
 

mjprof: Monadic approach for JVM profiling

  • 1. mjprof : A Monadic Approach for JVM Profiling Haim Yadid Performize-IT #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 2. About Me: Haim Yadid • 21 Years of SW development experience • independent Performance Expert • Consulting R&D Groups • Training: Java Performance Optimization • Community leader : Java.IL #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 3. Java.IL • Israeli Java Community and User Group • Meetup : www.meetup.com/JavaIL/ • Twitter: @java_il • ~ 400 members • Meeting every month #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 4. Background & Motivation #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 5. The Two Most Important Questions #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 6. The Two Most Important Questions My wife asks me #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 7. The Two Most Important Questions My wife asks me What are you doing? When will you be back? #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 8. Profiler • A Performance analysis tool • Which answers questions about method calls: • E.g. : Number of invocation, Average duration,CPU consumptions Contention Memory allocation IO, Cache misses etc….. #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 9. Statistical Profiler • A.k.a. as Sampling Profiler • Samples the treads activity every several milliseconds • Not very accurate for short tasks • Low/Medium overhead • Do not provide the number of invocations #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 10. Instrumenting Profiler • A.k.a Tracing • Instruments the code • Knows when a method starts and when it ends • High overhead (depends on instrumentation) #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 11. Instrumenting Profiler • A.k.a Tracing • Instruments the code • Knows when a method starts and when it ends • High overhead (depends on instrumentation) Public void foo(a) { Measure start time increase invocation count bla bla; Measure end time } Injected code #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 12. jstack - A Poor Man’s Profiler • The most trivial sampling profiler • Part of the JDK • Connects to a running JVM and samples all the threads • Only once ! • Writes to standard output #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 13. And it looks like this • For each thread we have the following block #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 14. And it looks like this • For each thread we have the following block Thread name Priority Id and native id "pool-35-thread-1" prio=5 tid=10315b800 nid=0x12c1fe000 waiting on condition [12c1fd000] java.lang.Thread.State: TIMED_WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <107ac0140> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:198) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos ..... Locked ownable synchronizers: - None #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 15. Now do this a Million Times! #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 16. Now do this a Million Times! • Tons of threads • Deep stacks #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 17. mjprof #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 18. mjprof • A command line tool • Acts on jstack output • Extends it (enriched thread dumps) • Applies a sequence of operations (monads) to • Filter • Aggregate • Manipulate #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 19. Prerequisites • Java installed • Set JAVA_HOME (JDK1.7 or later) • Add ${JAVA_HOME}/bin to path • Attaching to processes requires JDK and not JRE • Can run on a headless machine #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 20. Installing mjprof • Git repo : https://github.com/AdoptOpenJDK/mjprof • Download and unzip unzip mjprof1.0-bin.zip • Or clone and build mvn install assembly:assembly • Add mjprof directory to your path #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 21. Synopsis and Help (Smoke test) • Running mjprof without parameters will print help • It is a good way to see it is functioning #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 22. Synopsis and Help (Smoke test) • Running mjprof without parameters will print help • It is a good way to see it is functioning ➜ mjprof git:(master) ✗ mjprof Synopsis A list of the following monads concatenated with . … Data sources: jstack/pid,[count],[sleep]/ -Generate dumps using stack path/path/ -Read thread dump from file stdin -Read thread dumps from standard input visualvm/path/ -Read profiling session from xml export of VisualVM …. #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 23. Monads • Pipeline Building blocks • Monads can • Collect data • Filter out certain threads • Transform threads information • Aggregate threads information • Snapshot write state to a file or GUI • Concatenate with a . (period) #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 24. Data Sources stdin file jstack jmx #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 25. Data Sources stdin • cat mythreaddump.txt | mjprof … file jstack jmx #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 26. Data Sources • cat mythreaddump.txt | mjprof … • mjprof path/mythreaddump.txt/ stdin file jstack jmx #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 27. Data Sources • cat mythreaddump.txt | mjprof … • mjprof path/mythreaddump.txt/ • mjprof jstack/19873/ stdin file jstack jmx #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 28. Data Sources • cat mythreaddump.txt | mjprof … • mjprof path/mythreaddump.txt/ • mjprof jstack/19873/ • mjprof jmx/myhost:65327/ stdin file jstack jmx #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 29. Monads Filters Aggregations Stack frame level contains -contains group -prop -fn merge sort -sort frame waiting -locks count mergedcalles -frame top bottom trimbelow namesuf -fn -pkg jvm -jvm blocked locks running withstack output stdout gui snapshot #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 30. Extending mjprof • mjprof is inherently extensible • Macros • A text file named macros.properties • Contains a sequence of macros • Plugins • Annotate your extension with @Plugin • Compile it and place your jar in the directory plugins under mjprof installation #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 31. 10 mjprof Recipes #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 33. Question: How many threads my process has? #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 34. Question: How many threads my process has? path/stack.txt/ mjprof jstack/1971/ jstack/MainClass/ #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 35. Question: How many threads my process has? path/stack.txt/ mjprof jstack/1971/ . count jstack/MainClass/ ➜ distro mjprof jstack/1971/.count 2014-11-01 10:34:10 Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.0-b70 mixed mode): Total number of threads is 1045 #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 36. Question: How many jetty thread are working ATM? #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 37. Question: How many jetty thread are working ATM? mjprof jstack/MyApp/ #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 38. Question: How many jetty thread are working ATM? mjprof jstack/MyApp/ . contains/name,qtp/ #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 39. Question: How many jetty thread are working ATM? mjprof jstack/MyApp/ . contains/name,qtp/ . contains/state,RUN/ ➜ 04112014 mjprof jstack/My4tApp/.contains/name,qtp/ 2014-11-04 20:05:03 Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.0-b70 mixed mode): "qtp817406040-17-selector-ServerConnectorManager@69b87e8d/3" prio=5 ….3 runnable [0x000000011bc5f000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method) at sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:202) at sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:103) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) - locked <0x0000000780209080> (a sun.nio.ch.Util$2) - locked <0x0000000780209070> (a java.util.Collections$UnmodifiableSet) #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 40. Question: How many jetty thread are working ATM? mjprof jstack/MyApp/ . contains/name,qtp/ . contains/state,RUN/ . count ➜ 04112014 mjprof jstack/My4tApp/.contains/name,qtp/ 2014-11-04 20:05:03 Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.0-b70 mixed mode): "qtp817406040-17-selector-ServerConnectorManager@69b87e8d/3" prio=5 ….3 runnable [0x000000011bc5f000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method) at sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:202) at sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:103) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) - locked <0x0000000780209080> (a sun.nio.ch.Util$2) - locked <0x0000000780209070> (a java.util.Collections$UnmodifiableSet) #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 41. Question: Which threads are running my logic ? #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 42. Question: Which threads are running my logic ? mjprof jstack/MyApp/ . contains/stack,myapp/ 2014-11-04 20:11:55 Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.0-b70 mixed mode): "Indexing daemon" prio=5 tid=0x00007fb306bf4800 nid=0x6307 waiting on condition [0x000000011c171000] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at com.myapp.IndexManagement$1.run(IndexManagement.java:148) "main" prio=5 tid=0x00007fb303809000 nid=0x1303 in Object.wait() [0x0000000105500000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:502) at com.myapp.MyAppApp.main(MyAppApp.java:18) #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 43. Question: Stack-trace is cluttered, how do I shorten it ? #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 44. Question: Stack-trace is cluttered, how do I shorten it ? mjprof jmx/MyApp/ . #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 45. Question: Stack-trace is cluttered, how do I shorten it ? mjprof jmx/MyApp/ . frame/mycompany/ #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 46. Question: Stack-trace is cluttered, how do I shorten it ? mjprof jmx/MyApp/ . frame/mycompany/ -frame/grizzly/ #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 47. Question: Stack-trace is cluttered, how do I shorten it ? mjprof jmx/MyApp/ . frame/mycompany/ -frame/grizzly/ top/3/ #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 48. Question: How can I group threads by state ? #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 49. Question: How can I group threads by state ? mjprof jmx/MyApp/ . group/state/ . gui #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 50. Question: How do I aggregate several thread dumps #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 51. Question: How do I aggregate several thread dumps mjprof jmx/MyApp,10,1000/ #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 52. Question: How do I aggregate several thread dumps mjprof jmx/MyApp,10,1000/ . group/state/ merge #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 53. Question: How do I aggregate several thread dumps mjprof jmx/MyApp,10,1000/ . group/state/ merge . #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 54. Question: How can I combine thread dumps from several processes? #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 55. Question: How can I combine thread dumps from several processes? mjprof jmx/myhost1.com:5467/ . jmx/myhost2.com:5467/ . group/state/ . gui #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 57. How do I measure thread pool CPU consumption? #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 58. How do I measure thread pool CPU consumption? mjprof jmxc/MyApp/ #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 59. How do I measure thread pool CPU consumption? mjprof jmxc/MyApp/ . contains/name,COFFEE/ #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 60. How do I measure thread pool CPU consumption? mjprof jmxc/MyApp/ . contains/name,COFFEE/ . -pkg . group "*" count=7 tid=* cpu_ns=1164536000 wall_ms=4804 %cpu=24.24 java.lang.Thread.State: TIMED_WAITING 100.00% [7/7] at Thread.run(Thread.java:744) 100.00% [7/7] at Sleeper.run(Sleeper.java:51) 100.00% [7/7] at Sleeper.loopForever(Sleeper.java:37) 100.00% [7/7] at Sleeper.longerStackTrace(Sleeper.java:32) 100.00% [7/7] at Sleeper.longerStackTrace(Sleeper.java:32) 100.00% [7/7] at Sleeper.longerStackTrace(Sleeper.java:32) 100.00% [7/7] at Sleeper.longerStackTrace(Sleeper.java:32) 100.00% [7/7] at Sleeper.longerStackTrace(Sleeper.java:32) 100.00% [7/7] at Sleeper.longerStackTrace(Sleeper.java:30) 100.00% [7/7] at Recurse.singleCycle(Recurse.java:16) 100.00% [7/7] at Recurse.doRecursion(Recurse.java:25) 100.00% [7/7] at Recurse.doRecursion(Recurse.java:25) #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 61. Question: Which threads are blocked by the lock I hold #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 62. Question: Which threads are blocked by the lock I hold mjprof path/threaddump.txt/ . blocked . contains/stack,0x00000007aab51b38/ #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 63. Question: What is the overall locking state of my application #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 64. Question: What is the overall locking state of my application mjprof path/threaddump.txt/ . contains/stack,myapp/ locks . "CPU3_5" prio=5 tid=0x00007fc4f4889800 nid=0x5703 waiting for monitor… java.lang.Thread.State: BLOCKED (on object monitor) - waiting to lock <0x00000007aad98988> (a java.lang.Object) "CPU3_4" prio=5 tid=0x00007fc4f404a800 nid=0x5503 waiting for monitor… java.lang.Thread.State: BLOCKED (on object monitor) - waiting to lock <0x00000007aad98988> (a java.lang.Object) "CPU3_3" prio=5 tid=0x00007fc4f4049800 nid=0x5303 waiting on … java.lang.Thread.State: TIMED_WAITING (sleeping) - locked <0x00000007aad98988> (a java.lang.Object) #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 65. 3#! #Devoxx #Performance #AdoptOpenJDK @lifeyx
  • 66. Thanks / Contact Me lifey@performize-it.com blog.performize-it.com www.performize-it.com https://github.com/lifey http://il.linkedin.com/in/haimyadid @lifeyx #Devoxx #Performance #AdoptOpenJDK @lifeyx