diff options
author | Mark Shannon <mark@hotpy.org> | 2023-08-04 09:34:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-04 09:34:23 (GMT) |
commit | 2ba7c7f7b151ff56cf12bf3cab286981bb646c90 (patch) | |
tree | e89d562e9043fb9703a9b822de58a9bd4bedb1ac /Include/pystats.h | |
parent | fa45958450aa3489607daf9855ca0474a2a20878 (diff) | |
download | cpython-2ba7c7f7b151ff56cf12bf3cab286981bb646c90.zip cpython-2ba7c7f7b151ff56cf12bf3cab286981bb646c90.tar.gz cpython-2ba7c7f7b151ff56cf12bf3cab286981bb646c90.tar.bz2 |
Add some GC stats to Py_STATS (GH-107581)
Diffstat (limited to 'Include/pystats.h')
-rw-r--r-- | Include/pystats.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Include/pystats.h b/Include/pystats.h index 54c9b8d..e24aef5 100644 --- a/Include/pystats.h +++ b/Include/pystats.h @@ -74,12 +74,21 @@ typedef struct _object_stats { uint64_t optimization_traces_created; uint64_t optimization_traces_executed; uint64_t optimization_uops_executed; + /* Temporary value used during GC */ + uint64_t object_visits; } ObjectStats; +typedef struct _gc_stats { + uint64_t collections; + uint64_t object_visits; + uint64_t objects_collected; +} GCStats; + typedef struct _stats { OpcodeStats opcode_stats[256]; CallStats call_stats; ObjectStats object_stats; + GCStats *gc_stats; } PyStats; |