PowerPC: Initial SFrame support for 64-bit PowerPC ELF ABI
The patch adds SFrame support for PowerPC64 to resolve issues with stale link registers and epilogue races during profiling.
Abhay Kandpal clarifies the necessity of SFrame (stack frame) support for PowerPC64, addressing issues with stale link registers at NMI boundaries and epilogue races that lead to missing caller information during profiling. These problems cannot be reliably solved in userspace, requiring kernel-side unwinding with reliable frame data provided by SFrame. The patch has been tested on both ppc64le and ppc64 BE.
- proposer
Explains the motivation for SFrame support on PowerPC64 due to issues with stale link registers and epilogue races during profiling.
“SFrame in the kernel would allow the unwinder to resolve this directly without relying on userspace post-processing.”
In Details
This patch adds SFrame support for PowerPC64. SFrame provides a more reliable way to unwind the stack during profiling, especially in the presence of NMIs and epilogue races. .eh_frame based unwinding has limitations in these scenarios. This affects perf and other profiling tools.
For Context
This patch introduces a new mechanism called SFrame for stack unwinding on PowerPC64 systems. Stack unwinding is the process of determining the sequence of function calls that led to a particular point in the program's execution. Traditional methods can fail in certain situations, leading to inaccurate profiling data. SFrame provides a more reliable way to walk the stack, improving the accuracy of performance analysis tools.