On Fri, 11 Sep 2026 21:23:29 GMT, Leonid Mesnik <[email protected]> wrote:

> The flattened arrays might have different layout an thus different size. 
> 
> So it makes sense to update GC.class_histogram report to reflect this.
> 
> The layout is not printed for plain reference-based arrays. 
> 
> Here is the example of new output:
> 
>   23:             1           8208  
> [LClassHistogramFlattenedArrayTest$TestClassNA; [flat, nullable, atomic]
>   40:             1           4112  
> [LClassHistogramFlattenedArrayTest$TestClassNRA; [flat, null-restricted, 
> atomic]
>   41:             1           4112  
> [LClassHistogramFlattenedArrayTest$TestClassNRNA; [flat, null-restricted, 
> non-atomic]
>   
> For plain reference arrays it should be the same, like:
> 42:             1           4112  
> [LClassHistogramFlattenedArrayTest$TestClass; 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Minor comment on reducing LooselyConsistentValue, otherwise LGTM

[CSR FAQ](https://wiki.openjdk.org/spaces/csr/pages/32342047/CSR+FAQs): 

> Interfaces that are experimental or for diagnostic purposes do not need to go 
> through CSR process, but the CSR process may be employed if feedback from the 
> CSR reviewers is desired.

Feels diagnostic to me, but if you are uncertain, you can double check.

Thanks for the fix

test/hotspot/jtreg/serviceability/dcmd/gc/ClassHistogramFlattenedArrayTest.java 
line 54:

> 52:     public static value record TestClassNRA(short s1, short s2) {}
> 53: 
> 54:     @jdk.internal.vm.annotation.LooselyConsistentValue

Is it possible to reduce the use of "LooselyConsistentValue" to where it is 
specifically needed, i.e. only TestClassNRNA. It is an internal annotation that 
may disappear in the future (someone might mistakenly  think the whole test 
could be dropped if that occurred).

-------------

Marked as reviewed by dsimms (Author).

PR Review: https://git.openjdk.org/jdk/pull/32845#pullrequestreview-5544175410
PR Review Comment: https://git.openjdk.org/jdk/pull/32845#discussion_r4291818798

Reply via email to