https://github.com/python/cpython/commit/8df25809e928b88db5ec16c73470dd6bd4ed3653 commit: 8df25809e928b88db5ec16c73470dd6bd4ed3653 branch: main author: Maurycy Pawłowski-Wieroński <[email protected]> committer: pablogsal <[email protected]> date: 2026-10-05T14:13:14Z summary:
gh-154060: Fix the `Profile Stats` offsets in the profiling binary format docs and a missing flag (#157871) * correct profile stats size and paddings * missing flag * gh-154060: Clarify the main-thread status flag --------- Co-authored-by: Pablo Galindo Salgado <[email protected]> files: M InternalDocs/profiling_binary_format.md diff --git a/InternalDocs/profiling_binary_format.md b/InternalDocs/profiling_binary_format.md index 0947e946f41bd0c..a3d86b1a4ab5693 100644 --- a/InternalDocs/profiling_binary_format.md +++ b/InternalDocs/profiling_binary_format.md @@ -47,8 +47,8 @@ The file consists of five required sections and one optional extension: | String Table | Variable size +------------------+ frame_table_offset | Frame Table | Variable size -+------------------+ file_size - 64 (when stats are present) -| Profile Stats | 32 bytes (optional) ++------------------+ file_size - 88 (when stats are present) +| Profile Stats | 56 bytes (optional) +------------------+ file_size - 32 | Footer | 32 bytes (fixed) +------------------+ file_size @@ -220,6 +220,7 @@ The status byte is a bitfield encoding thread state at sample time: | 2 | THREAD_STATUS_UNKNOWN | Thread state could not be determined | | 3 | THREAD_STATUS_GIL_REQUESTED | Thread is waiting to acquire the GIL | | 4 | THREAD_STATUS_HAS_EXCEPTION | Thread has a pending exception | +| 5 | THREAD_STATUS_MAIN_THREAD | Thread is the interpreter's main thread | Multiple flags can be set simultaneously (e.g., a thread can hold the GIL while also running on CPU). Analysis tools use these to filter samples or _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
