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

Product variable PrefetchFieldsAhead is unused and should be removed

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Provisional
    • Priority: P4
    • Resolution: Unresolved
    • Fix Version/s: 19
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Interface Kind:
      add/remove/modify command line option
    • Scope:
      Implementation

      Description

      Summary

      The "PrefetchFieldsAhead" option performs no function, there is no code that uses the setting.

      Problem

      Having an option that doesn't change any behaviour is unhelpful, and risks confusion.

      Solution

      The option can be removed and added to the list of obsolete options. This skips the "deprecated" step as the functionality was removed during JDK6.

      It was removed in the JDK6 time frame (2008) by JDK-6420645: "Create a vm that uses compressed oops for up to 32gb heapsizes"

      Specification

      --- a/src/hotspot/cpu/x86/vm_version_x86.cpp
      +++ b/src/hotspot/cpu/x86/vm_version_x86.cpp
      @@ -1662,9 +1662,6 @@
         if (FLAG_IS_DEFAULT(PrefetchScanIntervalInBytes)) {
           FLAG_SET_DEFAULT(PrefetchScanIntervalInBytes, 576);
         }
      -  if (FLAG_IS_DEFAULT(PrefetchFieldsAhead)) {
      -    FLAG_SET_DEFAULT(PrefetchFieldsAhead, 1);
      -  }
       #endif
      
         if (FLAG_IS_DEFAULT(ContendedPaddingWidth) &&
      @@ -1727,9 +1724,6 @@
           if (PrefetchScanIntervalInBytes > 0) {
             log->print_cr("PrefetchScanIntervalInBytes %d", (int) PrefetchScanIntervalInBytes);
           }
      -    if (PrefetchFieldsAhead > 0) {
      -      log->print_cr("PrefetchFieldsAhead %d", (int) PrefetchFieldsAhead);
      -    }
           if (ContendedPaddingWidth > 0) {
             log->print_cr("ContendedPaddingWidth %d", (int) ContendedPaddingWidth);
           }
      --- a/src/hotspot/share/gc/shared/gc_globals.hpp
      +++ b/src/hotspot/share/gc/shared/gc_globals.hpp
      @@ -503,10 +503,6 @@
                 "How far ahead to prefetch scan area (<= 0 means off)")           \
                 range(-1, max_jint)                                               \
                                                                                   \
      -  product(intx, PrefetchFieldsAhead, -1,                                    \
      -          "How many fields ahead to prefetch in oop scan (<= 0 means off)") \
      -          range(-1, max_jint)                                               \
      -                                                                            \
         product(bool, VerifyDuringStartup, false, DIAGNOSTIC,                     \
                 "Verify memory system before executing any Java code "            \
                 "during VM initialization")                                       \
      --- a/src/hotspot/share/runtime/arguments.cpp
      +++ b/src/hotspot/share/runtime/arguments.cpp
      @@ -552,6 +552,7 @@
         { "BiasedLockingDecayTime",              JDK_Version::jdk(15), JDK_Version::jdk(18), JDK_Version::jdk(19) },
         { "UseOptoBiasInlining",                 JDK_Version::jdk(15), JDK_Version::jdk(18), JDK_Version::jdk(19) },
         { "PrintPreciseBiasedLockingStatistics", JDK_Version::jdk(15), JDK_Version::jdk(18), JDK_Version::jdk(19) },
      +  { "PrefetchFieldsAhead",                 JDK_Version::undefined(), JDK_Version::jdk(18), JDK_Version::jdk(19) },
       #ifdef ASSERT
         { "DummyObsoleteTestFlag",        JDK_Version::undefined(), JDK_Version::jdk(18), JDK_Version::undefined() },
       #endif

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              smonteith Stuart Monteith
              Reporter:
              drwhite Derek White
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: