HomeFreeBSD

hwpmc: fix false callchain assertion on the PMC_UR ring

Description

hwpmc: fix false callchain assertion on the PMC_UR ring

pmc_capture_user_callchain() asserts that TDP_CALLCHAIN is set on the
current thread, but PMC_UR samples never set that flag -- only PMC_HR
and PMC_SR do. That makes the assertion always fail for PMC_UR,
panicking INVARIANTS kernels as soon as pmcstat -U is used.

Skip the assertion for PMC_UR. No functional change on kernels built
without INVARIANTS.

Signed-off-by: Andre Silva <andasilv@amd.com>
Reviewed by: mhorne
MFC after: 1 week
Sponsored by: AMD
Differential Revision: https://reviews.freebsd.org/D58572

(cherry picked from commit af3929c5152b47278c0b6ea66efbb782b9637495)

Details

Provenance
afscoelho_gmail.comAuthored on Aug 11 2026, 4:17 PM
mhorneCommitted on Sep 3 2026, 4:27 PM
Reviewer
mhorne
Differential Revision
D58572: hwpmc: fix false callchain assertion on the PMC_UR ring
Parents
rG92cf9e36ecf9: hwpmc: fix false runcount assertion in user callchain capture
Branches
Unknown
Tags
Unknown