HOME

TheInfoList



OR:

JDK Flight Recorder is an event recorder built into the OpenJDK
Java virtual machine A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes ...
. It can be thought of as the software equivalent of a Data Flight Recorder (Black Box) in a commercial aircraft. It captures information about the
JVM A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes ...
itself, and the application running in the JVM. There is a wide variety of data captured, for example method profiling, allocation profiling and garbage collection related events. The JDK Flight Recorder was designed to minimize the
Observer Effect Observer effect, observer bias, observation bias, etc. may refer to a number of concepts, some of them closely related: General experimental biases * Hawthorne effect, a form of reactivity in which subjects modify an aspect of their behavior, in ...
in the profiled system, and is meant to be always on in production systems. The technology was open sourced in 2018. Analysis and visualization of flight recordings are normally done using
JDK Mission Control JDK Mission Control is an open source tools suite for the Java virtual machine. The tools help finding problems in, and optimizing, programs running on the Java virtual machine, JVM in production. JDK Mission Control supports OpenJDK 11 (and abo ...
.


Technology

A recording file consists of binary chunks of data. Each chunk is self describing and self contained. In other words, the metadata (such as the datatype and the content type of each attribute) needed to make use of the data (not only parse the events, but actually use them) is included in the chunk. Also all the values required to be resolved through e.g. constant pools are also included in the chunk. There is a wide variety of technologies employed to make the JFR efficient, for example: * Binary representations, no translations back and forth to strings, the buffers are efficiently emitted to disk * Most events are recorded into thread local native buffers * On some platforms invariant
TSC TSC may refer to: Organizations * Technology Service Corporation, a US engineering company * Terrorist Screening Center, a division of the National Security Branch of the US Federal Bureau of Investigation * The Shopping Channel, a Canadian televi ...
is employed for efficient time stamping * Integer compression scheme, to keep in-memory and on-file size down * Since implemented in the JVM, much data is readily available, or emitted at a time when the data is readily available, keeping cost down If converting a binary recording to
JSON JSON (JavaScript Object Notation, pronounced ; also ) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other ser ...
, it can easily blow up by two orders of magnitude or more, depending on length and content recorded. The expected performance overhead of JFR using the default template is less than a percent, and for the profiling template, less than two percent.


History

JDK Flight Recorder started out as JRockit Flight Recorder, and was originally used as a means to collect data to be used to improve the JVM itself. After Oracle acquired Sun Microsystems, JRockit Flight Recorder was rebranded Java Flight Recorder. In 2018 Java Flight Recorder was open sourced and released as part of OpenJDK 11. When open sourced it was rebranded JDK Flight Recorder, due to Java trademark issues.


Versions

These are the versions of JFR file format available. It does not encompass all the versions that have ever existed, but rather versions that exist in JVMs after the migration to HotSpot.


Development

The development of JDK Flight Recorder is taking place as part of the OpenJDK JDK project on GitHub, although most of the public discussions are taking place on the OpenJDK hotspot-jfr-dev mailing list.


See also

*
Java platform Java is a set of computer software and specifications developed by James Gosling at Sun Microsystems, which was later acquired by the Oracle Corporation, that provides a system for developing application software and deploying it in a cro ...
*
JDK Mission Control JDK Mission Control is an open source tools suite for the Java virtual machine. The tools help finding problems in, and optimizing, programs running on the Java virtual machine, JVM in production. JDK Mission Control supports OpenJDK 11 (and abo ...
*
Java version history The Java language has undergone several changes since JDK 1.0 as well as numerous additions of classes and packages to the standard library. Since J2SE 1.4, the evolution of the Java language has been governed by the Java Community P ...
*
JRockit JRockit was a proprietary Java virtual machine (JVM) originally developed by Appeal Virtual Machines, acquired by BEA Systems in 2002, and became part of Oracle Fusion Middleware as part of acquisition of BEA Systems in 2008. The JRockit code ba ...


References

{{Reflist Java (programming language) software Free computer programming tools