[issue39489] Remove COUNT_ALLOCS special build

2020-02-03 Thread STINNER Victor
STINNER Victor added the comment: Done, I remove COUNT_ALLOCS macro and all associated code. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue39489] Remove COUNT_ALLOCS special build

2020-02-03 Thread STINNER Victor
STINNER Victor added the comment: New changeset c6e5c1123bac6cbb4c85265155af5349dcea522e by Victor Stinner in branch 'master': bpo-39489: Remove COUNT_ALLOCS special build (GH-18259) https://github.com/python/cpython/commit/c6e5c1123bac6cbb4c85265155af5349dcea522e --

[issue39489] Remove COUNT_ALLOCS special build

2020-01-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was many years ago, and I used it to get some statistics about using Python objects of some types. But it did not work as I wanted for cached integers etc. In any case I can patch Python again if I need such information. Seems Fedora was the main user

[issue39489] Remove COUNT_ALLOCS special build

2020-01-30 Thread STINNER Victor
STINNER Victor added the comment: I started a thread on the python-dev mailing list: https://mail.python.org/archives/list/python-...@python.org/thread/YEY2TZIWC6HGMM5Y3QKWKMEBT5Y5C324/ Serhiy: > I used COUNT_ALLOCS for curiosity. But I needed slightly different > information, so in any case

[issue39489] Remove COUNT_ALLOCS special build

2020-01-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I used COUNT_ALLOCS for curiosity. But I needed slightly different information, so in any case I patched the code. AFAIK COUNT_ALLOCS is used in some large projects (maybe Fedora). It was already discussed somewhere on the tracker, but I have no a link.

[issue39489] Remove COUNT_ALLOCS special build

2020-01-29 Thread STINNER Victor
STINNER Victor added the comment: I looked for "Python COUNT_ALLOCS" on the Internet. This special build seems to be very badly documented on the Internet. Outside Python own documentation, I found almost zero reference to it. IMHO it's basically unused. (*) bpo-33058: Two years ago

[issue39489] Remove COUNT_ALLOCS special build

2020-01-29 Thread STINNER Victor
STINNER Victor added the comment: The COUNT_ALLOCS feature itself is quite old. It was added 27 years ago (in 1993): commit a9c3c22c33762699b362e7598268442fd2df9eb6 Author: Sjoerd Mullender Date: Mon Oct 11 12:54:31 1993 + * Extended X interface: pixmap objects, colormap objects

[issue39489] Remove COUNT_ALLOCS special build

2020-01-29 Thread STINNER Victor
STINNER Victor added the comment: Python 2.7.15 got a PYTHONSHOWALLOCCOUNT environment variable to dump statistics on types at exit, if Python is built with COUNT_ALLOCS macro defined. Example with Fedora python2.7-debug (package python2-debug-2.7.17-1.fc31.x86_64): $

[issue39489] Remove COUNT_ALLOCS special build

2020-01-29 Thread STINNER Victor
STINNER Victor added the comment: As far as I known, the Fedora package of Python is the most known user of COUNT_ALLOCS special build, and maybe the only user. The Fedora package of Python 2.7 builds two binaries: * python2.7: release mode, optimized * python2.7-debug: debug mode, not

[issue39489] Remove COUNT_ALLOCS special build

2020-01-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: I have never used this feature either. -- nosy: +rhettinger ___ Python tracker ___ ___

[issue39489] Remove COUNT_ALLOCS special build

2020-01-29 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +17634 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18259 ___ Python tracker ___

[issue39489] Remove COUNT_ALLOCS special build

2020-01-29 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-19527 which discussed COUNT_ALLOCS in 2013. COUNT_ALLOCS build is documented in Fedora "DebugPythonStacks" wiki page: https://fedoraproject.org/wiki/Features/DebugPythonStacks#Verify_COUNT_ALLOCS --

[issue39489] Remove COUNT_ALLOCS special build

2020-01-29 Thread STINNER Victor
New submission from STINNER Victor : Python has a COUNT_ALLOCS special build which adds sys.getcounts() function and shows statistics on Python types at exit if -X showalloccount command line option is used. I never ever used this feature and I don't know anyone using it. But "#ifdef