Mark Shannon
411b169281
GH-103082: Implementation of PEP 669: Low Impact Monitoring for CPython (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
2023-04-12 12:04:55 +01:00
Brandt Bucher
b4978ff872
GH-88691: Shrink the CALL caches (GH-103230)
2023-04-05 14:15:49 -07:00
Brandt Bucher
121057aa36
GH-89987: Shrink the BINARY_SUBSCR caches (GH-103022)
2023-03-29 15:53:30 -07:00
Brandt Bucher
0444ae2487
GH-100982: Break up COMPARE_AND_BRANCH (GH-102801)
2023-03-23 15:25:09 -07:00
Mark Shannon
7559f5fda9
GH-101291: Rearrange the size bits in PyLongObject (GH-102464)
...
* Eliminate all remaining uses of Py_SIZE and Py_SET_SIZE on PyLongObject, adding asserts.
* Change layout of size/sign bits in longobject to support future addition of immortal ints and tagged medium ints.
* Add functions to hide some internals of long object, and for setting sign and digit count.
* Replace uses of IS_MEDIUM_VALUE macro with _PyLong_IsCompact().
2023-03-22 14:49:51 +00:00
Brandt Bucher
08b67fb34f
GH-90997: Shrink the LOAD_GLOBAL caches ( #102569 )
2023-03-10 17:01:16 -08:00
Eric Snow
5e5acd291f
gh-100227: Move next_keys_version to PyInterpreterState (gh-102335)
...
https://github.com/python/cpython/issues/100227
2023-03-08 18:04:16 -07:00
Mark Shannon
7c106a443f
GH-100982: Restrict `FOR_ITER_RANGE` to a single instruction to allow instrumentation. (GH-101985)
2023-02-22 11:11:57 +00:00
Steve Dower
a99eb5cd99
gh-101907: Stop using `_Py_OPCODE` and `_Py_OPARG` macros (GH-101912)
...
* gh-101907: Removes use of non-standard C++ extension from Include/cpython/code.h
* Make cases_generator correct on Windows
2023-02-20 14:56:48 +00:00
Mark Shannon
160f2fe2b9
GH-87849: Simplify stack effect of SEND and specialize it for generators and coroutines. (GH-101788)
2023-02-13 11:24:55 +00:00
Brandt Bucher
76efcb4093
GH-100288: Skip extra work when failing to specialize LOAD_ATTR (GH-101354)
2023-01-31 13:28:32 -08:00
Mark Shannon
c1b1f51cd1
GH-101291: Refactor the `PyLongObject` struct into object header and PyLongValue struct. (GH-101292)
2023-01-30 10:03:04 +00:00
Irit Katriel
e9ccfe4a63
gh-100712: make it possible to disable specialization (for debugging) ( #100713 )
2023-01-19 18:14:55 +00:00
Mark Shannon
7b14c2ef19
GH-100982: Add `COMPARE_AND_BRANCH` instruction (GH-100983)
2023-01-16 12:35:21 +00:00
Mark Shannon
6e4e14d98f
GH-100923: Embed jump mask in `COMPARE_OP` oparg (GH-100924)
2023-01-11 20:40:43 +00:00
Mark Shannon
f20c553a45
GH-100288: Remove LOAD_ATTR_METHOD_WITH_DICT instruction. (GH-100753)
2023-01-05 12:20:09 +00:00
Ken Jin
36d358348d
Revert "gh-100288: Specialise LOAD_ATTR_METHOD for managed dictionaries (GH-100289)" ( #100468 )
...
This reverts commit c3c7848a48
.
2022-12-24 01:48:43 +08:00
Ken Jin
c3c7848a48
gh-100288: Specialise LOAD_ATTR_METHOD for managed dictionaries (GH-100289)
2022-12-24 00:26:42 +08:00
Irit Katriel
2659036c75
GH-100459: fix copy-paste errors in specialization stats (GH-100460)
2022-12-23 14:42:24 +00:00
penguin_wwy
a02161286a
GH-99770: Make the correct call specialization fail kind show up in the stats (GH-99771)
2022-12-22 12:44:59 +00:00
Dennis Sweeney
c18d831188
gh-100188: Reduce misses in BINARY_SUBSCR_(LIST/TUPLE)_INT ( #100189 )
...
Don't specialize if the index is negative.
2022-12-20 15:46:16 -05:00
Brandt Bucher
9076455d1b
GH-90043: Handle NaNs in COMPARE_OP_FLOAT_JUMP (GH-100278)
2022-12-16 10:18:31 -08:00
Mark Shannon
d4052d835b
Improve stats presentation for calls. (GH-100274)
2022-12-16 15:43:04 +00:00
Mark Shannon
289c1126dd
Better stats for `LOAD_ATTR` and `STORE_ATTR` (GH-100295)
...
* Don't attempt to specialize for LOAD_ATTR on instance if class has attribute
* Improvement to LOAD_ATTR and STORE_ATTR specialization stats.
2022-12-16 15:41:23 +00:00
Mark Shannon
48e352a241
Move stats for the method cache into the `Py_STAT` machinery (GH-100255)
2022-12-15 09:45:03 +00:00
Carl Meyer
bdd86741be
GH-100222: fix typo _py_set_opocde -> _py_set_opcode (GH-100259)
...
Typo introduced in #100223 .
Automerge-Triggered-By: GH:brandtbucher
2022-12-14 16:39:00 -08:00
Mark Shannon
5693f45b19
Assorted minor fixes for specialization stats. (GH-100219)
2022-12-14 15:50:02 +00:00
Mark Shannon
6997e77bdf
GH-100222: Redefine _Py_CODEUNIT as a union to clarify structure of code unit. (GH-100223)
2022-12-14 11:12:53 +00:00
Michael Droettboom
1583c6e326
GH-100143: Improve collecting pystats for parts of runs (GH-100144)
...
* pystats off by default
* Add -Xpystats flag
* Always dump pystats, even if turned off
2022-12-12 14:50:43 +00:00
Ken Jin
748c6c0921
GH-100110: Specialize FOR_ITER for tuples (GH-100109)
...
* Specialize FOR_ITER for tuples
2022-12-09 10:27:01 +00:00
Brandt Bucher
b629fdd88a
GH-99298: Clean up attribute specializations (GH-99398)
2022-11-17 15:09:18 -08:00
Brandt Bucher
8555dee5ae
GH-98686: Get rid of BINARY_OP_GENERIC and COMPARE_OP_GENERIC (GH-99399)
2022-11-17 11:36:57 -08:00
Brandt Bucher
9d69284169
GH-99257: Check the owner's type when specializing slots (GH-99258)
2022-11-10 11:50:34 +00:00
Brandt Bucher
c7f5708714
GH-98686: Get rid of "adaptive" and "quick" instructions (GH-99182)
2022-11-09 10:50:09 -08:00
Mark Shannon
4a1c58d504
GH-96793: Specialize FOR_ITER for generators. (GH-98772)
2022-11-07 14:49:51 +00:00
Brandt Bucher
276d77724f
GH-98686: Quicken everything (GH-98687)
2022-11-02 10:42:57 -07:00
Mark Shannon
22863df7ca
GH-96793: Change `FOR_ITER` to not pop the iterator on exhaustion. (GH-96801)
...
Change FOR_ITER to have the same stack effect regardless of whether it branches or not.
Performance is unchanged as FOR_ITER (and specialized forms jump over the cleanup code).
2022-10-27 11:55:03 +01:00
adphrost
a41ed975e8
GH-91049: Introduce set vectorcall field API for PyFunctionObject (GH-92257)
...
Co-authored-by: Andrew Frost <adfrost@fb.com>
Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
2022-09-15 16:42:37 +01:00
Brandt Bucher
b4954b1a9e
GH-90230: Fix warnings and failures with --enable-pystats (GH-96622)
2022-09-09 14:42:29 -07:00
Brandt Bucher
cd0ff9bd14
GH-93911: Fix `LOAD_ATTR_PROPERTY` caches (GH-96519)
2022-09-06 12:11:38 +01:00
Irit Katriel
4c72517cad
gh-93554: Conditional jump opcodes only jump forward (GH-96318)
2022-09-01 21:36:47 +01:00
Matthias Görgens
4a6fa89465
Remove dead code in _PyDict_GetItemHint and rename to _PyDict_LookupIndex (GH-95948)
2022-08-18 10:19:21 +01:00
Ken Jin
7276ca25f5
GH-93911: Specialize `LOAD_ATTR` for custom `__getattribute__` (GH-93988)
2022-08-17 12:37:07 +01:00
Mark Shannon
de388c0a7b
GH-95245: Store object values and dict pointers in single tagged pointer. (GH-95278)
2022-08-01 14:34:54 +01:00
Brandt Bucher
e402b26b7f
GH-95113: Don't use EXTENDED_ARG_QUICK in unquickened code (GH-95121)
2022-07-22 11:04:20 -07:00
Brandt Bucher
daf68ba92f
GH-94822: Don't specialize when metaclasses are involved (GH-94892)
2022-07-18 10:10:22 -07:00
Mark Shannon
c0453a40fa
GH-94163: Add BINARY_SLICE and STORE_SLICE instructions. (GH-94168)
2022-06-27 12:24:23 +01:00
Mark Shannon
6f8875eba3
GH-93841: Allow stats to be turned on and off, cleared and dumped at runtime. (GH-93843)
2022-06-21 15:40:54 +01:00
Dennis Sweeney
5fcfdd87c9
GH-91432: Specialize FOR_ITER (GH-91713)
...
* Adds FOR_ITER_LIST and FOR_ITER_RANGE specializations.
* Adds _PyLong_AssignValue() internal function to avoid temporary boxing of ints.
2022-06-21 11:19:26 +01:00
Christian Heimes
77c839c98f
gh-94021: Address unreachable code warning in specialize code (GH-94022)
2022-06-20 23:34:11 -07:00