Problem / Background
Apple M5 Pro/Max introduced a new 3-tier CPU architecture: Super + Performance (no Efficiency cores in Pro/Max). The current code only handles the legacy 2-tier P-core/E-core model, causing significant issues on M5 Max where only 6 out of 18 cores are monitored.
1. IOReport channel naming changed (CRITICAL)
On M5 Max, IOReport uses completely new channel prefixes:
| Channel |
Cores |
Role |
MCPU0, MCPU00-MCPU05 |
6 |
Super core cluster |
MCPU1, MCPU10-MCPU15 |
6 |
Performance core cluster 1 |
PCPU, PCPU0-PCPU5 |
6 |
Performance core cluster 2 |
ECPU |
0 |
Does not exist |
Current code at src/device/macos_native/ioreport.rs:794-799 only matches E*/ECPU and P*/PCPU:
- MCPU0x (6 Super cores) → starts with "M" → completely ignored
- MCPU1x (6 Performance cores) → starts with "M" → completely ignored
- PCPUx (6 Performance cores) → starts with "P" → collected as p_cluster (only 6 of 12 Performance cores)
- ECPU → does not exist → e_cluster is empty
Result: Only 6 out of 18 cores are being monitored.
2. sysctl perflevel mapping is wrong
src/device/cpu_macos.rs:362-374 assumes perflevel0 = P-core, perflevel1 = E-core. But on M5 Max:
hw.perflevel0.name: Super
hw.perflevel1.name: Performance
hw.nperflevels: 2
The code hardcodes the assumption without reading hw.perflevelN.name. This causes Super cores to be labeled as "P-CPU" and Performance cores to be labeled as "E-CPU".
3. CoreType enum lacks Super variant
src/device/types.rs:110-115 only has Performance, Efficiency, Standard. No Super variant exists.
4. TUI display only shows P-CPU/E-CPU
src/ui/renderers/cpu_renderer.rs hardcodes "P-CPU" and "E-CPU" labels. M5 Pro/Max needs "S-CPU" and "P-CPU" labels.
5. AppleSiliconCpuInfo struct lacks Super core fields
src/device/types.rs:136-148 only has p_core_* and e_core_* fields.
Proposed Solution
- Add
Super variant to CoreType enum in src/device/types.rs
- Read
hw.perflevelN.name from sysctl to dynamically determine core type names instead of hardcoding perflevel0=P, perflevel1=E
- Update IOReport channel matching in
src/device/macos_native/ioreport.rs to handle MCPU prefix channels, mapping them correctly based on cluster index (MCPU0 = Super, MCPU1 = Performance cluster)
- Add
s_core_count, s_core_utilization, s_cluster_frequency_mhz fields to AppleSiliconCpuInfo
- Update TUI rendering in
src/ui/renderers/cpu_renderer.rs to display "S-CPU" / "P-CPU" for M5, and "P-CPU" / "E-CPU" for M1-M4
- Handle 3 physical clusters mapping to 2 perflevels (MCPU1 + PCPU are both Performance tier)
Acceptance Criteria
Technical Considerations
- 3 physical IOReport clusters (MCPU0, MCPU1, PCPU) map to 2 sysctl perflevels (Super, Performance). MCPU1 and PCPU are both Performance tier and should be aggregated.
- The
MCPU prefix is new to M5; older chips do not use it. Channel matching must be additive, not breaking.
- M5 Pro may have fewer cores per cluster but follows the same naming convention.
Affected Files
src/device/types.rs — CoreType enum, AppleSiliconCpuInfo struct
src/device/macos_native/ioreport.rs — IOReport channel parsing
src/device/cpu_macos.rs — sysctl core count detection
src/ui/renderers/cpu_renderer.rs — TUI display labels
src/device/macos_native/metrics.rs — metrics data aggregation
Environment
- Confirmed on: MacBook Pro with Apple M5 Max (Mac17,7)
- 18 cores: 6 Super + 12 Performance
- macOS with
hw.perflevel0.name: Super, hw.perflevel1.name: Performance
Problem / Background
Apple M5 Pro/Max introduced a new 3-tier CPU architecture: Super + Performance (no Efficiency cores in Pro/Max). The current code only handles the legacy 2-tier P-core/E-core model, causing significant issues on M5 Max where only 6 out of 18 cores are monitored.
1. IOReport channel naming changed (CRITICAL)
On M5 Max, IOReport uses completely new channel prefixes:
MCPU0,MCPU00-MCPU05MCPU1,MCPU10-MCPU15PCPU,PCPU0-PCPU5ECPUCurrent code at
src/device/macos_native/ioreport.rs:794-799only matchesE*/ECPUandP*/PCPU:Result: Only 6 out of 18 cores are being monitored.
2. sysctl perflevel mapping is wrong
src/device/cpu_macos.rs:362-374assumesperflevel0 = P-core,perflevel1 = E-core. But on M5 Max:The code hardcodes the assumption without reading
hw.perflevelN.name. This causes Super cores to be labeled as "P-CPU" and Performance cores to be labeled as "E-CPU".3. CoreType enum lacks Super variant
src/device/types.rs:110-115only hasPerformance,Efficiency,Standard. NoSupervariant exists.4. TUI display only shows P-CPU/E-CPU
src/ui/renderers/cpu_renderer.rshardcodes "P-CPU" and "E-CPU" labels. M5 Pro/Max needs "S-CPU" and "P-CPU" labels.5. AppleSiliconCpuInfo struct lacks Super core fields
src/device/types.rs:136-148only hasp_core_*ande_core_*fields.Proposed Solution
Supervariant toCoreTypeenum insrc/device/types.rshw.perflevelN.namefrom sysctl to dynamically determine core type names instead of hardcoding perflevel0=P, perflevel1=Esrc/device/macos_native/ioreport.rsto handleMCPUprefix channels, mapping them correctly based on cluster index (MCPU0 = Super, MCPU1 = Performance cluster)s_core_count,s_core_utilization,s_cluster_frequency_mhzfields toAppleSiliconCpuInfosrc/ui/renderers/cpu_renderer.rsto display "S-CPU" / "P-CPU" for M5, and "P-CPU" / "E-CPU" for M1-M4Acceptance Criteria
CoreType::Supervariant added and used throughout the codebaseMCPU0*channels as Super cores andMCPU1*channels as Performance coreshw.perflevelN.nameis read dynamically to determine core type labelsAppleSiliconCpuInfoincludes Super core fields (s_core_count,s_core_utilization,s_cluster_frequency_mhz)Technical Considerations
MCPUprefix is new to M5; older chips do not use it. Channel matching must be additive, not breaking.Affected Files
src/device/types.rs— CoreType enum, AppleSiliconCpuInfo structsrc/device/macos_native/ioreport.rs— IOReport channel parsingsrc/device/cpu_macos.rs— sysctl core count detectionsrc/ui/renderers/cpu_renderer.rs— TUI display labelssrc/device/macos_native/metrics.rs— metrics data aggregationEnvironment
hw.perflevel0.name: Super,hw.perflevel1.name: Performance