diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2022-08-30 17:11:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-30 17:11:18 (GMT) |
commit | 6d791a97364b68d5f9c3514a0470aac487fc538d (patch) | |
tree | 745205d7e8698ea7398eb353311f55dc973507bf /Modules | |
parent | 0f733fffe8f4caaac3ce1b5306af86b42fb0c7fa (diff) | |
download | cpython-6d791a97364b68d5f9c3514a0470aac487fc538d.zip cpython-6d791a97364b68d5f9c3514a0470aac487fc538d.tar.gz cpython-6d791a97364b68d5f9c3514a0470aac487fc538d.tar.bz2 |
gh-96143: Allow Linux perf profiler to see Python calls (GH-96123)
:warning: :warning: Note for reviewers, hackers and fellow systems/low-level/compiler engineers :warning: :warning:
If you have a lot of experience with this kind of shenanigans and want to improve the **first** version, **please make a PR against my branch** or **reach out by email** or **suggest code changes directly on GitHub**.
If you have any **refinements or optimizations** please, wait until the first version is merged before starting hacking or proposing those so we can keep this PR productive.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/posixmodule.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index d45fa23..3810bc8 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -606,6 +606,11 @@ PyOS_AfterFork_Child(void) } assert(_PyThreadState_GET() == tstate); + status = _PyPerfTrampoline_AfterFork_Child(); + if (_PyStatus_EXCEPTION(status)) { + goto fatal_error; + } + run_at_forkers(tstate->interp->after_forkers_child, 0); return; |