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

x86: frequency extraction from cpu brand string is incomplete

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 11, 12, 13, 14, 15, 16
    • Fix Version/s: 16
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b22
    • CPU:
      x86
    • OS:
      generic

      Description

      VM_Version_Ext::max_qualified_cpu_freq_from_brand_string() attempts to extract and return the CPU frequency, by inspecting the CPU brand string (as per the document "Intel® Processor Identification and the CPUID Instruction. Application note 845 May 2012").

      There is a bug with the current implementation, because it is naive in using the following construct:

      const char* Hz_location = strchr(brand_string, 'H');

      This likely works for most CPU models / brands, but not when the brand string is of the following form (for example):

      "Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz"

      The 'H' in "9850H" will be matched, but since there is no 'z' in the next position, the code will fall through and report a frequency of 0.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mgronlun Markus Grönlund
              Reporter:
              mgronlun Markus Grönlund
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: