On Thu, 22 Jan 2015, Jiri Olsa wrote:

> > So what happens if you are using a signal handler to monitor a child and 
> > the child exits?
> 
> AFAICS wrt to SIGIO, we notify only with POLL_IN if there's new data
> and POLL_HUP if we reached the event_limit - the one you set with
> PERF_EVENT_IOC_REFRESH ioctl

I wrote a test for this: if you are monitoring another process with a 
SIGIO handler and the other process dies, then you get no signal for this 
at all, and in  fact depending on the timing the last valid SIGIO overflow 
event signal might get lost (in my test I usually get one fewer 
POLL_IN signal than I would get from the equivelent poll() code).

> I've actually never used the SIGIO interface in perf other than
> when I was checking your gi repo with test code ;-)

Yes, it seems that PAPI is really the only infrastructure that tries to do 
self-monitoring using the SIGIO interface.  Which shows, as it breaks now 
and then.  That was the whole reason I started writing my perf_event_test 
infrastructure in the first place.

Vince
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to