/** merge bit-set exceptions into the regular exceptions list */ private synchronized void mergeBitSet() { if (this.bitSet != null && this.bitSetVersion < this.version) { addBitSetExceptions((int) (this.version - this.bitSetVersion), this.version); } }
void flushBitSetDuringRecording(long version) { if (this.bitSetVersion + BIT_SET_WIDTH - 1 >= version) { return; // it fits in this bitset } int length = BIT_SET_WIDTH; int bitCountToFlush = length * 3 / 4; if (logger.isTraceEnabled(LogMarker.RVV_VERBOSE)) { logger.trace(LogMarker.RVV_VERBOSE, "flushing RVV bitset bitSetVersion={}; bits={}", this.bitSetVersion, this.bitSet); } // see if we can shift part of the bits so that exceptions in the recent bits can // be kept in the bitset and later filled without having to create real exception objects if (version >= this.bitSetVersion + length + bitCountToFlush) { // nope - flush the whole bitset addBitSetExceptions(length, version); } else { // yes - flush the lower part. We can only flush up to the last set bit because // the exceptions list includes a "next version" that indicates a received version. addBitSetExceptions(bitCountToFlush, this.bitSetVersion + bitCountToFlush); } if (logger.isTraceEnabled(LogMarker.RVV_VERBOSE)) { logger.trace(LogMarker.RVV_VERBOSE, "After flushing bitSetVersion={}; bits={}", this.bitSetVersion, this.bitSet); } }