Skip to content

GH-108362: Incremental GC implementation #108038

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

Merged
merged 17 commits into from
Feb 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix stats generation
  • Loading branch information
markshannon committed Jan 7, 2024
commit 14e3135b03299ff16301eeae9861a2a10192da00
8 changes: 3 additions & 5 deletions Python/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,6 @@ gc_collect_young(PyThreadState *tstate,
for (gc = GC_NEXT(young); gc != young; gc = GC_NEXT(gc)) {
count++;
}
GC_STAT_ADD(0, objects_queued, count);
}
#endif

Expand Down Expand Up @@ -1410,7 +1409,6 @@ gc_collect_increment(PyThreadState *tstate, struct gc_collection_stats *stats)
region_size += expand_region_transitively_reachable(&increment, gc, gcstate);
}
assert(region_size = gc_list_size(&increment));
GC_STAT_ADD(1, objects_queued, region_size);
PyGC_Head survivors;
gc_list_init(&survivors);
gc_collect_region(tstate, &increment, &survivors, UNTRACK_TUPLES, stats);
Expand Down Expand Up @@ -1792,10 +1790,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);
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy