Integrated: 8329431: Improve speed of writing CDS heap objects
Ioi Lam
iklam at openjdk.org
Wed Apr 10 04:17:29 UTC 2024
On Tue, 2 Apr 2024 03:08:27 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> [1] Change fixed sized ResourceHashtable used by CDS heap object dumping to ResizeableResourceHashtable. Before, the ArchivedObjectCache table has only 36k buckets. When running the LotsOfClasses.java test, this table would contain 721751 entries, so each bucket will have 200 entries. After the fix, the table will automatically expand so that each bucket will have about 8 entries.
>
> [2] ArchiveHeapWriter::sort_source_objs() used to do O(N*logN) lookup in ArchivedObjectCache (each lookup computes the "rank" of the object). Now the rank is computed once for each object, so the lookup has been reduced to O(N).
>
> [3] I also fixed TestCommon.findAllClasses() -- it used to try to recurse on even the non-directory entries. This causes 1 exception for each class in the jrt:// file system. Now we recurse only on directory entries.
>
> On my machine, the execution time of LotsOfClasses.java reduced from 40 seconds to 27 seconds.
This pull request has now been integrated.
Changeset: bab70193
Author: Ioi Lam <iklam at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/bab70193ddaae66a1f9039b0f1af1a0dc0e39cf9
Stats: 104 lines in 6 files changed: 43 ins; 19 del; 42 mod
8329431: Improve speed of writing CDS heap objects
Reviewed-by: ccheung, matsaave
-------------
PR: https://git.openjdk.org/jdk/pull/18572
More information about the hotspot-runtime-dev
mailing list