[Bug 284736] pmcstat counters do not work on heterogenous ARM

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 11 Feb 2025 15:37:16 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284736

            Bug ID: 284736
           Summary: pmcstat counters do not work on heterogenous ARM
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: arm
          Assignee: freebsd-arm@FreeBSD.org
          Reporter: jfc@mit.edu

A RockPro64 contains two types of ARM cores which I infer have different
performance counters.  This results in two problems.

1. The "instructions" alias does not exist.  Only 30 counters are available,
mostly obscure but some useful.  I guess there is some logical AND of counter
names supported by the two cores?  The counter list is not affected by which
cpu pmcstat runs on.

2. Whether a counter counts depends on where the process is scheduled:

$ for cpu in 0 1 2 3 4 5 ; do cpuset -l "$cpu" pmcstat -p ld_dep_stall echo \\c
; done
# p/ld_dep_stall 
          901148 
# p/ld_dep_stall 
          911432 
# p/ld_dep_stall 
         1202218 
# p/ld_dep_stall 
         1225686 
# p/ld_dep_stall 
               0 
# p/ld_dep_stall 
               0 

CPUs 0-3 are Cortex A53.  CPUs 4-5 are Cortex A72.

-- 
You are receiving this mail because:
You are the assignee for the bug.