PEP 831 – Frame Pointers Everywhere: Enabling System-Level Observability for Python

Hi everyone! :wave:

We are happy to announce PEP 831 – “Frame Pointers Everywhere”

This PEP proposes building CPython with -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer by default starting in Python 3.15, so that profilers, debuggers, and eBPF-based tracing tools (perf, py-spy, bpftrace, Pyroscope, etc.) can produce complete, reliable call stacks for Python processes out of the box and we can enjoy more reliable profiling, debugging and system observability.

The future is now!

25 Likes

+10 We should just do it. Many of the largest companies in the world have been building everything (including CPython) they run in their fleets of datacenters for decades with frame pointers enabled for all of the reasons spelled out in the PEP.

10 Likes

I would also like to publicly thank my dear co-authors @savannahostrowski, @kj0 and @diegor! You all rock :sign_of_the_horns:

9 Likes

This is an awesome write up, as a non-expert that’s tangentially interested in profiing, I really appreciate the pedagogical explanations! :sign_of_the_horns:

I would also like to publicly thank my dear co-authors @savannahostrowski, @kj0 and @diegor! You all rock :sign_of_the_horns:

Diego is not included in the PEP author list?

3 Likes

Yes, we are waiting for some (external) procedures to be approved before it gets added.

2 Likes

After extensive deliberation the Steering Council has decided to accept PEP 831 (Frame Pointers Everywhere: yahdah yahdah), because it’s clearly the correct and necessary thing… although we wish the PEP and its title had been a lot shorter, given how much of an obvious decision it is. Congrats!

(Pablo and Savannah, as PEP authors, were not involved in the decision process.)

18 Likes