Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-117122: Fix pystats after incremental GC changes#117123
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1384,8 +1384,11 @@ expand_region_transitively_reachable(PyGC_Head *container, PyGC_Head *gc, GCStat | ||
| static void | ||
| completed_cycle(GCState *gcstate) | ||
| { | ||
| #ifdef Py_DEBUG | ||
| PyGC_Head *not_visited = &gcstate->old[gcstate->visited_space^1].head; | ||
| assert(gc_list_is_empty(not_visited)); | ||
| #endif | ||
| gcstate->visited_space = flip_old_space(gcstate->visited_space); | ||
| if (gcstate->work_to_do > 0){ | ||
| gcstate->work_to_do = 0; | ||
| @@ -1421,7 +1424,7 @@ gc_collect_increment(PyThreadState *tstate, struct gc_collection_stats *stats) | ||
| gc_set_old_space(gc, gcstate->visited_space); | ||
| increment_size += expand_region_transitively_reachable(&increment, gc, gcstate); | ||
| } | ||
| GC_STAT_ADD(1, objects_queued, region_size); | ||
| GC_STAT_ADD(1, objects_queued, increment_size); | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know if this is correct, but Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure if this make sense anymore. Maybe just drop the "queued" stat? | ||
| PyGC_Head survivors; | ||
| gc_list_init(&survivors); | ||
| gc_collect_region(tstate, &increment, &survivors, UNTRACK_TUPLES, stats); | ||
| @@ -1807,10 +1810,10 @@ _PyGC_Collect(PyThreadState *tstate, int generation, _PyGC_Reason reason) | ||
| _PyErr_SetRaisedException(tstate, exc); | ||
| GC_STAT_ADD(generation, objects_collected, stats.collected); | ||
| #ifdef Py_STATS | ||
| if (_py_stats){ | ||
| if (_Py_stats){ | ||
| GC_STAT_ADD(generation, object_visits, | ||
| _py_stats->object_stats.object_visits); | ||
| _py_stats->object_stats.object_visits = 0; | ||
| _Py_stats->object_stats.object_visits); | ||
| _Py_stats->object_stats.object_visits = 0; | ||
| } | ||
| #endif | ||
| validate_old(gcstate); | ||
Uh oh!
There was an error while loading. Please reload this page.