JDK-8274004 : Change 'nonleaf' rank name
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-09-20
  • Updated: 2021-10-08
  • Resolved: 2021-10-08
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 18
18 masterFixed
Description
Since there would no longer be a leaf name, having a nonleaf name doesn't make sense.

If we have the name 'nosafepoint' and the name 'safepoint' we can infer safepoint_check_always and safepoint_check_never so we can remove this parameter and test using the rank value.

Or max_safepoint as the rank name?

or maxrank which is shorter? or top or max?

  enum class Rank {
       event,
       service        = event          +   6,
       stackwatermark = service        +   3,
       tty            = stackwatermark +   3,
       oopstorage     = tty            +   3,
       nosafepoint    = oopstorage     +   6,
       safepoint        = nosafepoint    +  20
  };
Comments
Changeset: 6364719c Author: Coleen Phillimore <coleenp@openjdk.org> Date: 2021-10-08 12:23:19 +0000 URL: https://git.openjdk.java.net/jdk/commit/6364719cd1c57220769ea580d958da8dc2fdf7f9
08-10-2021

The decision to do a safepoint check or not, only requires a check of the rank against "nosafepoint". We only need a named safepointing rank to give us something to use when defining a safepointing mutex (given we are not allowed to use nosafepoint+N). And given the way only rank subtraction is allowed, this named rank is logically a maximum, so "max_safepoint" is accurate. But "safepoint" probably suffices in this context - I think the "max" gives the wrong emphasis as really this is the default starting value for safepoint ranks, and it also just happens to be the maximum value due to the way we are constraining things.
21-09-2021