[Bug 284735] hwpmc: pmcstat on Ampere eMAG has glitches in counts

[email protected]
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284735

            Bug ID: 284735
           Summary: hwpmc: pmcstat on Ampere eMAG has glitches in counts
           Product: Base System
           Version: 14.2-STABLE
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: arm
          Assignee: [email protected]
          Reporter: [email protected]

On Ampere eMAG running stable/14, about 10-20% of the time pmcstat -p reports a
count 2^32 greater than the correct count.

$ while true ; do pmcstat -p instructions echo \\c ; done
while true ; do pmcstat -p instructions echo \\c ; done
# p/instructions 
         2207015 
# p/instructions 
         2156016 
# p/instructions 
      4297118204 
# p/instructions 
         2200683 
# p/instructions 

Note that 4297118204 is 2^32 + 2150908.

On CURRENT, Cortex A53 consistently reports about 3,400,000 instructions. 
Cortex A57 consistently reports about 4,150,000 instructions.  I don't know
which count is closer to the truth.  On a RockPro64 pmcstat doesn't really work
because of the heterogenous cores.

I am initially filing this against the arm component on the assumption that it
is CPU-specific code at fault.

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.