Currently there are 3 locks related to SATB queues, and they are declared and defined globally in mutexLocker.hpp|cpp. They are only initialized inside an if (UseG1GC) block. This is slightly problematic when another GC (e.g. Shenandoah) also needs to use SATB and their respective locks.
In any case, it seems much cleaner to make those locks private in SATBQueueSet (or PtrQueueSet) and initialize them there and not expose it to the world to begin with.
In any case, it seems much cleaner to make those locks private in SATBQueueSet (or PtrQueueSet) and initialize them there and not expose it to the world to begin with.