JDK-8209574 : [AOT] breakpoint events are generated in different threads does not meet expected count when testcase vm/jvmti/Breakpoint/brkp001/brkp00102/brkp00102.html is executed
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 10,11,12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-08-16
  • Updated: 2019-12-03
  • Resolved: 2018-09-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11.0.7-oracleFixed 12 b12Fixed
Related Reports
Relates :  
Description
please check comments section for steps to reproduce
Comments
Fix request (11u) I would like to downport this for parity with 11.0.7-oracle. Applies clean except for a trivial context change: http://mail.openjdk.java.net/pipermail/jdk-updates-dev/2019-November/002179.html http://mail.openjdk.java.net/pipermail/jdk-updates-dev/2019-December/002191.html
03-12-2019

http://cr.openjdk.java.net/~kvn/8209574/webrev.00/
17-09-2018

Testing passed.
17-09-2018

After discussion we decided to check JvmtiExport::can_hotswap_or_post_breakpoint() and if tue skip AOT classes and methods registration.
15-09-2018

It will increase library size :( Currently we deoptimize all registered "active" aot methods regardless where we set breakpoint: http://hg.openjdk.java.net/jdk/jdk/file/a3989376ade2/src/hotspot/share/aot/aotCompiledMethod.hpp#l208 We can simple do not register any AOT method if JvmtiExport::can_hotswap_or_post_breakpoint() is true.
13-09-2018

We do have such a list. But we currently use it to generate a list of classes that we depend on, see AOTCompiledClass.addAOTKlassData(): // Record inlinee classes ResolvedJavaMethod[] inlinees = methodInfo.getCompilationResult().getMethods(); if (inlinees != null) { for (ResolvedJavaMethod m : inlinees) { methodInfo.addDependentKlassData(binaryContainer, (HotSpotResolvedObjectType) m.getDeclaringClass()); } }
13-09-2018

With JDK-8210220 fix method brkp00102.doNothing() which have breakpoint is deoptimized (as other active AOT methods): 480 2 aot[ 1] javasoft.sqe.tests.vm.jvmti.brkp001.brkp00102.brkp00102.doNothing()V made not entrant But we don't deoptimize TestThread.work() method which activated late and which inlines brkp00102.doNothing() public boolean work() { brkp00102.doNothing(); return ++count < brkp00102.MAX_ITERATION; } We need to record dependencies when we inline methods to deoptimize related methods.
13-09-2018

Vladimir, could you please have a look or re-assign? Thanks.
16-08-2018

ILW = Unable to set breakpoint in code (or at least the breakpoint count is unexpected), jvmti test with AOT'ed java.base, don't use AOT = HLM = P3
16-08-2018