RFR: 8304738: UnregisteredClassesTable_lock never created [v2]

Matias Saavedra Silva matsaave at openjdk.org
Tue Apr 11 14:07:10 UTC 2023


On Thu, 6 Apr 2023 16:11:18 GMT, Ioi Lam <iklam 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?
>
>> 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");
> }

Thank you for the reviews @iklam, @jcking, and @dholmes-ora!

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

PR Comment: https://git.openjdk.org/jdk/pull/13358#issuecomment-1503414985


More information about the hotspot-runtime-dev mailing list