RFR: 8316994: Avoid modifying ClassLoader and Module objects during -Xshare:dump
Matias Saavedra Silva
matsaave at openjdk.org
Wed Sep 27 21:19:12 UTC 2023
On Wed, 27 Sep 2023 05:05:31 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> When dumping the module graph, we set some native pointers in `ClassLoader` and `Module` objects to null.
>
> We used to modify the copies of these objects in the actual heap. This makes `InstanceKlass::class_loader_data()` return the wrong value inside `VM_PopulateDumpSharedSpace`.
>
> Instead, this PR modifies the copies of the objects in the `ArchiveHeapWriter` buffer. This also means that the `HeapShared::restore_loader_data()` function is no longer needed.
LGTM! Thanks for this improvement
-------------
Marked as reviewed by matsaave (Committer).
PR Review: https://git.openjdk.org/jdk/pull/15937#pullrequestreview-1647579023
More information about the hotspot-runtime-dev
mailing list