Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8359925

Deprecate and obsolete ParallelRefProcEnabled

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 26
    • hotspot
    • None
    • gc
    • behavioral
    • low
    • Hide
      The current default value has been to use parallel reference processing for many releases and heard no complaints. Other parallel collectors also do not allow this choice. This default value has only been established in JDK 11 (G1) and JDK 17 (Parallel), before that it has been a common suggestion to enable this feature when reference processing is a bottleneck.
      Show
      The current default value has been to use parallel reference processing for many releases and heard no complaints. Other parallel collectors also do not allow this choice. This default value has only been established in JDK 11 (G1) and JDK 17 (Parallel), before that it has been a common suggestion to enable this feature when reference processing is a bottleneck.
    • add/remove/modify command line option
    • JDK

      Summary

      Deprecate the ParallelRefProcEnabled flag in JDK 26 and obsolete it in JDK 27, then remove in JDK 28.

      Problem

      ParallelRefProcEnabled incurs some implementation complexity in reference processing. There is no benefit in disabling this flag as automatic dynamic thread number selection will automatically determine the best number of threads to use per type of references, from all available parallel threads down to using only a single thread.

      This flag is used only by Parallel and G1, and both have it enabled by default via:

        if (FLAG_IS_DEFAULT(ParallelRefProcEnabled) && ParallelGCThreads > 1) {
          FLAG_SET_DEFAULT(ParallelRefProcEnabled, true);
        }

      Solution

      Deprecate the ParallelRefProcEnabled flag in JDK 26 and obsolete it in JDK 27, then remove in JDK 28.

      Specification

         product(bool, ParallelRefProcEnabled, false,                              \
      -          "Enable parallel reference processing whenever possible")         \
      +          "(Deprecated) Enable parallel reference processing "              \
      +          "whenever possible")                                              \

            ayang Albert Yang
            ayang Albert Yang
            Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: