When polling for safepoint/handshakes usually we need to skip processing certain operations. Today that only applies to suspend and asynchronous exception operations, but that could grow in the future. Today we filter them by passing booleans through SafepointMechanism and HandshakeState classes and we use those in handshake code to determine which filter to apply when traversing the handshake queue.
A more scalable approach should be implemented instead of just keep adding booleans to those methods to select the proper filter.
A more scalable approach should be implemented instead of just keep adding booleans to those methods to select the proper filter.