-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
Open
Labels
topic-C-APItopic-profilingtype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
There is currently no way to be notified when tracing/profiling is enabled or disabled. This forces tools that want different behavior based on tracing/profiling enablement (e.g., JIT compilers) to poll on every function call, adding significant overhead.
PEP-523 established frame evaluation hooks as an officially supported extension point for JITs. However, JITs using this API have no efficient way to know when tracing/profiling is enabled and fall back to the interpreter.
I propose adding a small C API enhancement allowing callbacks to be registered when trace/profile functions are set or cleared.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
topic-C-APItopic-profilingtype-featureA feature request or enhancementA feature request or enhancement