[New-bugs-announce] [issue4687] GC stats not accurate because of debug overhead

Antoine Pitrou report at bugs.python.org
Thu Dec 18 00:06:19 CET 2008


New submission from Antoine Pitrou <pitrou at free.fr>:

With gc.DEBUG_STATS, each GC collection displays the elapsed time.
Unfortunately, this elapsed time includes the debug overhead itself,
most notable the calls to gc_list_size() which can be quite expensive
with lots of objects in the older generation. Consequently, collections
of generation 0 will incorrectly appear as very expensive, while in
non-debug mode they are very cheap.

Here is a patch to get a more useful output, by not including the time
taken in gc_list_size().

----------
components: Extension Modules
files: gc_stats_fix.patch
keywords: patch
messages: 77993
nosy: pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: GC stats not accurate because of debug overhead
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file12385/gc_stats_fix.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4687>
_______________________________________


More information about the New-bugs-announce mailing list