diff --git a/InternalDocs/profiling_binary_format.md b/InternalDocs/profiling_binary_format.md index 51b1944aa5c8a00..148c9f879b4b2e8 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 @@ -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 | 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