[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SIGPROF + SIGCHLD and igc
From: |
Helmut Eller |
Subject: |
Re: SIGPROF + SIGCHLD and igc |
Date: |
Sun, 29 Dec 2024 19:50:09 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
On Fri, Dec 27 2024, Eli Zaretskii wrote:
[...]
> You are basically describing the way SIGPROF emulation is implemented
> on Windows (see w32proc.c for the details). But I don't understand
> why you need that pipe: doesn't pthreads allow one thread to stop the
> other? If so, just make the "profiler thread" stop the main thread
> instead of your step 2, and resume the main thread instead of your
> step 4. Am I missing something?
Here another observation: Let's assume that we can emulate SuspendThread
and ResumeThread on POSIX and MacOS (much like MPS does it). In the
profiler thread we can then simply do:
SuspendThread (<main-thread>)
get_backtrace ()
ResumeThread (<main-thread>)
without invoking any SIGPROF handler or the need for
ArenaEnter/ArenaLeave.
The only complication seems to be, that we must avoid deadlocks when MPS
tries to suspend a thread is already suspended by our emulation.
Helmut
- Re: SIGPROF + SIGCHLD and igc, (continued)
- Re: SIGPROF + SIGCHLD and igc, Eli Zaretskii, 2024/12/24
- Re: SIGPROF + SIGCHLD and igc, Gerd Möllmann, 2024/12/24
- Re: SIGPROF + SIGCHLD and igc, Helmut Eller, 2024/12/27
- Re: SIGPROF + SIGCHLD and igc, Eli Zaretskii, 2024/12/27
- Re: SIGPROF + SIGCHLD and igc, Helmut Eller, 2024/12/27
- Re: SIGPROF + SIGCHLD and igc, Eli Zaretskii, 2024/12/27
- Re: SIGPROF + SIGCHLD and igc, Pip Cet, 2024/12/27
- Re: SIGPROF + SIGCHLD and igc,
Helmut Eller <=
- Re: SIGPROF + SIGCHLD and igc, Eli Zaretskii, 2024/12/29
- Re: SIGPROF + SIGCHLD and igc, Helmut Eller, 2024/12/29
- Re: SIGPROF + SIGCHLD and igc, Eli Zaretskii, 2024/12/29
- Re: SIGPROF + SIGCHLD and igc, Helmut Eller, 2024/12/29
- Re: SIGPROF + SIGCHLD and igc, Gerd Möllmann, 2024/12/27
- Re: SIGPROF + SIGCHLD and igc, Helmut Eller, 2024/12/27
- Re: SIGPROF + SIGCHLD and igc, Gerd Möllmann, 2024/12/27
- Re: SIGPROF + SIGCHLD and igc, Pip Cet, 2024/12/27
- Re: SIGPROF + SIGCHLD and igc, Helmut Eller, 2024/12/27
- Re: SIGPROF + SIGCHLD and igc, Helmut Eller, 2024/12/28