RFR: 8298126: Print statistics for objects in CDS archive heap [v3]
Ioi Lam
iklam at openjdk.org
Sat Dec 10 07:17:34 UTC 2022
> 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.
Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
- Merge branch 'master' into 8298126-print-archive-heap-stats
- @ashu-mehra comments
- 8298126: Print statistics for objects in CDS archive heap
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/11520/files
- new: https://git.openjdk.org/jdk/pull/11520/files/9c48fd09..a6c02c20
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=11520&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=11520&range=01-02
Stats: 22255 lines in 565 files changed: 16208 ins; 4064 del; 1983 mod
Patch: https://git.openjdk.org/jdk/pull/11520.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11520/head:pull/11520
PR: https://git.openjdk.org/jdk/pull/11520
More information about the hotspot-runtime-dev
mailing list