Skip to content

gh-135953: Add GIL contention markers to sampling profiler Gecko format - #139485

Merged
pablogsal merged 3 commits into
python:mainfrom
pablogsal:markers
Nov 17, 2025
Merged

gh-135953: Add GIL contention markers to sampling profiler Gecko format#139485
pablogsal merged 3 commits into
python:mainfrom
pablogsal:markers

Conversation

@pablogsal

@pablogsalpablogsal commented Oct 1, 2025

Copy link
Copy Markdown
Member

This commit enhances the Gecko format reporter in the sampling profiler
to include markers for GIL acquisition events. The implementation adds:

  • GIL contention tracking in pystate and ceval_gil
  • New marker types in the Gecko collector for GIL wait events
  • External inspection support for reading GIL state
  • Sample collection of GIL acquisition times and thread states

The markers provide visibility into GIL contention patterns, showing
when threads are waiting to acquire the GIL and how long they wait.

…o format
This commit enhances the Gecko format reporter in the sampling profiler
to include markers for GIL acquisition events. The implementation adds:
- GIL contention tracking in pystate and ceval_gil
- New marker types in the Gecko collector for GIL wait events
- External inspection support for reading GIL state
- Sample collection of GIL acquisition times and thread states
- Comprehensive tests for marker export functionality
The markers provide visibility into GIL contention patterns, showing
when threads are waiting to acquire the GIL and how long they wait.
@pablogsal

Copy link
Copy Markdown
MemberAuthor
screenshot-2025-10-01_21-30-11

@pablogsal
pablogsal merged commit 89a914c into python:mainNov 17, 2025
44 checks passed
@pablogsal
pablogsal deleted the markers branch November 17, 2025 12:46
@bedevere-bot

This comment was marked as off-topic.

StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
…o format (python#139485)
This commit enhances the Gecko format reporter in the sampling profiler
to include markers for GIL acquisition events.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@pablogsal@bedevere-bot