0

I am using java 8. Is it possible to enable running JFR automatically? meaning when JVM runs, it creates JFR file and dumps it somewhere, better if it be of my choosing. The reason why I want this is to profile a program that has code from other languages too. Most of the code is in Java. I can not start JFR the way I always do like java ArgumentsToStartJFR ArgumentsToStartProgram and by enabling JVM to always start JFR, I hope to profile the program usually afterwards.

To be more precise with question. I want to start JFR every time JVM starts. Is this possible? if yes, how?

N_N
  • 13
  • 4

1 Answers1

0

For Oracle JDK 8, set JAVA_TOOL_OPTIONS=-XX:StartFlightRecording

Kire Haglin
  • 6,569
  • 22
  • 27