@@ -143,6 +143,7 @@ static PyStructSequence_Field GCStatsInfo_fields[] = {
143143 {"collected" , "Total number of collected objects" },
144144 {"uncollectable" , "Total number of uncollectable objects" },
145145 {"candidates" , "Total objects considered and traversed" },
146+ {"heap_size" , "Number of live objects" },
146147 {"duration" , "Total collection time, in seconds" },
147148 {NULL }
148149};
@@ -151,7 +152,7 @@ PyStructSequence_Desc GCStatsInfo_desc = {
151152 "_remote_debugging.GCStatsInfo" ,
152153 "Information about a garbage collector stats sample" ,
153154 GCStatsInfo_fields ,
154- 9
155+ 10
155156};
156157
157158/* ============================================================================
@@ -1225,6 +1226,7 @@ Returns a list of GCStatsInfo objects with GC statistics data.
12251226 - collected: Total number of collected objects.
12261227 - uncollectable: Total number of uncollectable objects.
12271228 - candidates: Total objects considered and traversed.
1229+ - heap_size: number of live objects.
12281230 - duration: Total collection time, in seconds.
12291231
12301232Raises:
@@ -1235,7 +1237,7 @@ Returns a list of GCStatsInfo objects with GC statistics data.
12351237static PyObject *
12361238_remote_debugging_GCMonitor_get_gc_stats_impl (GCMonitorObject * self ,
12371239 int all_interpreters )
1238- /*[clinic end generated code: output=f73f365725224f7a input=09e647719c65f9e4 ]*/
1240+ /*[clinic end generated code: output=f73f365725224f7a input=12f7c1a288cf2741 ]*/
12391241{
12401242 RemoteDebuggingState * st = RemoteDebugging_GetStateFromType (Py_TYPE (self ));
12411243 return get_gc_stats (& self -> offsets , all_interpreters , st -> GCStatsInfo_Type );
0 commit comments