Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions InternalDocs/profiling_binary_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -212,6 +212,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 process's main thread |

@maurycy maurycy Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| 5 | THREAD_STATUS_MAIN_THREAD | Thread is the process's main thread |
| 5 | THREAD_STATUS_MAIN_THREAD | Thread is the interpreter's main thread |

Very formally speaking I think that's the case... I don't know if should expose this, though. Leaving as a suggestion, so the reviewer can just click or resolve.


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
Expand Down
Loading