[PR #6168] [MERGED] Linux on ARM: name the CPU from its implementer and part #6694

Closed
opened 2026-11-03 06:25:01 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6168
Author: @xFedeT
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/arm-cpu-name


📝 Commits (1)

  • ce02c03 Linux on ARM: name the CPU from its implementer and part

📊 Changes

3 files changed (+100 additions, -11 deletions)

View changed files

📝 crates/horizon-bench/src/hardware.rs (+2 -4)
📝 crates/horizon-client-render/src/crash.rs (+1 -6)
📝 crates/horizon-telemetry/src/system.rs (+97 -1)

📄 Description

🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally.

Fixes #6073

What was wrong

On aarch64 Linux /proc/cpuinfo has no model name (the arm64 kernel prints only CPU implementer, CPU part and friends). Telemetry sent cpu: "", the benchmark report left out hardware.cpu (so the telemetry server refused it: "no GPU or CPU name"), and the crash report fell back to aarch64.

What changes

horizon_telemetry::system::linux_cpu_name(cpuinfo): model name when there is one; else the core named from CPU implementer and CPU part through the same tables as lscpu (ARM Neoverse-N1, ARM Cortex-A72, Apple, Qualcomm, Ampere..., an unknown part kept as ARM (CPU part 0x...)); else the board's Model (a Raspberry Pi's downstream kernel). Telemetry (system.rs), the benchmark report (horizon-bench/src/hardware.rs) and the crash report (crash.rs) all call it now. A Raspberry Pi is named by its core instead of its board and revision, so Pis of one core group together in the summary.

Verification

Two unit tests on the real dump shapes from the issue (an arm64 Neoverse-N1, a Pi 4 with its Model line, an unknown Apple part, x86 and a board with only Model); the telemetry crate's tests and clippy for the three crates pass; in the benchmark crate hardware::tests::detects_this_machine fails on this macOS machine at load_average().is_some(), a probe this change does not touch (the only clippy error is the existing needless_borrow in horizon-world). There is no ARM machine here, so no real run.

Not done

The core-name table covers the cores lscpu names for ARM, plus vendor names for the other implementers; a part it does not know prints as its raw part number. A name with the marketing product (for example "Graviton3") would need the device tree or the cloud's metadata.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/6168 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/arm-cpu-name` --- ### 📝 Commits (1) - [`ce02c03`](https://github.com/horizon-rust/horizon/commit/ce02c03296a7526030753afacfdacb56e9aca2eb) Linux on ARM: name the CPU from its implementer and part ### 📊 Changes **3 files changed** (+100 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-bench/src/hardware.rs` (+2 -4) 📝 `crates/horizon-client-render/src/crash.rs` (+1 -6) 📝 `crates/horizon-telemetry/src/system.rs` (+97 -1) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally. Fixes #6073 ## What was wrong On aarch64 Linux `/proc/cpuinfo` has no `model name` (the arm64 kernel prints only `CPU implementer`, `CPU part` and friends). Telemetry sent `cpu: ""`, the benchmark report left out `hardware.cpu` (so the telemetry server refused it: "no GPU or CPU name"), and the crash report fell back to `aarch64`. ## What changes `horizon_telemetry::system::linux_cpu_name(cpuinfo)`: `model name` when there is one; else the core named from `CPU implementer` and `CPU part` through the same tables as `lscpu` (`ARM Neoverse-N1`, `ARM Cortex-A72`, `Apple`, `Qualcomm`, `Ampere`..., an unknown part kept as `ARM (CPU part 0x...)`); else the board's `Model` (a Raspberry Pi's downstream kernel). Telemetry (`system.rs`), the benchmark report (`horizon-bench/src/hardware.rs`) and the crash report (`crash.rs`) all call it now. A Raspberry Pi is named by its core instead of its board and revision, so Pis of one core group together in the summary. ## Verification Two unit tests on the real dump shapes from the issue (an arm64 Neoverse-N1, a Pi 4 with its `Model` line, an unknown Apple part, x86 and a board with only `Model`); the telemetry crate's tests and clippy for the three crates pass; in the benchmark crate `hardware::tests::detects_this_machine` fails on this macOS machine at `load_average().is_some()`, a probe this change does not touch (the only clippy error is the existing `needless_borrow` in `horizon-world`). There is no ARM machine here, so no real run. ## Not done The core-name table covers the cores `lscpu` names for ARM, plus vendor names for the other implementers; a part it does not know prints as its raw part number. A name with the marketing product (for example "Graviton3") would need the device tree or the cloud's metadata. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:25:01 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#6694
No description provided.