Locking graphs in JProfiler
2009-11-27
Posted by Ingo Kegel
In the screencast below, I present some of the features in the locking graphs that have been introduced in JProfiler 6.
The test class that is profiled in this screen cast is given below:
public class MonitorTest { // The only monitor that all threads are blocking or waiting on private static final MonitorTest monitor = new MonitorTest(); public static void main(String[] args) throws InterruptedException { // All threads execute this runnable, each thread acquires the // monitor, works for 3 seconds and then waits on the monitor Runnable runnable = new Runnable() { public void run() { synchronized (monitor) { try { // Instead of doing any real work, the thread just // sleeps for 3 second Thread.sleep(3000); monitor.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } } }; // 3 threads are started with an offset of 500 ms new Thread(runnable, "Test Thread 1").start(); Thread.sleep(500); new Thread(runnable, "Test Thread 2").start(); Thread.sleep(500); new Thread(runnable, "Test Thread 3").start(); // After 20 seconds, all threads are woken up and the test class // terminates Thread.sleep(20000); synchronized (monitor) { monitor.notifyAll(); } } }
Blog Archive
September/5
2022/10
Customizing telemetries in JProfilerWorking with probe events in JProfilerEnhanced JFR snapshot analysis with JProfilerRecording JFR snapshots with JProfilerGarbage collector analysis in JProfiler
March/1
January/1
December/2
November/3
2021/2
2020/1
2019/1
2018/3
2017/5
2016/1
2015/10
Profiling a Netty serverUsing flame graphs when profiling Java applicationsUsing sunburst diagrams for understanding Java memory consumption
October/1
September/1
August/2
July/1
November/5
2014/3
2013/3
2012/5
2011/13
Finding JDBC connection leaksRemote profiling through an SSH tunnelCollapsing recursions in the call treeAnalyzing incoming and outgoing calls of a methodAnalyzing specific parts of the call tree
June/5
December/1
October/2
September/5
2010/8
2009/14
Filtering in the reference view of the heap walkerHeap walker graph: Finding paths between selected instancesInspections in the heap walkerCreating a custom probeUsing the "Run interceptor script" trigger action
August/4
CPU profiling: Sampling and instrumentationProbes overviewAnalyzing long-running AWT events with JProfilerRequest tracking
February/1