free-threaded-compatibility
free-threaded-compatibility copied to clipboard
Document how to use samply on Linux to generate multithreaded profiles
If you combine samply and the JIT monitoring tools introduced in Python 3.12, you can generate multithreaded profiles that include information about both native frames and Python frames:
Here the blue frames are Python functions and the yellow frames are native functions. Samply generates reports that are viewable by profiler.firefox.com - no need to mess with flame graph SVG files!
I generated that profile running the libcst CLI using the following command:
samply record PYTHON_GIL=0 python3 -X perf -m libcst.tool codemod --no-format convert_format_to_fstring.ConvertFormatStringCommand .