Viewing GC Information
Prerequisites
A real-time profiling task has been created and is in progress.
Procedure
- In the Task/Report List area of the Java Profiler page, click the name of the analysis task under Real-Time Profiling.
The Overview tab page is displayed.
- Click the GC tab.View the GC event information. The GC analysis page is displayed by default. See Figure 1. For details about the parameters, see Table 1.
- You can select GC Cause or Garbage Collector from the drop-down list and enter a keyword to quickly filter data.
- You can click View Details in the upper part of the page to view the tuning suggestions for the current task.
- You can click
to export the current GC report. - Currently, Parallel Scavenge (PS), Concurrent Mark Sweep (CMS), and Garbage-First (G1) garbage collector logs can be parsed. Java 8 supports PS, CMS, and G1, Java 9 and later versions support only G1, and Java 17 and later versions support G1 and ZGC. For details, see Java Garbage Collector and Log Levels.
Table 1 Parameters on the GC analysis tab page Parameter
Description
Timestamp
Time when a GC event occurred.
GC Cause
Cause of GC.
Garbage Collector
Name of the garbage collector that performs GC.
Memory Applied for GC
Memory capacity allocated for GC.
Memory Before GC
Memory capacity before GC.
Memory After GC
Memory capacity after GC.
GC Memory Size
Memory reclaimed by GC.
GC Threads
Number of threads used during GC.
Pause Time (ms)
Time when an application is paused due to GC.
Collected GC Event Info
GC Activities
Displays the ratio of the GC pause time to the unit time (1 second) in an area chart.
Memory
Displays the memory for which the JVM applies, memory in use, and free memory in a stacked area chart.
GC
Displays the memory reclaimed by GC in an area chart.
Pause Time (ms)
Displays the application pause time caused by GC in an area chart.
GC Threads
Displays the number of threads used during GC in an area chart.
- Click the GC Logs tab.
Click Collect GC Log to view the analysis of key GC metrics. See Figure 2. For details about the parameters, see Table 2.
- During GC log collection, the collection progress and the Cancel Collection button are displayed. You can click Cancel Collection to cancel the collection event.
- When you move the mouse pointer to the collection diagram, the detailed information for the corresponding time is displayed.
- If GC log data is not obtained, enable the relevant log level. For details, see Java Garbage Collector and Log Levels.
- Click
to save the current GC log information. The same GC log information can be saved only once. You can view or download the GC log information in the GC log list on the main page.
Table 2 Parameters on the key GC metrics Parameter
Description
GC throughput
Total duration except for GC.
GC overhead
Percentage of resources occupied by GC.
Linearity
CPU multi-core usage. The calculation formula is as follows: (User time + System time)/Actual time
Average GC pause
Average GC pause duration.
Maximum pause
Maximum pause duration of a process in GC.
GC Pauses
Overall GC pause statistics.
GC Linearity
Real-time linearity change within a collection period.
Select GC Causes from the Display drop-down list to view the GC cause analysis data. See Figure 3.
Select Detailed Analysis of GC Activities from the Display drop-down list to view the detailed GC statistics. See Figure 4. For details about the parameters, see Table 3.
Table 3 Parameters of detailed GC activity analysis Parameter
Description
G1 Collection Phase Statistics
Total GC Time
Total duration of all GC tasks.
Average GC Time
Average duration of GC for each category.
Average Time Standard Deviation
Standard deviation of the average GC time.
Minimum/Maximum Time
Minimum and maximum GC durations.
Average Interval
Average interval between any two GC tasks.
GC Pause & Memory Usage Change
GC Pause Duration
GC pause duration of each mark.
Heap Usage
Heap memory usage before and after GC.
Young Zone Usage
Usage of the young generation before and after GC. This data is available only when the CMS collector is used.
Old Zone Usage
Usage of the old generation before and after GC.
Eden Zone Usage
Usage of the eden space before and after GC.
Survivor Zone Usage
Usage of the survivor space before and after GC.
Metadata Zone Usage
Usage of the metaspace before and after GC.



