When opening the tab of memory in jdk mission control with jfr file, it's getting nothing. İs there any parameters to setting the process which is I get jfr file. I've just added that parameter to enable flight recorder.
java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder ... myapp
The params of events gathered by the JFR are controlled the JFC files. The JDK is packed with 2 of them:
The default.jfc will collect less events than the profile.jfc file.
Verify which of them is used when your Java process is launched. That's regarding the JFC file.
Now, there are 2 ways to start up a JFR file, continuous recording and profiling recording, that will depend on what you are using in the JVM options.
Continuous Recording
When to use it? The issue is intermittent, recording a JFR continuously is required until the issue is replicated. At that moment, dump the recording into a JFR file.
A temporary repository can be configured where temporary JFR files will be created. By default, it's located at the /tmp folder or java.io.tmpdir system property. Don't process the JFR files under the temporary repository, those are just temporary files, they are incomplete.
About disk=[true|false] Specifies whether to write temporary data to the disk repository. By default, this parameter is set to false. To enable it, set the parameter to true. (star)
Once the issue is replicated it, use the JFR.dump command to create the JFR file. At that point, when you already have the desired evidence, the JFR can be stopped with JFR.stop.
An alternative to dump the file once the process exits:
Set path to the location where the recording should be saved. If you specify a directory, a file with the date and time as the name is created in that directory. If you specify a file name, that name is used. If you do not specify a path, the recording will be saved in the current directory.
Example of the sequence of command for continuous recording:
Profiling Recording
The issue is consistent. How to replicate it or when it's going to occur is known, hence you need a period of time to collect a JFR when you are sure the issue will be replicated at least once.
Example of a sequence of commands for profiling recording:
At this point, the questions are: