Since Python 3.12 it is possible to profile Python programs using Linux perf profiler when setting PYTHONPERFSUPPORT=1 environment variable. Unfortunately currently built Python containers are missing fno-omit-frame-pointer -mno-omit-leaf-frame-pointer CFLAGS which result in quite useless perf stack traces. It would be great to have those extra CFLAGS added to the image build. That would allow everyone to do low overhead performance profiling on production systems.