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

AllocatePrefetchDistance is not changed by command line

    XMLWordPrintable

Details

    • b21
    • generic
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: