GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-135953: Add GIL contention markers to sampling profiler Gecko format by pablogsal · Pull Request #139485 · python/cpython

Conversation

@pablogsal

@pablogsal pablogsal commented Oct 1, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

  • Issue: Expose internal stack introspection APIs as a statistical runtime analysis tool #135953

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@pablogsal
pablogsal requested review from 1st1, ZeroIntensity, ambv and ericsnowcurrently as code owners October 1, 2025 20:23
@bedevere-app bedevere-app Bot added the awaiting core review label Oct 1, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Oct 1, 2025
Expose internal stack introspection APIs as a statistical runtime analysis tool #135953
Open
@pablogsal pablogsal added the skip news label Oct 1, 2025
@pablogsal
pablogsal force-pushed the markers branch from 8be3e0c to 20ba5e6 Compare October 1, 2025 20:25
@pablogsal
pythongh-135953: Add GIL contention markers to sampling profiler Geck…
7b2719e
…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
pablogsal force-pushed the markers branch from 20ba5e6 to 7b2719e Compare October 1, 2025 20:26
@pablogsal

pablogsal commented Oct 1, 2025

Copy link
Copy Markdown
Member Author
screenshot-2025-10-01_21-30-11
StanFromIreland, cmaloney, danielhollas, and johnslavik reacted with eyes emoji
All reactions
  • 👀 4 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pablogsal
fixup! pythongh-135953: Add GIL contention markers to sampling profil…
a332095
…er Gecko format
@pablogsal
pablogsal force-pushed the markers branch from a29ecb1 to a332095 Compare November 1, 2025 17:24
@pablogsal
Fix GC markers
e739702
@pablogsal
pablogsal merged commit 89a914c into python:main Nov 17, 2025
4 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@pablogsal
pablogsal deleted the markers branch November 17, 2025 12:46
@bedevere-app bedevere-app Bot removed the awaiting core review label Nov 17, 2025
@bedevere-bot

This comment was marked as off-topic.

Sign in to view
@encukou encukou mentioned this pull request Nov 17, 2025
GH-139914: Handle stack growth direction on HPPA #140028
Merged
StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
@pablogsal @StanFromIreland
pythongh-135953: Add GIL contention markers to sampling profiler Geck…
d68a2ac
…o format (python#139485)

This commit enhances the Gecko format reporter in the sampling profiler
to include markers for GIL acquisition events.
@freakboy3742 freakboy3742 mentioned this pull request Jan 8, 2026
Add Emscripten test skips for recently added tests. #143551
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ambv ambv Awaiting requested review from ambv
@1st1 1st1 Awaiting requested review from 1st1
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@ZeroIntensity ZeroIntensity Awaiting requested review from ZeroIntensity ZeroIntensity is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@pablogsal @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.