summaryrefslogtreecommitdiffstats
path: root/Include/pystats.h
Commit message (Collapse)AuthorAgeFilesLines
* gh-108753: Enhance pystats (#108754)Victor Stinner2023-09-061-111/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Statistics gathering is now off by default. Use the "-X pystats" command line option or set the new PYTHONSTATS environment variable to 1 to turn statistics gathering on at Python startup. Statistics are no longer dumped at exit if statistics gathering was off or statistics have been cleared. Changes: * Add PYTHONSTATS environment variable. * sys._stats_dump() now returns False if statistics are not dumped because they are all equal to zero. * Add PyConfig._pystats member. * Add tests on sys functions and on setting PyConfig._pystats to 1. * Add Include/cpython/pystats.h and Include/internal/pycore_pystats.h header files. * Rename '_py_stats' variable to '_Py_stats'. * Exclude Include/cpython/pystats.h from the Py_LIMITED_API. * Move pystats.h include from object.h to Python.h. * Add _Py_StatsOn() and _Py_StatsOff() functions. Remove '_py_stats_struct' variable from the API: make it static in specialize.c. * Document API in Include/pystats.h and Include/cpython/pystats.h. * Complete pystats documentation in Doc/using/configure.rst. * Don't write "all zeros" stats: if _stats_off() and _stats_clear() or _stats_dump() were called. * _PyEval_Fini() now always call _Py_PrintSpecializationStats() which does nothing if stats are all zeros. Co-authored-by: Michael Droettboom <mdboom@gmail.com>
* GH-106485: Dematerialize instance dictionaries when possible (GH-106539)Brandt Bucher2023-08-091-0/+1
|
* Add some GC stats to Py_STATS (GH-107581)Mark Shannon2023-08-041-0/+9
|
* gh-104584: Baby steps towards generating and executing traces (#105924)Guido van Rossum2023-06-271-0/+3
| | | | | Added a new, experimental, tracing optimizer and interpreter (a.k.a. "tier 2"). This currently pessimizes, so don't use yet -- this is infrastructure so we can experiment with optimizing passes. To enable it, pass ``-Xuops`` or set ``PYTHONUOPS=1``. To get debug output, set ``PYTHONUOPSDEBUG=N`` where ``N`` is a debug level (0-4, where 0 is no debug output and 4 is excessively verbose). All of this code is likely to change dramatically before the 3.13 feature freeze. But this is a first step.
* GH-104584: Plugin optimizer API (GH-105100)Mark Shannon2023-06-021-0/+1
|
* Remove useless symbol in pystats.h (#101864)Stepfen Shawn2023-04-091-2/+0
|
* Better stats for `LOAD_ATTR` and `STORE_ATTR` (GH-100295)Mark Shannon2022-12-161-1/+1
| | | | | * Don't attempt to specialize for LOAD_ATTR on instance if class has attribute * Improvement to LOAD_ATTR and STORE_ATTR specialization stats.
* Move stats for the method cache into the `Py_STAT` machinery (GH-100255)Mark Shannon2022-12-151-0/+7
|
* GH-93841: Allow stats to be turned on and off, cleared and dumped at ↵Mark Shannon2022-06-211-5/+8
| | | | runtime. (GH-93843)
* GH-90230: Add stats to breakdown the origin of calls to `PyEval_EvalFrame` ↵Mark Shannon2022-05-271-0/+15
| | | | (GH-93284)
* Split refcount stats into 'interpreter' and 'non-interpreter' (GH-92919)Mark Shannon2022-05-181-0/+10
|
* Improve object stats (#92845)Mark Shannon2022-05-161-0/+77
* Add incref/decref stats * Show ratios for allocation in summary