Rate This Document
Findability
Accuracy
Completeness
Readability

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, and no profiling process is running in the target environment.
  • 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. On the Java Profiler tool page, select the target environment in the Target Environments area and select the target Java process in the Java Processes area. See Figure 1.
    Figure 1 Selecting a Java process

    You can click in the upper right corner to import downloaded reports and perform verification during the import.

  2. Click Real-Time Profiling.
    The Overview tab page is displayed, as shown in 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 Java Profiler tool 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, as shown in 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.