Java profiling tool jprofiler getting started Tutorial: profiling mode

Source: Internet
Author: User
Tags jprofiler

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.