JDK-8317350 : Move code cache purging out of CodeCache::UnloadingScope
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-10-02
  • Updated: 2024-04-04
  • Resolved: 2023-10-20
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 21 JDK 22
21.0.4-oracleFixed 22 b21Fixed
Related Reports
Relates :  
Relates :  
Description
Currently, in the destructor of CodeCache::UnloadingScope we flush/purge the code cache from dead nmethods.

This is fairly surprising to do this in the destructor because the purging can take a very signficant amount of time (i.e. 90%+ of total class unloading time).

Make the flushing/puring explicit.
Comments
Fix request [21u] I backport this for parity with 21.0.4-oracle Low to medium risk. Simple cleanup, already productive in 22, but a bit larger. Clean backport. SAP nightly testing passed.
03-04-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk21u-dev/pull/433 Date: 2024-04-02 07:44:47 +0000
02-04-2024

Changeset: bd3bc2c6 Author: Thomas Schatzl <tschatzl@openjdk.org> Date: 2023-10-20 07:30:11 +0000 URL: https://git.openjdk.org/jdk/commit/bd3bc2c6181668b5856732666dc251136b7fbb99
20-10-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16011 Date: 2023-10-02 12:56:27 +0000
03-10-2023