RFR: 8304738: UnregisteredClassesTable_lock never created [v2]
Ioi Lam
iklam at openjdk.org
Thu Apr 6 16:14:13 UTC 2023
On Thu, 6 Apr 2023 03:06:39 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Checking `_unregistered_classes_table` for `nullptr` outside the lock was a (not strictly correct) optimisation. Under what conditions will we encounter a null `_unregistered_classes_table`? Could this be a performance hit?
I think we can do something like this:
if (Arguments::is_dumping_archive() || ClassListWriter::is_enabled()) {
... these are the only conditions where _unregistered_classes_table is used
lock { process _unregistered_classes_table }
} else {
assert(_unregistered_classes_table == nullptr, "must not be used");
}
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13358#issuecomment-1499308059
More information about the hotspot-runtime-dev
mailing list