19 Ocak 2021 Salı

Flight Recorder - Java 11 İle Geliyor

Giriş
Açıklaması şöyle
The letters JFR stand for the Java Flight Recorder, which is an event-based toolset build directly into the JVM. 
...
The JFR can provide a view to the JVM internals through emitted events and more… 
Açıklaması şöyle. Yani JVM'e parametre veririz. O da jfr uzantılı bir dosya oluşturur. Bu dosya JDK Mission Control ile incelenir.
Java Flight Recorder(JFR in short) is used to gather profiling data for an application. It used to be available only for commercial uses, but it is now open-source under OpenJDK 11. We can use it for production applications, as its overhead is minimal(below 1%). It records the data in a JFR file, and we can use the JDK Mission Control tool to analyze the collected information. Use the following command to start a 180 seconds JFR recording and store the data in the demo.jfr file.

-XX:StartFlightRecording=duration=180s,settings=profile,filename=demo.jfr
old-object-queue-size seçeneği
Açıklaması şöyle
Here’s how the Java Flight Recorder’s Old Object Sample event works.

When a recording is started, a fixed number of objects from the Java heap are tracked. Tracked properties of the Java heap objects include:

- Object’s allocation start time
- Object’s duration
- Associated event thread
- Last known heap size usage
- Object type
- Garbage collection root

It’s possible to adjust the number of objects on the Java heap tracked by Flight Recorder by adjusting the old object queue site:
Şöyle yaparız
-XX:FlightRecordingOptions=old-object-queue-size=512

Hiç yorum yok:

Yorum Gönder