diff options
| author | Nick Banks <nickbanks@netflix.com> | 2026-09-02 14:28:54 +0000 |
|---|---|---|
| committer | Mitchell Horne <mhorne@FreeBSD.org> | 2026-09-02 14:29:08 +0000 |
| commit | 1db0c9fa7a32255c452c2536d657e63b55e30e03 (patch) | |
| tree | 5f2b4cc83f4a5a07a608eaa42a036393ddb587e6 /docs/libIndex.html | |
| parent | 792c94293e217d77d9eb8871ce3b53898ece0f9a (diff) | |
pmc_save_user_callchain() emits the pc it just loaded before checking
whether fp is the ABI's zero frame-chain terminator. At the bottom of
a well-formed chain under _start, fp comes back 0 as expected, but the
paired pc is stale rtld data left on the stack -- a legal userspace VA
that still passes PMC_IN_USERSPACE(), so it gets emitted as a bogus
extra frame. This shows up in flame graphs as a spurious hex-valued
root frame below _start.
Check fp == 0 alongside the existing checks before emitting, matching
how arm/arm64/powerpc already load the next fp before their check.
Measured via 1kHz hwpmc sampling on an OCA: stacks with any unresolved
hex frame drop from 23.9% to 1.3%, and stacks with hex at the root drop
from 5.5% to 0.3%.
Reviewed by: mhorne, Ali Mashtizadeh <ali@mashtizadeh.com>, gallatin
MFC after: 3 days
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D59229
Diffstat (limited to 'docs/libIndex.html')
0 files changed, 0 insertions, 0 deletions
