10000 GH-91048: Add utils for capturing async call stack for asyncio programs and enable profiling by 1st1 · Pull Request #124640 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-91048: Add utils for capturing async call stack for asyncio programs and enable profiling #124640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 88 commits into from
Jan 22, 2025
Merged
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
1b01a91
Add `f_generator` property to Python frame objects
1st1 Sep 24, 2024
0fc5511
Working implementation of `asyncio.capture_call_stack()`
1st1 Sep 25, 2024
1d20a51
Address Guido's comments
1st1 Sep 26, 2024
c8be18e
Add a comment for capture_call_stack()
1st1 Sep 26, 2024
abf2cb9
Add a couple more tests
1st1 Sep 26, 2024
20ceab7
Remove setter for C impl of Task._awaited_by
1st1 Sep 26, 2024
72d9321
Intoduce cr_task
1st1 Sep 26, 2024
c9475f6
Unbreak shield() and gather()
1st1 Sep 26, 2024
e1099e9
Add convinience fields to C Task/Future for profilers
1st1 Sep 26, 2024
817f88b
Fix ups
1st1 Sep 27, 2024
54386ac
Add basic docs
1st1 Sep 27, 2024
98434f0
Implement, test, and document asyncio.print_call_stack()
1st1 Sep 28, 2024
485c166
Reorder a few things
1st1 Sep 28, 2024
8802be7
Add a test to exercise asyncio stack traces in out-of-process profilers
pablogsal Sep 29, 2024
1ddc9cf
Refactor the section-generated code into an evil macro
pablogsal Sep 30, 2024
bc9beb8
Rename "capture_call_stack()" et al to "capture_call_graph()"
1st1 Oct 2, 2024
fd141d4
Add NEWS
1st1 Oct 2, 2024
2d72f24
Per mpage's suggestion: use traceback style formatring for frames
1st1 Oct 2, 2024
391defa
mpage feedback: fix typo
1st1 Oct 2, 2024
d6357fd
Per mpage suggestion: get rid of CoroutineCallGraphEntry
1st1 Oct 2, 2024
bb3b6df
Strip sloppy white space!
1st1 Oct 2, 2024
54c99ec
Fix sloppy set iteration!
1st1 Oct 2, 2024
c1a4f09
Fix a sloppy test!
1st1 Oct 2, 2024
027d522
Run 'make regen-all'
1st1 Oct 2, 2024
c2d5ec6
Add a what's new entry
1st1 Oct 2, 2024
08d09eb
Fix (hopefully) a compiler warning
1st1 Oct 2, 2024
fe3113b
Fix sloppy what's new!
1st1 Oct 2, 2024
18ec26d
Fix CI complaining about suspicious global in C
1st1 Oct 2, 2024
e4cc462
Add a test for depth=2
1st1 Oct 2, 2024
d5cdc36
Add critical sections for free threaded builds
pablogsal Oct 2, 2024
83606f2
Add more slopy tests
pablogsal Oct 2, 2024
5edac41
Apply suggestions from code review
1st1 Oct 16, 2024
8dc6d34
Apply suggestions from code review
1st1 Oct 16, 2024
30884ea
Update Modules/_asynciomodule.c
1st1 Oct 16, 2024
1317658
Update Modules/_asynciomodule.c
1st1 Oct 16, 2024
81b0a31
Use dataclasses instead of tuples for asyncio.stack
1st1 Oct 16, 2024
258ce3d
Fix sloppy whitespace!
1st1 Oct 16, 2024
b9ecefb
Remove critical sections for now
pablogsal Oct 16, 2024
b77dcb0
Eplain the weird macro
1st1 Oct 16, 2024
8867946
Fix test
pablogsal Oct 16, 2024
87d2524
Merge remote-tracking branch 'upstream/main' into stack
pablogsal Oct 16, 2024
b47bef1
Add a docs clarification
1st1 Oct 16, 2024
230b7ec
Fix typing in asyncio.stack
ambv Oct 16, 2024
b1d6158
Fix memory leak
pablogsal Oct 17, 2024
ac51364
Address comments from Kumar's review
ambv Oct 17, 2024
c7e59eb
Fix rare Mach-O linker bug when .bss is uninitialized data
ambv Oct 22, 2024
9eba5e1
Merge branch 'main' into pr-124640
ambv Oct 22, 2024
59121f6
you saw nothing, okay
ambv Oct 22, 2024
f8f48f0
Update Lib/asyncio/futures.py
1st1 Oct 23, 2024
74c5ad1
Remove unnecessary imports from tests
ambv Oct 30, 2024
067c043
Remove cr_task/gi_task
ambv Oct 31, 2024
9f04911
Fix refleaks
ambv Nov 13, 2024
0774805
Rename "asyncio.stack" to "asyncio.graph"
ambv Nov 13, 2024
3048493
Allow returning a string with `format_call_graph`
ambv Nov 13, 2024
1f42873
Add test for eager task factory support
ambv Nov 13, 2024
7799391
Merge branch 'main' into pr-124640
ambv Nov 13, 2024
03ed5c1
Make _asyncio_awaited_by a frozenset in the Python version as well pe…
ambv Nov 13, 2024
21f9ea9
Address picnixz' feedback
1st1 Nov 23, 2024
8a4 8000 3dfa
Blacken the C/Py test code by hand, by request from picnixz
1st1 Nov 23, 2024
b3fae68
More style fixes per picnixz' suggestions
1st1 Nov 23, 2024
d0aedf0
Address Kumar's latest comment
1st1 Nov 23, 2024
df0032a
diff cleanup
kumaraditya303 Nov 23, 2024
0ce241b
change dataclasses to use tuples
kumaraditya303 Nov 23, 2024
8f126f6
doc fixes
kumaraditya303 Nov 23, 2024
966d84e
remove reduntant headers include and add my name to whatsnew
kumaraditya303 Nov 23, 2024
f56468a
improve comment
kumaraditya303 Nov 23, 2024
404b88a
fix leave task
kumaraditya303 Nov 23, 2024
911fed8
fix external inspection on linux
kumaraditya303 Nov 23, 2024
ab511a4
minor format
kumaraditya303 Nov 23, 2024
c3c685a
try to fix docs build
kumaraditya303 Nov 23, 2024
785adeb
Update Doc/whatsnew/3.14.rst
kumaraditya303 Nov 23, 2024
a577328
Match indentation with _asynciomodule.c after ab511a4f67ffd88f7709c1b…
ambv Nov 23, 2024
064129a
Improve comments after f56468af8b3789d0e20be30715c20ac1bb367641
ambv Nov 23, 2024
ce332d9
Restore the Oxford comma
ambv Nov 23, 2024
d6d943f
Address remaining suggestions of Andrew Svetlov
ambv Nov 23, 2024
703ff46
Fix gather()
1st1 Nov 23, 2024
e867863
Replace lambda by closure
pablogsal Nov 26, 2024
9cb5b29
Let’s not emphasize *asyncio*
1st1 Nov 26, 2024
61b2b7b
Apply suggestions from Irit's review
ambv Nov 26, 2024
9533ab9
Address remaining review by Irit
ambv Nov 26, 2024
596191d
Test pure-Python and C-accelerated versions of future_add_to/future_d…
ambv Nov 26, 2024
ad9152e
fix blooper
ambv Nov 26, 2024
066bf21
Fix another blooper
ambv Nov 26, 2024
4caeec4
Fix crash
pablogsal Jan 21, 2025
38f061d
Merge remote-tracking branch 'upstream/main' into stack
pablogsal Jan 21, 2025
a8dd667
use private method for the policy
pablogsal Jan 22, 2025
cf8f5e5
Avoid importing typing
ambv Jan 22, 2025
eda9c7c
Remove debug printing from test_asyncio.test_graph
ambv Jan 22, 2025
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
Remove debug printing from test_asyncio.test_graph
  • Loading branch information
ambv committed Jan 22, 2025
commit eda9c7cb2ef3003e24fa65913750ede09ef7590c
3 changes: 0 additions & 3 deletions Lib/test/test_asyncio/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ async def main():
[]
])

from pprint import pprint
pprint(stack_for_gen_nested_call[1])

self.assertIn(
'async generator CallStackTestBase.test_stack_async_gen.<locals>.gen()',
stack_for_gen_nested_call[1])
Expand Down
Loading
0