Page MenuHomeFreeBSD

Improvements to HWPMC support on FreeBSD/arm64 to handle counter wraparound
AbandonedPublic

Authored by rwatson on Jan 3 2021, 9:27 PM.
Tags
Referenced Files
Unknown Object (File)
Jan 13 2024, 2:34 AM
Unknown Object (File)
Dec 30 2023, 1:39 PM
Unknown Object (File)
Dec 20 2023, 4:43 AM
Unknown Object (File)
Jun 1 2023, 7:39 PM
Unknown Object (File)
May 27 2023, 8:31 AM
Unknown Object (File)
Mar 1 2023, 5:16 PM
Unknown Object (File)
Feb 14 2023, 1:52 AM
Unknown Object (File)
Dec 30 2022, 12:22 PM
Subscribers

Details

Reviewers
andrew
br
gnn
Summary

Starting with a patch from Andrew Turner and Ruslan Bukin to improve HWPMC support for ARMv8-A counter wraparound:

  • Move to per-CPU overflow entries, since we model these as 32-bit extensions to 32-bit per-CPU registers.
  • Attempt to address a race between overflow counting and overflows, which may occur (for example) if the overflow happens while interrupts are off during context switching.

With these changes, I no longer experience panics when using per-process
counters on a multithreaded process.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 35913
Build 32802: arc lint + arc unit

Event Timeline

rwatson retitled this revision from Starting with a patch from Andrew Turner and Ruslan Bukin to improve HWPMC support for ARMv8-A counter wraparound: to Starting with a patch from Andrew Turner and Ruslan Bukin to improve HWPMCsupport for ARMv8-A counter wraparound:.Jan 3 2021, 9:28 PM
rwatson changed the repository for this revision from rS FreeBSD src repository - subversion to rG FreeBSD src repository.
rwatson added a project: arm64.
rwatson retitled this revision from Starting with a patch from Andrew Turner and Ruslan Bukin to improve HWPMCsupport for ARMv8-A counter wraparound: to Improvements to HWPMC support on FreeBSD/arm64 to handle counter wraparound.
rwatson edited the summary of this revision. (Show Details)
sys/dev/hwpmc/hwpmc_arm64.c
235

Why is this per-CPU? pm should already be per-CPU from arm64_pcpu[cpu]

I think we now handle this with my recent commits.

A modified version of this merged in recent changes by @andrew.