Java profiling toolJprofilerProvides 4 differentProfiling Mode, The three modes involvedJprofiler Gui. Therefore, you can view and analyze the data immediately. The fourth mode does not involve the jprofiler gui. It is an offline profiling mode.
1. Attach Mode
For profiling Java 1.6 or later, jprofiler supports connecting to a running JVM and loading the profiling proxy. However, the link mode also has some disadvantages, because some functions of the analysis interface cannot be used in the link mode.
2. profile at startup
To analyze the application at startupProgramYou must activate the profiling proxy before creating the JVM. This is achieved by adding a special JVM parameter:
-Agentpath: [path to jprofilerti library]
For Java> = 1.5.0 (jvmti), you do not need to manually add the JVM parameters. For initiating session integration with IDE, jprofiler automatically performs these operations. In other cases, there are also integrated wizard.
3. Prepare for profiling
You can append Nowait to the-agentpath VM parameter to activate the profiling mode. In most cases, it can be implemented according to the Integration wizard. In any case, this mode is more effective than the connection mode because most of the checks are independent of the profiling settings. Perform these monitoring when the number of loaded or reconverted classes is low.
4. Offline profiling
This mode is activated by appending offline, Config = [config file], id = [ID] to the-agentpath VM parameter. Similar to the "prepare for profiling" mode, the selected dialog box of the specified configuration file can be used for analysis settings. The analysis results are saved only to the snapshot file and cannot be connected to the jprofiler GUI in offline analysis mode.