mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-135953: Add GIL contention markers to sampling profiler Gecko format (#139485)
This commit enhances the Gecko format reporter in the sampling profiler to include markers for GIL acquisition events.
This commit is contained in:
parent
994ab5c922
commit
89a914c58d
9 changed files with 627 additions and 82 deletions
|
|
@ -106,6 +106,8 @@ typedef struct _Py_DebugOffsets {
|
|||
uint64_t native_thread_id;
|
||||
uint64_t datastack_chunk;
|
||||
uint64_t status;
|
||||
uint64_t holds_gil;
|
||||
uint64_t gil_requested;
|
||||
} thread_state;
|
||||
|
||||
// InterpreterFrame offset;
|
||||
|
|
@ -273,6 +275,8 @@ typedef struct _Py_DebugOffsets {
|
|||
.native_thread_id = offsetof(PyThreadState, native_thread_id), \
|
||||
.datastack_chunk = offsetof(PyThreadState, datastack_chunk), \
|
||||
.status = offsetof(PyThreadState, _status), \
|
||||
.holds_gil = offsetof(PyThreadState, holds_gil), \
|
||||
.gil_requested = offsetof(PyThreadState, gil_requested), \
|
||||
}, \
|
||||
.interpreter_frame = { \
|
||||
.size = sizeof(_PyInterpreterFrame), \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue