
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2014-12-11 21:09 byserhiy.storchaka, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| show_alloc_counts.patch | serhiy.storchaka,2015-05-12 13:49 | review | ||
| Messages (6) | |||
|---|---|---|---|
| msg232495 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2014-12-11 21:09 | |
When Python is compiled with some defined macros (e.g. COUNT_ALLOCS) it prints additional debugging output at shutdown. This additional output can cause tests failure (seeissue19527). It would be good if Python will silent by default and produce debugging output only if special command line option or environment variable is set.Debugging output switched by Py_REF_DEBUG is now enabled only when "-X showrefcount" is specified (issue17323). | |||
| msg232538 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2014-12-12 12:29 | |
Also this debug output should be printed on stderr, not stdout. | |||
| msg232539 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2014-12-12 12:30 | |
> Debugging output switched by Py_REF_DEBUG is now enabled only when "-X showrefcount" is specified (issue17323).Yes, I like the idea of doing that for other debug options. | |||
| msg232553 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2014-12-12 14:56 | |
Here is (conceivably incomplete) list of debugging and tracing output (but not error reporting) from C code.Controlled output.Import and shutdown details -- controlled by the -v flag.Parser tracing -- controlled by the -d flag.If Py_REF_DEBUG is defined -- controlled by the -X showrefcount flag.If PYMALLOC_DEBUG is defined -- controlled by the PYTHONMALLOCSTATS environment variable.If Py_TRACE_REFS is defined -- controlled by the PYTHONDUMPREFS environment variable.Garbage collecting details -- controlled by gc.set_debug().If LLTRACE is defined -- controlled by the __ltrace__ global variable.Uncomtrolled output.To stderr:In PyType_ClearCache (Objects/typeobject.c) if MCACHE_STATS is defined.Lists allocations if SHOW_ALLOC_COUNT is defined.Tuples allocations if SHOW_TRACK_COUNT is defined.Interned strings statistics if __INSURE__ is defined.InPython/ceval.c if WITH_TSC is defined.In _PyHash_Fini if Py_HASH_STATS is defined.To stdout:InModules/_ctypes/malloc_closure.c if MALLOC_CLOSURE_DEBUG is defined.Regex matching trace inModules/_sre.c if VERBOSE is defined.Statistics inModules/hashtable.c if Py_DEBUG is defined.Allocation counts if COUNT_ALLOCS is defined.There is also dead code inParser/parsetok.c,Parser/tokenizer.c,Python/pyarena.c,Python/compile.c,Python/formatter_unicode.c,Modules/_elementtree.c,Modules/_tkinter.c,Objects/unicodeobject.c. | |||
| msg242968 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2015-05-12 13:49 | |
Proposed patch adds the "-X showalloccount" option, that turn on the output of allocated objects counts if COUNT_ALLOCS, SHOW_ALLOC_COUNT, or SHOW_TRACK_COUNT are defined. The output of COUNT_ALLOCS is now written to stderr. | |||
| msg269771 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-07-03 18:04 | |
New changesetcd911e06bf6c by Serhiy Storchaka in branch 'default':Issue#23034: The output of a special Python build with defined COUNT_ALLOCS,https://hg.python.org/cpython/rev/cd911e06bf6c | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:11 | admin | set | github: 67223 |
| 2016-07-04 16:29:27 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2016-07-03 18:04:22 | python-dev | set | nosy: +python-dev messages: +msg269771 |
| 2016-06-21 20:01:54 | serhiy.storchaka | set | assignee:serhiy.storchaka versions: + Python 3.6, - Python 3.5 |
| 2015-05-12 13:49:57 | serhiy.storchaka | set | files: +show_alloc_counts.patch keywords: +patch messages: +msg242968 stage: patch review |
| 2014-12-13 17:47:36 | serhiy.storchaka | link | issue19527 dependencies |
| 2014-12-12 14:56:25 | serhiy.storchaka | set | messages: +msg232553 |
| 2014-12-12 12:30:33 | vstinner | set | nosy: +vstinner messages: +msg232539 |
| 2014-12-12 12:29:32 | pitrou | set | nosy: +pitrou messages: +msg232538 |
| 2014-12-11 21:09:33 | serhiy.storchaka | create | |