RFR: 8333542: Breakpoint in parallel code does not work

Coleen Phillimore coleenp at openjdk.org
Fri Jun 21 23:39:09 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.

I had a version of the fix that you described and it works well with the test case.   Unfortunately, there are other class prepare events that are expected at link time before the class is initialized.  Luckily we have a robust set of tests.   One such test is vmTestbase/nsk/jvmti/scenarios/events/EM01/em01t001.

If we want to remove the ObjectLocker in a future release, I think the RecursiveLock mechanism would be the way to do it.  I chose a backout for this because it's also broken in JDK 21 and Chris thinks it's important to fix there also.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/19755#issuecomment-2183582057


More information about the hotspot-dev mailing list