我要评分
获取效率
正确性
完整性
易理解

Creating a Real-Time Profiling Task

Real-time profiling is to analyze the target Java virtual machine (JVM) and Java programs. Specifically, the tool analyzes the heap, GC activities, thread status, and performance of upper-layer Java programs, and provides information such as call chain analysis results, hotspot functions, lock analysis results, program thread status, and object distribution. It obtains JVM running data in real time using the agent for precise analysis. For details, see Table 1.

For specific practices, see Table 1.

Prerequisites

  • A target environment has been added and is online.
  • The JDK must be JDK 8 or later.

    If the Java Profiler was deployed by an OS administrator and you want to perform real-time profiling on a Java process that was not created by an OS administrator, ensure that the JDK running the Java process is JDK 8 or later, and configure the JAVA_HOME environment variable in the non-interactive shell. For details, see Configuring the JDK.

Procedure

The procedure for profiling processes in a common environment also applies in a container environment.

  1. In the Java Profiler area, select the target environment from the Target Environments list and select the target Java process from the Java Processes list. See Figure 1.
    Figure 1 Selecting a Java process

    You can click next to Java Profiler to import a downloaded report and perform verification during the import.

    On the left area of the Java Profiler, the Tasks/Reports list displays the reports imported by the DevKit user. The Task/Report List area on the right displays the task status and exported reports of the selected environment.

  2. Click Real-Time Profiling.
    The Overview tab page is displayed. See Figure 2.

    Real-time profiling will affect the process performance.

    Figure 2 Overview
    After a real-time profiling task is created, you can click buttons next to the process name to perform corresponding operations.
    • Click to configure the real-time data limits.
      • The administrator devadmin has the modify and view permissions, and common users have only the view permission.
      • You can also click in the upper right corner of the page and then choose Tool Configuration > Java Profiler to modify the configuration.
    • An overview of tuning suggestions on all tab pages is displayed next to . Click View Details to see the detailed tuning suggestions.
    • Click to export required data analysis report.
    • Click Clear Data and select All or Current Page from the drop-down list to clear the analyzed data.
  3. Click Stop Analysis to the right of the process name to stop the analysis task. See Figure 3.
    Figure 3 Stopping an analysis task
    After the analysis task is stopped, you can click Restart to the right of the process name to restart the analysis task. See Figure 4.
    Figure 4 Restarting an analysis task

    Restarting an analysis task will clear the analyzed data. Exercise caution when performing this operation.