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

AllocatePrefetchDistance is not changed by command line

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: hs25, 9, 10
    • Fix Version/s: 10
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b21
    • CPU:
      generic
    • OS:
      generic

      Description

      On Intel SandyBridge Linux x86_64, I tried to increase the AllocatePrefetchDistance by adding:
      -XX:AllocatePrefetchDistance=256 -XX:AllocatePrefetchLines=4

      But the final flag indicates:
           intx AllocatePrefetchDistance := 192 {product}
           intx AllocatePrefetchInstr = 0 {product}
           intx AllocatePrefetchLines := 4 {product}
           intx AllocatePrefetchStepSize = 64 {product}
           intx AllocatePrefetchStyle = 1 {product}

      In vm_version_x86.hpp:
        AllocatePrefetchDistance = allocate_prefetch_distance();
        AllocatePrefetchStyle = allocate_prefetch_style();

        if( is_intel() && cpu_family() == 6 && supports_sse3() ) {
          if( AllocatePrefetchStyle == 2 ) { // watermark prefetching on Core
      #ifdef _LP64
            AllocatePrefetchDistance = 384;
      #else
            AllocatePrefetchDistance = 320;
      #endif
          }
          if( supports_sse4_2() && supports_ht() ) { // Nehalem based cpus
            AllocatePrefetchDistance = 192;
            AllocatePrefetchLines = 4;
      #ifdef COMPILER2
            if (AggressiveOpts && FLAG_IS_DEFAULT(UseFPUForSpilling)) {
              FLAG_SET_DEFAULT(UseFPUForSpilling, true);
            }
      #endif
          }
        }
        assert(AllocatePrefetchDistance % AllocatePrefetchStepSize == 0, "invalid value");

      AllocatePrefetchDistance is decided by the platform, not from command line

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rraghavan Rahul Raghavan
              Reporter:
              yuzhang Jenny Zhang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: