summaryrefslogtreecommitdiffstats
path: root/Tools/scripts/summarize_stats.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-12-02 10:12:17 (GMT)
committerGitHub <noreply@github.com>2024-12-02 10:12:17 (GMT)
commita8dd821d5b25b42c0adeae6642e9b3f9228580f9 (patch)
treec6f62d9d50569a4dd7aae23db945fc21bfa82e4b /Tools/scripts/summarize_stats.py
parent2a373da7700cf928e0a5ce3998d19351a3565df4 (diff)
downloadcpython-a8dd821d5b25b42c0adeae6642e9b3f9228580f9.zip
cpython-a8dd821d5b25b42c0adeae6642e9b3f9228580f9.tar.gz
cpython-a8dd821d5b25b42c0adeae6642e9b3f9228580f9.tar.bz2
GH-126491: GC: Mark objects reachable from roots before doing cycle collection (GH-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.
Diffstat (limited to 'Tools/scripts/summarize_stats.py')
-rw-r--r--Tools/scripts/summarize_stats.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Tools/scripts/summarize_stats.py b/Tools/scripts/summarize_stats.py
index abfdea7..bc7ccfe 100644
--- a/Tools/scripts/summarize_stats.py
+++ b/Tools/scripts/summarize_stats.py
@@ -1118,6 +1118,8 @@ def gc_stats_section() -> Section:
Count(gen["collections"]),
Count(gen["objects collected"]),
Count(gen["object visits"]),
+ Count(gen["objects reachable from roots"]),
+ Count(gen["objects not reachable from roots"]),
)
for (i, gen) in enumerate(gc_stats)
]
@@ -1127,7 +1129,8 @@ def gc_stats_section() -> Section:
"GC collections and effectiveness",
[
Table(
- ("Generation:", "Collections:", "Objects collected:", "Object visits:"),
+ ("Generation:", "Collections:", "Objects collected:", "Object visits:",
+ "Reachable from roots:", "Not reachable from roots:"),
calc_gc_stats,
)
],