JDK Flight Recorder

Software engineer at DataDog with eminent interest in Java and its performance, management and observability tooling. Long time OpenJDK contributor and co-author and maintainer of BTrace, a dynamic tracing tool for Java.
-
- Java Core
- JDK Flight Recorder
- Performance
Thinking About Massive Throughput? Meet Virtual Threads!
Virtual threads not only help to increase application throughput by running a much bigger number of concurrent tasks together, they also provide a framework to refactor already existing code.
-
- JDK Flight Recorder
- Microservices
- Performance
- Tools
Monitoring Spring Boot Applications (Part 1)
In part 1 of this series, we will learn about JDK Flight Recorder and how we can use it to monitor a Spring Boot application. Introduction Application monitoring is one thing that we as developers cannot overlook. It doesn’t matter …
-
- JDK Flight Recorder
Contributing to OpenJDK Mission Control
Since this month is Hacktoberfest, I thought it would be a good idea to talk a bit about how to contribute to the OpenJDK Mission Control project.
-
- JDK Flight Recorder
- Performance
The Costs of Hidden Logging
The story of a partially implemented logging facility in the JDK 8 backport of JFR (for which I was also partially responsible)!
-
- JDK Flight Recorder
- Release Notes
- Tools
JMC 8.0.1 Released!
The 8.0.1-ga tag was just set in the jmc8 repository on GitHub.
This is a patch update release, and will therefore not include any new features.
The next upcoming source release is JMC 8.1.0, which will contain new features and enhancements. The planned source release date for JMC 8.1.0 is the 2nd of August 2021.
-
- JDK Flight Recorder
OpenJDK and the Future of Production Profiling
The JDK Flight Recorder design philosophy is to be the one-stop-shop production profiler for OpenJDK.
JFR needs to be able to do various kinds of profiling, all at the same time, at a low overhead. It also needs to be able to run continuously for as long as someone is interested in the data. Potentially always.
Now, with changes in the Java (and the computing) ecosystem, JFR has some loom-ing challenges to remain relevant for the future.
-
- JDK Flight Recorder
- Performance
- Tools
Towards Continuous Performance Regression Testing
JfrUnit is an extension for JUnit 5 which integrates Flight Recorder into unit tests.
It makes it straightforward to initiate a JFR recording for a given set of event types, execute some test routine, and then assert the JFR events which should have been produced.
Stay tuned for next parts in this series, where we’ll explore how to trace the SQL statements executed by an application using the JMC Agent and assert these query events using JfrUnit.
-
- JDK Flight Recorder
Improved JFR Allocation Profiling in JDK 16
The introduction of a throughput management mechanism in JFR allows getting fine details about the application behavior without the risk of being overwhelmed by the sheer number of JFR events.
The results of our preliminary tests of the setups previously completely unable to run with the allocation profiling events turned on are very exciting – JFR with event emission rate controller is able to provide a clear statistical picture of the allocation activity while keeping the recording size at a very manageable level thanks to the limit imposed on the number of captured TLAB events.
-
- JDK Flight Recorder
- Security
The SolarWinds Hack for Java Developers
The SolarWinds attack is unique in that the hackers did not exploit a vulnerability in an application, rather they broke into the company and attacked the development pipeline. The attackers’ implant worked in the build process,
injecting new code into SolarWinds Orion as it was built to enable command & control capabilities on target systems that ran the application.
For Java developers and architects who design, build, and run applications, there are two core take-aways.
-
- JDK Flight Recorder
How & When to Use JDK Flight Recorder in Production
While it would certainly be useful to record the whole lifetime, this is unpractical, even airplane Flight Data Recorders (and Cockpit Voice Recorders) only keep recent history.
Instead, it’s possible to aim at specific time frames where a recording could be useful.
-
- JDK Flight Recorder
- Tools
Control JFR Programmatically
While from JDK 14 events can be consumed on the fly, previous JDK versions (from JDK 11) offer a public API useful enough to control Flight Recorder programmatically or to read events from a JFR file.
Such API facilities are useful especially when combined with other technologies like Spring Actuators. Yet when there’s available integration or when using these integrations is too late, like recording startup, the most actionable way to get recording is from the command line.
-
- JDK Flight Recorder
- Performance
Continuous Production Profiling and Diagnostics
I’ve gotten a lot of questions about continuous production profiling lately. Why would anyone want to profile in production, or, if production profiling seems reasonable, why the heck leave it on continuously?
I thought I’d take a few moments and share my take on the problem and the success I’ve seen the past years applying continuous production profiling in systems in the real world.
Profiling these days is no longer limited to high overhead development profilers. The capabilities of the production time profilers are steadily increasing and their value is becoming less controversial, some preferring them for complex applications even during development.
-
- JDK Flight Recorder
- Tools
Analyze JFR Recordings
Continuing from part 1, to exploit the recording by analyzing it, we have a tool named jfr that ships with the JDK. On Linux the alternative jdk management may not be aware of jfr, which means you may need to use the full path to this executable.
The first interesting thing to do is to get an overview of the recording, the summary sub-command displays an histogram of the events.
-
- JDK Flight Recorder
- Tools
Get Started with JDK Flight Recorder
Java Flight Recorder is the profiler you can use in production, continuously.
Flight Recorder has been available before in the JDK, e.g., it shipped as part of the JDK 8, but to use it, it required that you set specific commercial VM flags to unlock Flight Recorder, this is not anymore necessary from Java 11 onwards.
-
- JDK Flight Recorder
- Performance
Introducing JmFrX: A Bridge From JMX to Java Flight Recorder
JmFrX is a small utility which allows you to capture JMX data with Java Flight Recorder.
In this blog post I’m going to explain how to use JmFrX for recording JMX data in your applications, point out some interesting JmFrX implemention details, and lastly will discuss some potential steps for future development of the tool.
-
- JDK Flight Recorder
- Performance
Monitoring REST APIs with Custom JDK Flight Recorder Events
The Java Flight Recorder (JFR) is an invaluable tool for gaining deep insights into the performance characteristics of Java applications.
In this blog post, we’re going to explore how custom, application-specific JFR events can be used to monitor a REST API, allowing to track request counts, identify long-running requests, and more.
-
- JDK Flight Recorder
- Performance
A Closer Look at JFR Streaming
Since JDK 14, there is a new kid on the block – Java Flight Recorder streaming, which enables developers to subscribe to JFR data.
It is a feature allowing a developer to subscribe to select JFR data and to decide what to do with that data in the host process. JFR events can also be consumed from a separate process by pointing to the file repo of a separate JVM process – the mechanism is the same.