RFR: 6203: Add ZGC allocation stall rule [v4]
Marcus Hirt
hirt at openjdk.org
Thu Sep 4 21:45:04 UTC 2025
On Thu, 4 Sep 2025 07:33:27 GMT, Suchita Chaturvedi <schaturvedi at openjdk.org> wrote:
>> This enhancement is to add new rule for ZGC Allocation Stall events.
>>
>> The default configuration:
>>
>> <img width="946" alt="image" src="https://github.com/user-attachments/assets/0d39ae26-fdc4-49e3-a0ed-fb7f7da8f709" />
>>
>> Here are few screenshots for reference:
>>
>> <img width="344" alt="image" src="https://github.com/user-attachments/assets/e7efe1e2-d6b3-4a05-8ea6-1bf2e8b8c15f" />
>>
>> <img width="353" alt="image" src="https://github.com/user-attachments/assets/a3d3862f-96d2-4292-947f-4562c7f9f3d3" />
>>
>> <img width="344" alt="image" src="https://github.com/user-attachments/assets/9616eea6-bce8-4395-a846-db343fe349f2" />
>>
>> <img width="341" alt="image" src="https://github.com/user-attachments/assets/376a100e-ac05-48fe-a9c3-754923c3d79e" />
>>
>> <img width="353" alt="image" src="https://github.com/user-attachments/assets/cfa7c5f1-08f0-44b4-a49d-28504439a631" />
>>
>> Ignored
>>
>> <img width="352" alt="image" src="https://github.com/user-attachments/assets/3c00c22e-e64d-46b0-8b64-ed653ed1fc4b" />
>>
>> If we change default configuration as below:
>>
>> <img width="367" alt="image" src="https://github.com/user-attachments/assets/8da64985-8446-44b8-bfb4-696a726b5255" />
>>
>> <img width="350" alt="image" src="https://github.com/user-attachments/assets/ad89f02e-39b4-4df4-aae7-43cec9cc9a91" />
>>
>> <img width="347" alt="image" src="https://github.com/user-attachments/assets/b3ec1081-26dd-4391-9e0f-0b4c64a7e3c1" />
>>
>> <img width="344" alt="image" src="https://github.com/user-attachments/assets/106a7c3e-aaaf-495a-8c6f-281c96371e6e" />
>
> Suchita Chaturvedi has updated the pull request incrementally with one additional commit since the last revision:
>
> Implemented review comments
Changes requested by hirt (Lead).
core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/memory/ZGCAllocationStallRule.java line 76:
> 74: JdkAggregators.ZGC_ALLOCATION_STALL_COUNT, UnitLookup.NUMBER, IQuantity.class);
> 75:
> 76: public static final TypedResult<IQuantity> ZGC_ALLOCATION_STALL_LONGEST_DURATION = new TypedResult<>(
These are durations, so shouldn’t they use UnitLookup.MILLISECOND?
core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/messages/internal/Messages.java line 322:
> 320: public static final String GcFreedRatioRule_RESULT_SHORT_DESCRIPTION = "GcFreedRatioRule_RESULT_SHORT_DESCRIPTION"; //$NON-NLS-1$
> 321: public static final String GarbageCollectionInfo_RULE_NAME = "GarbageCollectionInfo_RULE_NAME"; //$NON-NLS-1$
> 322: public static final String ZGCAllocationStall_RULE_NAME = "ZGCAllocationStall_RULE_NAME"; //$NON-NLS-1$
Consistent capitalization - you use Zgc elsewhere.
core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/resources/org/openjdk/jmc/flightrecorder/rules/jdk/messages/internal/messages.properties line 763:
> 761: ZGCAllocationStallRule_CONFIG_WARN_LIMIT_LONG=The ZGC allocation stall time per minute needed to trigger a warning
> 762: ZGCAllocationStallRule_RATE=Allocation Stall time per minute
> 763: ZGCAllocationStallRule_RATE_LONG=The rate of ZGC Allocation Stall duration based on the time from when JVM was started
This is really not from when the JVM was started, but rather the average rate over the recording duration.
Perhaps something like:
”Average ZGC allocation stalls per minute over the recording period”
-------------
PR Review: https://git.openjdk.org/jmc/pull/664#pullrequestreview-3187220738
PR Review Comment: https://git.openjdk.org/jmc/pull/664#discussion_r2323542383
PR Review Comment: https://git.openjdk.org/jmc/pull/664#discussion_r2323533949
PR Review Comment: https://git.openjdk.org/jmc/pull/664#discussion_r2323528202
More information about the jmc-dev
mailing list