Integrated: 8362657: Make tables used in AOT assembly phase GC-safe

Ioi Lam iklam at openjdk.org
Tue Jul 22 17:44:23 UTC 2025


On Fri, 18 Jul 2025 20:46:17 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> This fixes crashes when using `-Xlog:aot+map=trace,aot+map+oops=trace:file=aot.oops.txt:none:filesize=0` during the assembly phase.
> 
> I basically changed a few raw `oop` pointers to `OopHandle`. I also simplified `ArchiveHeapWriter::is_marked_as_native_pointer()`.
> 
> Note that for `HeapShared::archived_object_cache()`, I calculate the hashcode using the raw oop. This way, we can avoid calling `oopDesc::identity_hash()` for every archived oops. As a result, when we use this table after exiting the CDS safepoint, we must rehash it. See changes in `ArchiveBuilder::CDSMapLogger::log()`.
> 
> - It might be alright to pre-calculate the identity hash of the archived oops in the assembly phase, but I think we should do that only if we find a reason to do so. We shouldn't do it just because it's convenient for implementing an internal table,

This pull request has now been integrated.

Changeset: a529aa73
Author:    Ioi Lam <iklam at openjdk.org>
URL:       https://git.openjdk.org/leyden/commit/a529aa731d4daf2744d3ea5e94a112030c34c341
Stats:     146 lines in 8 files changed: 91 ins; 21 del; 34 mod

8362657: Make tables used in AOT assembly phase GC-safe

Reviewed-by: kvn, asmehra, shade

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

PR: https://git.openjdk.org/leyden/pull/86


More information about the leyden-dev mailing list