Integrated: 8298126: Print statistics for objects in CDS archive heap
Ioi Lam
iklam at openjdk.org
Sun Dec 11 03:02:47 UTC 2022
On Mon, 5 Dec 2022 22:09:58 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> For diagnostic purposes, it's useful to print out statistics of the objects in the CDS archive heap. For example, this shows the number of objects with a distribution of different sizes.
>
>
> [6.772s][info][cds,heap] 0 objects are <= 8 bytes (total 0 bytes, avg 0.0 bytes)
> [6.772s][info][cds,heap] 1205 objects are <= 16 bytes (total 19280 bytes, avg 16.0 bytes)
> [6.772s][info][cds,heap] 15717 objects are <= 32 bytes (total 411024 bytes, avg 26.2 bytes)
> [6.772s][info][cds,heap] 4127 objects are <= 64 bytes (total 198080 bytes, avg 48.0 bytes)
> [6.772s][info][cds,heap] 2380 objects are <= 128 bytes (total 243016 bytes, avg 102.1 bytes)
> [6.772s][info][cds,heap] 293 objects are <= 256 bytes (total 47920 bytes, avg 163.5 bytes)
> [6.772s][info][cds,heap] 51 objects are <= 512 bytes (total 17112 bytes, avg 335.5 bytes)
> [6.772s][info][cds,heap] 18 objects are <= 1024 bytes (total 14480 bytes, avg 804.4 bytes)
> [6.772s][info][cds,heap] 11 objects are <= 2048 bytes (total 13440 bytes, avg 1221.8 bytes)
> [6.772s][info][cds,heap] 3 objects are <= 4096 bytes (total 9808 bytes, avg 3269.3 bytes)
> [6.772s][info][cds,heap] 3 objects are <= 8192 bytes (total 12840 bytes, avg 4280.0 bytes)
> [6.772s][info][cds,heap] 4 objects are <= 16384 bytes (total 37240 bytes, avg 9310.0 bytes)
> [6.772s][info][cds,heap] 0 objects are <= 32768 bytes (total 0 bytes, avg 0.0 bytes)
> [6.772s][info][cds,heap] 0 objects are <= 65536 bytes (total 0 bytes, avg 0.0 bytes)
> [6.772s][info][cds,heap] 0 objects are <= 131072 bytes (total 0 bytes, avg 0.0 bytes)
> [6.772s][info][cds,heap] 0 objects are <= 262144 bytes (total 0 bytes, avg 0.0 bytes)
> [6.772s][info][cds,heap] 0 huge objects (total 0 bytes, avg 0.0 bytes)
> [6.772s][info][cds,heap] 23812 total objects (total 1024240 bytes, avg 43.0 bytes)
>
>
> These stats are useful when implement large changes in the CDS heap archiving code. For example, [JDK-8296344](https://bugs.openjdk.org/browse/JDK-8296344) significantly changes how the objects are copied into the archive. We can use these stats to verify that the exact same objects are copied.
This pull request has now been integrated.
Changeset: a37de62d
Author: Ioi Lam <iklam at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/a37de62d9ddadf1490ee59bd03224e8cea70a75b
Stats: 64 lines in 2 files changed: 64 ins; 0 del; 0 mod
8298126: Print statistics for objects in CDS archive heap
Reviewed-by: ccheung
-------------
PR: https://git.openjdk.org/jdk/pull/11520
More information about the hotspot-runtime-dev
mailing list