Re: perf: behavior of poll() changed in 3.18

2015-01-22 Thread Vince Weaver
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 >

Re: perf: behavior of poll() changed in 3.18

2015-01-22 Thread Jiri Olsa
On Thu, Jan 22, 2015 at 01:53:35AM -0500, Vince Weaver wrote: > On Wed, 21 Jan 2015, Jiri Olsa wrote: > > > > However if we revert this code, we'll loose nice (and standard) way > > to check if the event is still valid.. not sure how to handle this. > > there's likely no need to revert as my

Re: perf: behavior of poll() changed in 3.18

2015-01-22 Thread Jiri Olsa
On Thu, Jan 22, 2015 at 01:53:35AM -0500, Vince Weaver wrote: On Wed, 21 Jan 2015, Jiri Olsa wrote: However if we revert this code, we'll loose nice (and standard) way to check if the event is still valid.. not sure how to handle this. there's likely no need to revert as my code wasn't

Re: perf: behavior of poll() changed in 3.18

2015-01-22 Thread Vince Weaver
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

Re: perf: behavior of poll() changed in 3.18

2015-01-21 Thread Vince Weaver
On Wed, 21 Jan 2015, Jiri Olsa wrote: > > However if we revert this code, we'll loose nice (and standard) way > to check if the event is still valid.. not sure how to handle this. there's likely no need to revert as my code wasn't really released and I've already fixed it to work with the new

Re: perf: behavior of poll() changed in 3.18

2015-01-21 Thread Jiri Olsa
On Wed, Jan 21, 2015 at 01:06:30AM -0500, Vince Weaver wrote: > On Tue, 20 Jan 2015, Jiri Olsa wrote: > > > I made this change to get notification that monitored > > process exited. We use it in 'perf record' to find out > > that we have nothing more to monitor and quit. > > > > The logic is to

Re: perf: behavior of poll() changed in 3.18

2015-01-21 Thread Jiri Olsa
On Wed, Jan 21, 2015 at 01:06:30AM -0500, Vince Weaver wrote: On Tue, 20 Jan 2015, Jiri Olsa wrote: I made this change to get notification that monitored process exited. We use it in 'perf record' to find out that we have nothing more to monitor and quit. The logic is to return

Re: perf: behavior of poll() changed in 3.18

2015-01-21 Thread Vince Weaver
On Wed, 21 Jan 2015, Jiri Olsa wrote: However if we revert this code, we'll loose nice (and standard) way to check if the event is still valid.. not sure how to handle this. there's likely no need to revert as my code wasn't really released and I've already fixed it to work with the new

Re: perf: behavior of poll() changed in 3.18

2015-01-20 Thread Vince Weaver
On Tue, 20 Jan 2015, Jiri Olsa wrote: > I made this change to get notification that monitored > process exited. We use it in 'perf record' to find out > that we have nothing more to monitor and quit. > > The logic is to return POLLHUP (via poll syscall) when > the monitored process exits for

Re: perf: behavior of poll() changed in 3.18

2015-01-20 Thread Jiri Olsa
On Tue, Jan 20, 2015 at 12:03:19PM -0500, Vince Weaver wrote: > Hello > > Some of my code that used poll() on a perf_event fd broke sometime between > 3.17 and current. (My perf_event_test validation testsuite caught this > too but I haven't been running it as regularly as I should). > > I

perf: behavior of poll() changed in 3.18

2015-01-20 Thread Vince Weaver
Hello Some of my code that used poll() on a perf_event fd broke sometime between 3.17 and current. (My perf_event_test validation testsuite caught this too but I haven't been running it as regularly as I should). I bisected this to: commit 179033b3e064d2cd3f5f9945e76b0a0f0fbf4883

perf: behavior of poll() changed in 3.18

2015-01-20 Thread Vince Weaver
Hello Some of my code that used poll() on a perf_event fd broke sometime between 3.17 and current. (My perf_event_test validation testsuite caught this too but I haven't been running it as regularly as I should). I bisected this to: commit 179033b3e064d2cd3f5f9945e76b0a0f0fbf4883

Re: perf: behavior of poll() changed in 3.18

2015-01-20 Thread Jiri Olsa
On Tue, Jan 20, 2015 at 12:03:19PM -0500, Vince Weaver wrote: Hello Some of my code that used poll() on a perf_event fd broke sometime between 3.17 and current. (My perf_event_test validation testsuite caught this too but I haven't been running it as regularly as I should). I bisected

Re: perf: behavior of poll() changed in 3.18

2015-01-20 Thread Vince Weaver
On Tue, 20 Jan 2015, Jiri Olsa wrote: I made this change to get notification that monitored process exited. We use it in 'perf record' to find out that we have nothing more to monitor and quit. The logic is to return POLLHUP (via poll syscall) when the monitored process exits for the