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

Hotspot should use PICL interface to get cacheline size on SPARC

    Details

    • Subcomponent:
    • Resolved In Build:
      b32
    • CPU:
      sparc
    • OS:
      generic

      Backports

        Description

        Currently the cache line size on SPARC is hardcoded into VM:

         static intx prefetch_data_size() {
            return is_T4() && !is_T7() ? 32 : 64; // default prefetch block size on sparc
         }

         static bool is_T4() { return is_T_family(_features) && has_cbcond(); }
         static bool is_T7() { return is_T_family(_features) && has_sparc5_instr(); }

        Where is_T_family() relies on data from kstat library:

        } else if (strstr(impl, "SPARC-T") != NULL) {
          features |= T_family_m;

        Unfortunately in virtual machine kstat may not provide such information (JDK-8035283).

        We should use PICL (libpicl.so) interface to get (L2) cache line size on SPARC. I verified that Solaris 10u9, which is jdk7 supported OS, has libpicl.so.

          Issue Links

            Activity

            Hide
            kvn Vladimir Kozlov added a comment -
            Attached Greg's C program which uses libpicl to read L2 cache line size
            Show
            kvn Vladimir Kozlov added a comment - Attached Greg's C program which uses libpicl to read L2 cache line size
            Hide
            kvn Vladimir Kozlov added a comment -
            The system could have different cpus. We need to check all of them and if they have different cahceline sizes we need to disable UseBlockZeroing and UseBlockCopy code which use BIS instructions.
            Show
            kvn Vladimir Kozlov added a comment - The system could have different cpus. We need to check all of them and if they have different cahceline sizes we need to disable UseBlockZeroing and UseBlockCopy code which use BIS instructions.
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/63934ec778a2
            User: iveresov
            Date: 2014-09-05 19:24:59 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs-comp/hotspot/rev/63934ec778a2 User: iveresov Date: 2014-09-05 19:24:59 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/63934ec778a2
            User: lana
            Date: 2014-09-24 20:47:23 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/63934ec778a2 User: lana Date: 2014-09-24 20:47:23 +0000
            Hide
            iaberg Ingemar Åberg added a comment - - edited
            This fix makes the PICL library a requirement on amd64 as well, is this intentional?
            Show
            iaberg Ingemar Åberg added a comment - - edited This fix makes the PICL library a requirement on amd64 as well, is this intentional?

              People

              • Assignee:
                iveresov Igor Veresov
                Reporter:
                kvn Vladimir Kozlov
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: