-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Open
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)sprintstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Without too much effort (and negligible overhead in the profiler), we can add some useful additional functionality to the new sampling profiler:
- Show calls through native code in the collected stacks. Note that this doesn't show symbols for the native code itself (that's a much more invasive, fragile change). Rather we already have enough information when walking the Python stack to detect when we leave and reenter the interpreter (for example, by calling through a builtin function or C extension), and insert a dummy
<native>frame in the collected stack between the Python frames. - Even more usefully, we can show where/when garbage collections are occurring, and denote these with
<GC>dummy frames. Any Python code running in finalizers, GC callbacks, or weakref callbacks will be below these in the stack.
@pablogsal and I discussed this at the sprint, and he seemed excited for it. I implemented most of it there, and will open a PR shortly once I've cleaned things up a bit and added docs.
Linked PRs
pablogsal and dolfinuspablogsal and efimov-mikhail
Metadata
Metadata
Assignees
Labels
3.15new features, bugs and security fixesnew features, bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)sprintstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Projects
Status
Todo