Skip to content

gh-160334: Accept special frames in collapsed profiling test - #161515

Open
raman118 wants to merge 2 commits into
python:mainfrom
raman118:gh-160334-collapsed-unreadable-frame
Open

raman118 wants to merge 2 commits into
python:mainfrom
raman118:gh-160334-collapsed-unreadable-frame

Conversation

@raman118

@raman118 raman118 commented Nov 6, 2026

Copy link
Copy Markdown

Fixes gh-160334.

Collapsed profiling output uses bare special-frame names such as <GC> and <unreadable frame> when no file or line information is available. Update the integration test to accept that established format instead of requiring every stack part to contain a colon.

The current assertion fails deterministically for a collector fed an unreadable frame; the focused test and the full sampling-profiler integration module pass with this change.

Tests:

  • PCbuild\\build.bat -d -p x64 -M -q
  • PCbuild\\amd64\\python_d.exe -m test -v -m test_sampling_with_collapsed_export test_profiling.test_sampling_profiler.test_integration
  • PCbuild\\amd64\\python_d.exe -m test -v test_profiling.test_sampling_profiler.test_integration (21 passed, 1 skipped)
  • PCbuild\\amd64\\python_d.exe Tools\\patchcheck\\patchcheck.py

AI assistance was used to investigate the test failure and prepare this change. I reviewed the collector output and the test results before opening this PR.

@bedevere-app

bedevere-app Bot commented Nov 6, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_sampling_with_collapsed_export fails when the profiler records an unreadable frame

1 participant