To the VM options field, add the following line: -XX:+UnlockCommercialFeatures. Oracle JDK 8-10: provided that the UnlockCommercialFeatures VM option is enabledįrom the main menu, select Run | Edit Configurations and from the list on the left, select the run configuration that you want to analyze with JFR. It is supported natively in the following JDK builds: Java Flight Recorder is available on Windows, Linux, and macOS. The agent that will be used for profiling. They can be used, for example, to enable wall-clock profiling, or adjust the sampling interval. The options that will be passed to the agent. Set the value to be less than 2 to let the profiler collect performance information without root privileges: This option controls the use of the performance events data by non-root users. Adjust kernel options on LinuxĪdjust perf_event_paranoid. If you are on Linux, you have to adjust kernel options before you start profiling. On Windows and macOS, the profiler works out of the box. Go to Settings | Build, Execution, Deployment | Java Profiler.Ĭlick Add New Configuration and select the profiler.įor the options' meaning and purpose, refer to the Async Profiler and Java Flight Recorder chapters respectively.Īsync profiler is compatible with HotSpot JVM and some other Java runtimes. This topic describes how to set up these configurations and environment. The Async Profiler and Java Flight Recorder configurations allow you to run these tools separately and fine-tune them according to specific requirements. This approach leverages the advantages of both profilers and abstracts you from any setup whatsoever unless you have very specific requirements. While it is possible to use the supported profilers separately, the combined configuration that you get out of the box is a better choice for most scenarios. Java Flight Recorder – a standard profiling tool shipped as part of the JDK.Īsync Profiler – a very accurate profiler that can also collect native call and memory allocation data.īy default, IntelliJ IDEA runs both profilers in parallel to provide most accurate results. For CPU and allocation profiling, IntelliJ IDEA provides integration with the following profilers:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |