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

os::Linux::get_tick_information is inaccurate if the guest fields are non-zero

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 19
    • hotspot
    • generic
    • linux

      os::Linux::get_tick_information calculates the CPUPerfTicks::total field based on /proc/stat.
      At this time, the guest field of /proc/stat is also added.

      However, the guest field of /proc/stat has already been added to the user field of /proc/stat in the linux kernel.
      (Unfortunately, this behavior does not seem to be documented.)

      The following is the relevant part in the linux kernel source.
      https://github.com/torvalds/linux/blob/v5.16/kernel/sched/cputime.c#L135-L157

      Therefore, in the current calclulation method, the guest field of /proc/stat is added twice.


      Correctly, the guest field should not be added.

            mkariya Mitsuru Kariya
            mkariya Mitsuru Kariya
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: