Posts

Showing posts with the label jfr

Stack Depth in Java Flight Recorder

Have you seen " ~ UNCLASSIFIABLE ~.() " in the Call Tree Tab when analyzing a Flight Recording in Java Mission Control? That means, you have stack traces with more than 64 frames. The default stack depth in Java Flight Recorder is 64 and it can be changed with stackdepth option in -XX:FlightRecorderOptions flag. Please read my Medium story for more details on the Stack Depth in Java Flight Recorder .

Java Flight Recorder Cheat Sheet

I created a cheat sheet for using Java Flight Recorder. It has steps to start Fight Recordings using JVM flags or using Diagnostic Commands in jcmd command. See: Java Flight Recorder Cheat Sheet

Using Java Flight Recorder

I wrote a Medium story about " Using Java Flight Recorder " in last year. The story is a bit long, but it has all the details you need to know when you want to start using Java Flight Recorder (JFR). Read more at " Using Java Flight Recorder ". Thank you!

Specifying a custom Event Settings file for Java Flight Recorder

Image
When you are using Java Flight Recorder (JFR), the JFR will use an event settings file to check which event types to record. By default in JFR, there are two settings, "default" and "profile". The default setting is recommended for Continuous Recordings as it has very low overhead (typically less than 1% overhead). The profile setting has more events and useful when profiling the application. As mentioned in my previous blog post regarding  Java Flight Recorder Continuous Recordings , we use following arguments to do a Continuous Recording. -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:FlightRecorderOptions=defaultrecording=true,disk=true,repository=./tmp,dumponexit=true,dumponexitpath=./ Note: According to the Oracle documentation on " java " command, we should be able to specify "settings" parameter to the -XX:FlightRecorderOptions. However, the settings parameter has no effect when used with the -XX:FlightRecorderOptions and ...

Java Mixed-Mode Flame Graphs

Recently, I wrote a blog post on " Java CPU Flame Graphs ". That blog post shows how to use Linux perf_events to generate Java Mixed-Mode Flame Graphs. With Java Profilers, we can get information about Java process only. However with Java Mixed-Mode Flame Graphs, we can see how much CPU time is spent in Java methods, system libraries and the kernel. Mixed-mode means that the Flame Graph shows profile information from both system code paths and Java code paths. This is sometimes very important to identify performance issues. For more information, see  Java in Flames  and  New JVM Option Enables Generation of Mixed-Mode Flame Graphs In this blog post, I'm using a sample high cpu consuming Java Program  with Java 8 Update 60. $ mvn -version Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T17:27:37+05:30) Maven home: /usr/local/apache-maven/apache-maven-3.3.3 Java version: 1.8.0_60, vendor: Oracle Corporation Java home: /usr/lib/jvm/jdk1.8...