Commit 2e69e25
Capture Python stacks for
Summary: Automatically capture Python function, file, and line frames for `cpp_pz2_events`. The weak-linked CPython 3.12/3.14 path uses the current attached interpreter state when the GIL is already held and conditionally calls `PyGILState_Ensure()` when the same Python-associated OS thread temporarily released it. Unrelated native threads retain the native C++ fallback without creating a Python thread state. The false-by-default `pai/cpp_zones:enable_cpp_pz_events_stacktrace_logging` knob gates all stack capture, non-Python binaries retain weak-link compatibility, and `zone_events` is unchanged.
Reviewed By: AndrewPardoe
Differential Revision: D116512939
fbshipit-source-id: c119557b651ab65aefd3c63e463c65a7935e3f47cpp_pz2_events
1 parent d84aa7e commit 2e69e25
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
0 commit comments