8000 bpo-44590: Lazily allocate frame objects by markshannon · Pull Request #27077 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
79aeaf6
Turn specials array into struct and add 'lasti' to it.
markshannon Jun 21, 2021
3b6a4e8
Move stack-depth from frame object to specials struct.
markshannon Jun 22, 2021
6f0ba40
Rename 'specials' to 'frame' as it now includes most of the data for …
markshannon Jun 22, 2021
8543c27
Refactor, pushing PyFrame upward toward _PyEval_Vector.
markshannon Jun 22, 2021
423d403
Add pointer from stack frame to frame object and rename tstate.frame …
markshannon Jun 22, 2021
7bf6c30
More refactoring. Add tstate.frame for the top stack frame.
markshannon Jun 23, 2021
861a8d9
Convert use of PyFrameObject to _PyFrame.
markshannon Jun 23, 2021
35e793c
Replace most remaining uses frame object in the interpreter with stac…
markshannon Jun 24, 2021
192094e
Convert more uses of frameobject to frame.
markshannon Jun 24, 2021
3f601a7
Move f_state from frame object to frame.
markshannon Jun 29, 2021
bd95c32
Compute f_back when on thread stack, only filling in value when frame…
markshannon Jun 30, 2021
9961abc
Add NULL check
markshannon Jun 30, 2021
32af707
Get lazy f_back working (it still leaks).
markshannon Jul 2, 2021
ac7dbe8
Use frames not frameobjects in sys._getframe()
markshannon Jul 2, 2021
f33d291
NULL out frame->previous when leaving frame.
markshannon Jul 2, 2021
5c23a36
Frames now include nlocalspuls, so they have valid layout after code …
markshannon Jul 5, 2021
910e991
Move ownership of frame in generator from frame object ot generator o…
markshannon Jul 5, 2021
22e1c9b
Remove localsptr field from frame object.
markshannon Jul 6, 2021
f84a3f0
Add new _PyEval_EvalNoFrame function for evaluating frames directly.
markshannon Jul 6, 2021
1180a44
Allow for lazily created frames.
markshannon Jul 6, 2021
c76de89
Do not create frame objects for Python calls.
markshannon Jul 6, 2021
15aeef1
Don't create frame objects for generators.
markshannon Jul 6, 2021
1d2e1ce
Fix memory leak
markshannon Jul 7, 2021
1b19f8b
Merge branch 'main' into lazy-frame-updated
markshannon Jul 7, 2021
d619bae
Restore support for PEP 523.
markshannon Jul 8, 2021
d147d03
Streamline pushing and popping stack frames a bit.
markshannon Jul 9, 2021
25c6a71
Merge branch 'main' into lazy-frame
markshannon Jul 9, 2021
618b094
Add f_ prefix back to several frame fields to ease porting C code tha…
markshannon Jul 9, 2021
e5da338
Add NEWS
markshannon Jul 9, 2021
dda0b0c
Remove debugging artifact.
markshannon Jul 9, 2021
5ecc067
Make symbol private
markshannon Jul 9, 2021
3b65a0f
Fix use-after-free error.
markshannon Jul 9, 2021
596213d
Add some explanatory comments.
markshannon Jul 9, 2021
386275e
Remove debugging artifact.
markshannon Jul 9, 2021
596c041
Merge branch 'main' into lazy-frame
markshannon Jul 15, 2021
039bca7
Rename _PyFrame to InterpreterFrame.
markshannon Jul 15, 2021
2cad33b
Remove use-after-free in assert.
markshannon Jul 19, 2021
77cf187
Merge branch 'main' into lazy-frame
markshannon Jul 19, 2021
decf209
Make name of frame argument consistent across _PyEval_Vector, _PyEval…
markshannon Jul 19, 2021
666b618
Allow for old gdbs still using Python 2.
markshannon Jul 19, 2021
90ed5b6
Various small clarifications as suggested by Pablo.
markshannon Jul 21, 2021
593a348
Refactor interpreter frame code into its own file. Improve a few names.
markshannon Jul 21, 2021
b775f13
Tidy up assert.
markshannon Jul 21, 2021
e8476b2
Fix warning on Windows.
markshannon Jul 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add NEWS
  • Loading branch information
markshannon committed Jul 9, 2021
commit e5da338085a75f2b436eb62d4938938b0cc35e40
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
All necessary data for executing a Python function (local variables, stack,
etc) is now kept in a per-thread stack. Frame objects are lazily allocated
on demand. This increases performance by about 7% on the standard benchmark
suite. Introspection and debugging are unaffected as frame objects are
always available when needed. Patch by Mark Shannon.
0