Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | GH-114806. Don't specialize calls to classes with metaclasses. (GH-114870) | Mark Shannon | 2024-02-01 | 1 | -0/+5 |
| | |||||
* | gh-114312: Collect stats for unlikely events (GH-114493) | Michael Droettboom | 2024-01-25 | 1 | -0/+11 |
| | |||||
* | gh-89811: Check for valid tp_version_tag in specializer (GH-113558) | Peter Lazorchak | 2024-01-11 | 1 | -1/+29 |
| | |||||
* | GH-113486: Do not emit spurious PY_UNWIND events for optimized calls to ↵ | Mark Shannon | 2024-01-05 | 1 | -1/+1 |
| | | | | classes. (GH-113680) | ||||
* | GH-111485: Generate instruction and uop metadata (GH-113287) | Mark Shannon | 2023-12-20 | 1 | -0/+1 |
| | |||||
* | gh-112320: Implement on-trace confidence tracking for branches (#112321) | Guido van Rossum | 2023-12-12 | 1 | -0/+1 |
| | | | We track the confidence as a scaled int. | ||||
* | GH-111772: Specialize slot loads and stores for `_Py_T_OBJECT` (GH-111773) | Mark Shannon | 2023-11-06 | 1 | -3/+3 |
| | |||||
* | gh-109329: Count tier2 opcode misses (#110561) | Michael Droettboom | 2023-10-31 | 1 | -0/+3 |
| | | | This keeps a separate 'miss' counter for each micro-opcode, incremented whenever a guard uop takes a deoptimization side exit. | ||||
* | gh-110481: Implement biased reference counting (gh-110764) | Sam Gross | 2023-10-30 | 1 | -1/+1 |
| | |||||
* | gh-111354: define names for RESUME oparg values (#111365) | Irit Katriel | 2023-10-26 | 1 | -1/+2 |
| | |||||
* | gh-109094: replace frame->prev_instr by frame->instr_ptr (#109095) | Irit Katriel | 2023-10-26 | 1 | -2/+1 |
| | |||||
* | GH-111213: Fix a few broken stats (GH-111216) | Mark Shannon | 2023-10-26 | 1 | -1/+1 |
| | |||||
* | gh-109329: Add stat for "trace too short" (GH-110402) | Michael Droettboom | 2023-10-05 | 1 | -0/+1 |
| | |||||
* | GH-109329: Add tier 2 stats (GH-109913) | Michael Droettboom | 2023-10-04 | 1 | -4/+50 |
| | |||||
* | GH-105848: Replace KW_NAMES + CALL with LOAD_CONST + CALL_KW (GH-109300) | Brandt Bucher | 2023-09-13 | 1 | -56/+26 |
| | |||||
* | GH-109330: Dump and compare stats using opcode names, not numbers (GH-109335) | Michael Droettboom | 2023-09-12 | 1 | -8/+8 |
| | |||||
* | gh-109039: Branch prediction for Tier 2 interpreter (#109038) | Guido van Rossum | 2023-09-11 | 1 | -3/+17 |
| | | | | | | | | | | | This adds a 16-bit inline cache entry to the conditional branch instructions POP_JUMP_IF_{FALSE,TRUE,NONE,NOT_NONE} and their instrumented variants, which is used to keep track of the branch direction. Each time we encounter these instructions we shift the cache entry left by one and set the bottom bit to whether we jumped. Then when it's time to translate such a branch to Tier 2 uops, we use the bit count from the cache entry to decided whether to continue translating the "didn't jump" branch or the "jumped" branch. The counter is initialized to a pattern of alternating ones and zeros to avoid bias. The .pyc file magic number is updated. There's a new test, some fixes for existing tests, and a few miscellaneous cleanups. | ||||
* | gh-108753: _Py_PrintSpecializationStats() uses Py_hexdigits (#109040) | Victor Stinner | 2023-09-07 | 1 | -2/+2 |
| | |||||
* | gh-108753: Enhance pystats (#108754) | Victor Stinner | 2023-09-06 | 1 | -32/+66 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-108765: Cleanup #include in Python/*.c files (#108977) | Victor Stinner | 2023-09-06 | 1 | -3/+3 |
| | | | Mention one symbol imported by each #include. | ||||
* | gh-108488: Initialize JUMP_BACKWARD cache to 0, not 17 (#108591) | Guido van Rossum | 2023-08-29 | 1 | -1/+3 |
| | | | This mis-initialization caused the executor optimization to kick in sooner than intended. It also set the lower 4 bits of the counter to `1` -- those bits are supposed to be reserved (the actual counter is in the upper 12 bits). | ||||
* | gh-107265: Revert "Ensure _PyCode_Quicken does not handle ENTER_EXECUTOR" ↵ | Dong-hee Na | 2023-08-25 | 1 | -2/+0 |
| | | | | | | | (#108485) This reverts commit d6ac5c7b105fe57266bd71248e3ada41fedb5ba9. Reason: the assert we just added could be triggered (see issue). | ||||
* | gh-107265: Ensure _PyCode_Quicken does not handle ENTER_EXECUTOR (gh-108460) | Dong-hee Na | 2023-08-24 | 1 | -0/+2 |
| | |||||
* | gh-105481: remove regen-opcode. Generated _PyOpcode_Caches in regen-cases. ↵ | Irit Katriel | 2023-08-23 | 1 | -1/+4 |
| | | | | (#108367) | ||||
* | GH-106485: Dematerialize instance dictionaries when possible (GH-106539) | Brandt Bucher | 2023-08-09 | 1 | -5/+14 |
| | |||||
* | GH-105848: Simplify the arrangement of CALL's stack (GH-107788) | Brandt Bucher | 2023-08-09 | 1 | -0/+8 |
| | |||||
* | GH-107596: Specialize str[int] (GH-107597) | Brandt Bucher | 2023-08-08 | 1 | -11/+14 |
| | |||||
* | Add some GC stats to Py_STATS (GH-107581) | Mark Shannon | 2023-08-04 | 1 | -1/+17 |
| | |||||
* | gh-106869: Use new PyMemberDef constant names (#106871) | Victor Stinner | 2023-07-25 | 1 | -6/+6 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove '#include "structmember.h"'. * If needed, add <stddef.h> to get offsetof() function. * Update Parser/asdl_c.py to regenerate Python/Python-ast.c. * Replace: * T_SHORT => Py_T_SHORT * T_INT => Py_T_INT * T_LONG => Py_T_LONG * T_FLOAT => Py_T_FLOAT * T_DOUBLE => Py_T_DOUBLE * T_STRING => Py_T_STRING * T_OBJECT => _Py_T_OBJECT * T_CHAR => Py_T_CHAR * T_BYTE => Py_T_BYTE * T_UBYTE => Py_T_UBYTE * T_USHORT => Py_T_USHORT * T_UINT => Py_T_UINT * T_ULONG => Py_T_ULONG * T_STRING_INPLACE => Py_T_STRING_INPLACE * T_BOOL => Py_T_BOOL * T_OBJECT_EX => Py_T_OBJECT_EX * T_LONGLONG => Py_T_LONGLONG * T_ULONGLONG => Py_T_ULONGLONG * T_PYSSIZET => Py_T_PYSSIZET * T_NONE => _Py_T_NONE * READONLY => Py_READONLY * PY_AUDIT_READ => Py_AUDIT_READ * READ_RESTRICTED => Py_AUDIT_READ * PY_WRITE_RESTRICTED => _Py_WRITE_RESTRICTED * RESTRICTED => (READ_RESTRICTED | _Py_WRITE_RESTRICTED) | ||||
* | gh-106320: Move _PyMethodWrapper_Type to internal C API (#107064) | Victor Stinner | 2023-07-22 | 1 | -2/+2 |
| | |||||
* | GH-100288: Specialize LOAD_ATTR for simple class attributes. (#105990) | Mark Shannon | 2023-07-10 | 1 | -13/+22 |
| | | | * Add two more specializations of LOAD_ATTR. | ||||
* | gh-106320: Fix specialize.c compilation by including pycore_pylifecycle.h ↵ | Guido van Rossum | 2023-07-04 | 1 | -0/+1 |
| | | | | | (#106434) Compilation of Python/specialize.c was broken on macOS for me by gh-106400. | ||||
* | GH-106008: Make implicit boolean conversions explicit (GH-106003) | Brandt Bucher | 2023-06-29 | 1 | -3/+110 |
| | |||||
* | gh-104584: Baby steps towards generating and executing traces (#105924) | Guido van Rossum | 2023-06-27 | 1 | -0/+4 |
| | | | | | 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-91095: Specialize calls to normal Python classes. (GH-99331) | Mark Shannon | 2023-06-22 | 1 | -5/+94 |
| | |||||
* | GH-105840: Fix assertion failures when specializing calls with too many ↵ | Brandt Bucher | 2023-06-16 | 1 | -2/+2 |
| | | | | __defaults__ (GH-105847) | ||||
* | GH-105229: Remove remaining two-codeunit superinstructions (GH-105326) | Mark Shannon | 2023-06-08 | 1 | -10/+0 |
| | | | | * Remove LOAD_CONST__LOAD_FAST and LOAD_FAST__LOAD_CONST superinstructions. | ||||
* | GH-105229: Replace some superinstructions with single instruction ↵ | Mark Shannon | 2023-06-05 | 1 | -11/+1 |
| | | | | equivalent. (GH-105230) | ||||
* | GH-104405: Add missing PEP 523 checks (GH-104406) | Brandt Bucher | 2023-05-12 | 1 | -0/+22 |
| | |||||
* | gh-87729: improve hit rate of LOAD_SUPER_ATTR specialization (#104270) | Carl Meyer | 2023-05-11 | 1 | -28/+5 |
| | |||||
* | GH-102181: Improve specialization stats for SEND (GH-102182) | penguin_wwy | 2023-05-10 | 1 | -41/+45 |
| | |||||
* | gh-104184: fix building --with-pydebug --enable-pystats (#104217) | Carl Meyer | 2023-05-09 | 1 | -1/+1 |
| | |||||
* | GH-103082: Code cleanup in instrumentation code (#103474) | Mark Shannon | 2023-04-29 | 1 | -1/+1 |
| | |||||
* | gh-103978: avoid using 'class' as an identifier (#103979) | Carl Meyer | 2023-04-28 | 1 | -3/+3 |
| | |||||
* | gh-103879: Fix refleak in super specialization (#103882) | Jelle Zijlstra | 2023-04-26 | 1 | -0/+2 |
| | |||||
* | gh-87729: specialize LOAD_SUPER_ATTR_METHOD (#103809) | Carl Meyer | 2023-04-25 | 1 | -0/+55 |
| | |||||
* | GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython ↵ | Mark Shannon | 2023-04-12 | 1 | -2/+6 |
| | | | | | | | | | | (GH-103083) * The majority of the monitoring code is in instrumentation.c * The new instrumentation bytecodes are in bytecodes.c * legacy_tracing.c adapts the new API to the old sys.setrace and sys.setprofile APIs | ||||
* | GH-88691: Shrink the CALL caches (GH-103230) | Brandt Bucher | 2023-04-05 | 1 | -5/+0 |
| | |||||
* | GH-89987: Shrink the BINARY_SUBSCR caches (GH-103022) | Brandt Bucher | 2023-03-29 | 1 | -8/+8 |
| | |||||
* | GH-100982: Break up COMPARE_AND_BRANCH (GH-102801) | Brandt Bucher | 2023-03-23 | 1 | -60/+32 |
| |