Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-126491: GC: Mark objects reachable from roots before doing cycle collection#127110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
markshannon merged 18 commits intopython:mainfromfaster-cpython:mark-first-2
Dec 2, 2024

Conversation

markshannon
Copy link
Member

@markshannonmarkshannon commentedNov 21, 2024
edited by bedevere-appbot
Loading

This is an updated version of#126502

It differs as follows:

  • The removal of lazy dict untracking has already been merged, so isn't present
  • More care is taken to ensure the consistency of the spaces
  • Some adjustments to the "work to do" calculation

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@markshannon for commit698abb3 🤖

If you want to schedule another build, you need to add the🔨 test-with-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelNov 21, 2024
@markshannon
Copy link
MemberAuthor

!buildbot Android

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@markshannon for commit6d8a0d4 🤖

The command will test the builders whose names match following regular expression:Android

The builders matched are:

  • AMD64 Android PR
  • aarch64 Android PR

@markshannon
Copy link
MemberAuthor

!buildbot Android

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@markshannon for commitd9632c6 🤖

The command will test the builders whose names match following regular expression:Android

The builders matched are:

  • AMD64 Android PR
  • aarch64 Android PR

@markshannon
Copy link
MemberAuthor

!buildbot Android

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@markshannon for commit0702959 🤖

The command will test the builders whose names match following regular expression:Android

The builders matched are:

  • AMD64 Android PR
  • aarch64 Android PR

@markshannon
Copy link
MemberAuthor

!buildbot iOS

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@markshannon for commit0702959 🤖

The command will test the builders whose names match following regular expression:iOS

The builders matched are:

  • iOS ARM64 Simulator PR

@markshannon
Copy link
MemberAuthor

FTR:
I needed to increase the threshold from 25k to 27k when intest_gc.test_incremental_gc_handles_fast_cycle_creation for Android and iOS to pass.
To be sure that the GC can keep up, I increased the number of iterations from 20k to 100k. The tests still passed. The number of iterations has been reduced to 20k again, so the test doesn't take too long.

@markshannon
Copy link
MemberAuthor

!buildbot Android
!buildbot iOS

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@markshannon for commiteaea41e 🤖

The command will test the builders whose names match following regular expression:Android

The builders matched are:

  • AMD64 Android PR
  • aarch64 Android PR

@markshannon
Copy link
MemberAuthor

!buildbot iOS

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@markshannon for commiteaea41e 🤖

The command will test the builders whose names match following regular expression:iOS

The builders matched are:

  • iOS ARM64 Simulator PR

@markshannon
Copy link
MemberAuthor

!buildbot iOS

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@markshannon for commit79ab26c 🤖

The command will test the builders whose names match following regular expression:iOS

The builders matched are:

  • iOS ARM64 Simulator PR

@markshannon
Copy link
MemberAuthor

!buildbot Android

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@markshannon for commit79ab26c 🤖

The command will test the builders whose names match following regular expression:Android

The builders matched are:

  • AMD64 Android PR
  • aarch64 Android PR

@markshannonmarkshannon added the 🔨 test-with-refleak-buildbotsTest PR w/ refleak buildbots; report in status section labelNov 22, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@markshannon for commit79ab26c 🤖

If you want to schedule another build, you need to add the🔨 test-with-refleak-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-refleak-buildbotsTest PR w/ refleak buildbots; report in status section labelNov 22, 2024
@markshannon
Copy link
MemberAuthor

Performance shows a ~3% speedup. The results appear noisier than usual, so might be worth repeating, but they are roughly inline with results for earlier versions of this PR.

@@ -329,6 +334,7 @@ struct _gc_runtime_state {
Py_ssize_t work_to_do;
/* Which of the old spaces is the visited space */
int visited_space;
int phase;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Maybe this can be rolled into thecollecting field (like 0 for not collecting, 1 for MARK, 2 for COLLECT)?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Perhaps, but not very cleanly.
The phase depends on where we are in a full heap scavenge. The collecting flag will flip many times during a scavenge, for incremental collections.

@markshannon
Copy link
MemberAuthor

markshannon commentedDec 2, 2024
edited
Loading

All the buildbots that failed were failing on main due to unrelated issues (the Windows 10 bot may have been fixed since)

@markshannonmarkshannon merged commita8dd821 intopython:mainDec 2, 2024
165 of 176 checks passed
mpage added a commit to mpage/cpython that referenced this pull requestDec 3, 2024
mpage added a commit to mpage/cpython that referenced this pull requestDec 4, 2024
mpage added a commit to mpage/cpython that referenced this pull requestDec 4, 2024
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull requestJan 8, 2025
…ycle collection (pythonGH-127110)* Mark almost all reachable objects before doing collection phase* Add stats for objects marked* Visit new frames before each increment* Update docs* Clearer calculation of work to do.
@markshannonmarkshannon deleted the mark-first-2 branchJanuary 10, 2025 16:23
ebonnal pushed a commit to ebonnal/cpython that referenced this pull requestJan 12, 2025
…ycle collection (pythonGH-127110)* Mark almost all reachable objects before doing collection phase* Add stats for objects marked* Visit new frames before each increment* Update docs* Clearer calculation of work to do.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@iritkatrieliritkatrieliritkatriel approved these changes

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@markshannon@bedevere-bot@iritkatriel

[8]ページ先頭

©2009-2025 Movatter.jp