sys.is_stack_trampoline_active
Prev: sys.is_remote_debug_enabled | Up: sys | Next: sys.remote_exec
Rel: sys.activate_stack_trampoline, sys.addaudithook, sys.audit, sys.breakpointhook
Ref: docs.python.org — sys.is_stack_trampoline_active
Tags: #public #python3 #stdlib #sys
Import
import sys
from sys import is_stack_trampoline_active
Signature & Overview
sys.is_stack_trampoline_active()
Return True if a stack profiler trampoline is active.
Usage
import sys
# Linux + Python 3.12+: returns True when perf stack trampolines are active
assert hasattr(sys, "is_stack_trampoline_active")
Gotchas
- Requires Python 3.12+: Pairs with
activate_stack_trampoline()/deactivate_stack_trampoline().
REPL Inspect
from sys import is_stack_trampoline_active
help(is_stack_trampoline_active)
Linked from
Related notes
- tuts/python3/stdlib_module/sys/is_remote_debug_enabled Linked here; links to this page; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/remote_exec Linked here; links to this page; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/sys/activate_stack_trampoline Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/addaudithook Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/audit Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/breakpointhook Linked here; shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/call_tracing shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/deactivate_stack_trampoline shared tags: #stdlib, #sys
- tuts/python3/stdlib_module/sys/displayhook shared tags: #stdlib, #sys