Messages in this thread | | | Date | Tue, 4 Aug 2009 18:09:33 +0200 | Subject | Re: perf_counters issue with self-sampling threads | From | stephane eranian <> |
| |
On Tue, Jul 28, 2009 at 7:13 AM, stephane eranian<eranian@googlemail.com> wrote: > Andi, > > Looks like SIGPROF is calling _group_send_sig_info(), so I think it is > subject to the same problem. > I did not look into SIGPROF a bit more.
First, SIGPROF is generated from ITIMER_PROF. My understanding is that this is a global timer for the process. It may therefore fire in any thread. Then SIGPROF is pended to the shared signal queue as per the group_send_sig_info() code path. That means the thread receiving the signal may not be the one in which the timer expired. But typically things even out. But things change if the monitored process is using signal, and in particular signals pended to the private signal queue which is what happens with pthread_kill() I would think. Then, yes there may be an imbalance.
But in the case of SIGPROF, it is not clear to me if you want to change this behavior as well. It all depends on the definition for ITIMER_PROF.
| |