JDK Flight Recorder: Difference between revisions

Content deleted Content added
Mhirt (talk | contribs)
mNo edit summary
BJunee (talk | contribs)
Link suggestions feature: 3 links added.
 
(25 intermediate revisions by 14 users not shown)
Line 1:
{{short description|Production time profiling and diagnostics for OpenJDK}}
 
'''JDK Flight Recorder''' is an event recorder built into the OpenJDK <ref>{{cite web |title=OpenJDK |url=https://openjdk.org/| accessdate=28 June 2023}}</ref> [[Java virtual machine]]. It can be thoughthought of as the software equivalent of a Data Flight Recorder (Black Box) in a commercial aircraft. It captures information about the [[Java virtual machine|JVM]] 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 (information technology)|Observer Effect]] 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]].
Line 11:
* 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 [[Time Stamp Counter|TSC]] 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]], 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.<ref>{{cite web |title=JRockit Flight Recorder Runtime Guide |url=https://docs.oracle.com/cd/E15289_01/JRMCF/E15070-10.pdf |accessdate=22 January 2019}}</ref><ref>{{cite book |title=Oracle JRockit: the Definitive Guide |year=2010 |publisher=Packt Pub |isbn=1847198066978-1847198068 |pages=588 |url=https://www.amazon.com/Oracle-JRockit-Definitive-Marcus-Hirt/dp/1847198066}}</ref> After Oracle acquired [[Sun Microsystems]], JRockit Flight Recorder was rebranded Java Flight Recorder.<ref>{{cite web |title=Java Flight Recorder Runtime Guide |url=https://docs.oracle.com/javacomponents/jmc-5-4/jfr-runtime-guide/about.htm#JFRUH170 |accessdate=22 January 2019}}</ref> In 2018 Java Flight Recorder was open sourced and released as part of [[OpenJDK]] 11.<ref>{{cite web |title=JEP 328: Flight Recorder |url=https://openjdk.java.net/jeps/328 |accessdate=22 January 2019}}</ref> 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.
 
{| class="wikitable"
|-
! JFR Version !! JDK Versions
|-
| v0.9 || Oracle JDK 7 (u4+), Oracle JDK 8
|-
| v1.0 || Oracle JDK 9, Oracle JDK 10
|-
| v2.0 || Oracle JDK 11+, Open JDK 11+, Azul JDK 8 and Azul JDK 11+
|}
 
==Development==
The development of JDK Flight Recorder is taking place as part of the OpenJDK JDK <ref>{{cite web |title=OpenJDK JDK Project |url=https://openjdk.org/projects/jdk/| accessdate=28 June 2023}}</ref> project on GitHub,<ref>{{cite web |title=GitHub OpenJDK JDK |website=[[GitHub]] |url=https://github.com/openjdk/jdk| accessdate=28 June 2023}}</ref> although most of the public discussions are taking place on the OpenJDK hotspot-jfr-dev <ref>{{cite web |title=hotspot-jfr-dev mailing list |url=https://mail.openjdk.org/pipermail/hotspot-jfr-dev/| accessdate=28 June 2023}}</ref> [[mailing list]].
 
==See also==
{{Portal|Free and open-source software|Java (programming language)|Computer programming}}
* [[Java platform]]
* [[JDK Mission Control]]
Line 34 ⟶ 51:
{{Reflist}}
 
[[Category:FreeJava (programming language) software]]
==External links==
[[Category:JavaFree computer programming tools]]
[[Category:Free software]]