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).

This pull request has now been integrated.

Changeset: 795909c8
Author:    Leonid Mesnik <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/795909c86ef82cc4dfad18860b6125bae7618bb1
Stats:     103 lines in 3 files changed: 99 ins; 0 del; 4 mod

8389457: GC.class_histogram reports duplicate rows for refined array layouts

Reviewed-by: dsimms, sspitsyn

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

PR: https://git.openjdk.org/jdk/pull/32845

Reply via email to