RFR: 8333542: Breakpoint in parallel code does not work
Dean Long
dlong at openjdk.org
Fri Jun 21 22:31:21 UTC 2024
On Mon, 17 Jun 2024 17:58:14 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> Revert the change for JDK-8288064 "Class initialization locking". JVMTI class prepare event relies on a lock being held through setting the state of the class to 'linked' and the JVMTI event posting. The only usable lock is the Java object init_lock, which was removed. This change restores the lock and fixes all the conflicts in code that's changed since.
>
> Tested with tier1-7.
There may be a simpler way to fix this. What if we pretend that any class with a deferred breakpoint automatically has a static initializer? Then as part of the "injected" static initializer, the class does the prepare event and sets up the breakpoint. In the mean time, other threads trying to execute methods in that class are blocked because of the static initializer protocol. I don't think this introduces new deadlocks unless the prepare event does something strange.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19755#issuecomment-2183542289
More information about the hotspot-dev
mailing list