JDK-8291418 : adjust monitor deflation logging and deflate_idle_monitors use
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-07-27
  • Updated: 2022-12-08
  • Resolved: 2022-12-02
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 20
20 b27Fixed
Description
While working on the following RFE:

    JDK-8256302 releasing oopStorage when deflating allows for faster deleting

I ran into some minor issues with monitor deflation logging and the
deflate_idle_monitors() calls.

- The logging call near the end of ObjectSynchronizer::deflate_idle_monitors()
  that describes the work done in MMM.NNNNNNN seconds should include
  unlinked_count and deleted_count in addition to deflated_count.

- The deflate_idle_monitors() call in
  ObjectSynchronizer::do_final_audit_and_print_stats() should
  continue when 1 or more monitors is deflated. By stopping after
  the first count < MonitorDeflationMax is encountered, it is possible
  to miss other deflation attempts where count < MonitorDeflationMax
  is encountered. This can happen during the final audit when the
  MonitorDeflationThread has paused for the final safepoint after
  deflating some number of monitors, but the pause happens before
  the deflated monitors are unlinked. The VMThread will be able to
  unlink these monitors if it does another deflate_idle_monitors() call
  after the first count < MonitorDeflationMax is encountered.
 
- The deflate_idle_monitors() call in VM_ThreadDump::doit()
  should continue when 1 or more monitors is deflated. This
  situation is similar to do_final_audit_and_print_stats() where
  the MonitorDeflationThread could be blocked for a safepoint
  and the VMThread could do the unlinking that was deferred
  for the safepoint pause.
Comments
Changeset: 6065516b Author: Daniel D. Daugherty <dcubed@openjdk.org> Date: 2022-12-02 22:31:08 +0000 URL: https://git.openjdk.org/jdk/commit/6065516bb3e0e445e9383718f539ec48440d6290
02-12-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/11293 Date: 2022-11-22 17:10:56 +0000
22-11-2022