The sweeper has an optimization that makes the lifecycle of nmethods more complicated than it needs to be.
It recognizes that no inline caches point at OSR nmethods, and uses that knowledge to reclaim OSR nmethods more aggressively than normal nmethods. It assumes that it is okay to flush unloded nmethods, and nmethods we just made zombie immediately. But if the nmethod is locked, it needs to wait anyway.
There have been multiple bugs due to this special life cycle of OSR nmethods, and it is simply not worth it. It also blocks concurrent ICStub reclamation, which requires the more robust life cycle.
It recognizes that no inline caches point at OSR nmethods, and uses that knowledge to reclaim OSR nmethods more aggressively than normal nmethods. It assumes that it is okay to flush unloded nmethods, and nmethods we just made zombie immediately. But if the nmethod is locked, it needs to wait anyway.
There have been multiple bugs due to this special life cycle of OSR nmethods, and it is simply not worth it. It also blocks concurrent ICStub reclamation, which requires the more robust life cycle.