Re: [PATCH] perf record: handle death by SIGTERM

2013-05-24 Thread David Ahern
On 5/24/13 3:08 AM, Jiri Olsa wrote: On Mon, May 06, 2013 at 12:24:23PM -0600, David Ahern wrote: perf data files cannot be processed until the header file is update which is done via an on_exit handler. If perf is killed due to a SIGTERM it does not run the on_exit hooks leaving the perf.data f

Re: [PATCH] perf record: handle death by SIGTERM

2013-05-24 Thread Jiri Olsa
On Mon, May 06, 2013 at 12:24:23PM -0600, David Ahern wrote: > perf data files cannot be processed until the header file is update > which is done via an on_exit handler. If perf is killed due to a SIGTERM > it does not run the on_exit hooks leaving the perf.data file in a > random state which perf

Re: [PATCH] perf record: handle death by SIGTERM

2013-05-08 Thread David Ahern
On 5/8/13 12:54 AM, Ingo Molnar wrote: * David Ahern wrote: On 5/7/13 12:29 AM, Ingo Molnar wrote: * Stephane Eranian wrote: This is a good fix. I have run into this infinite loop in perf report many times. Hm, perf record should really not assume much about the perf.data and should av

Re: [PATCH] perf record: handle death by SIGTERM

2013-05-07 Thread Ingo Molnar
* David Ahern wrote: > On 5/7/13 12:29 AM, Ingo Molnar wrote: > > > >* Stephane Eranian wrote: > > > >>This is a good fix. I have run into this infinite loop in perf report > >>many times. > > > >Hm, perf record should really not assume much about the perf.data and > >should avoid infinite loop

Re: [PATCH] perf record: handle death by SIGTERM

2013-05-07 Thread Namhyung Kim
Hi David, On Tue, 07 May 2013 14:56:17 -0600, David Ahern wrote: > On 5/7/13 12:29 AM, Ingo Molnar wrote: >> >> * Stephane Eranian wrote: >> >>> This is a good fix. I have run into this infinite loop in perf report >>> many times. >> >> Hm, perf record should really not assume much about the perf

Re: [PATCH] perf record: handle death by SIGTERM

2013-05-07 Thread David Ahern
On 5/7/13 12:29 AM, Ingo Molnar wrote: * Stephane Eranian wrote: This is a good fix. I have run into this infinite loop in perf report many times. Hm, perf record should really not assume much about the perf.data and should avoid infinite loops ... So while making perf.data more consistent

Re: [PATCH] perf record: handle death by SIGTERM

2013-05-06 Thread Ingo Molnar
* Stephane Eranian wrote: > This is a good fix. I have run into this infinite loop in perf report > many times. Hm, perf record should really not assume much about the perf.data and should avoid infinite loops ... So while making perf.data more consistent on SIGTERM is a nice fix, perf repo

Re: [PATCH] perf record: handle death by SIGTERM

2013-05-06 Thread David Ahern
On 5/6/13 4:40 PM, Stephane Eranian wrote: This is a good fix. I have run into this infinite loop in perf report many times. The perf_file_header could use an 'I am sane' bit which is only set when the file is closed properly. Perhaps we could overload the magic field like this: diff --git

Re: [PATCH] perf record: handle death by SIGTERM

2013-05-06 Thread Stephane Eranian
This is a good fix. I have run into this infinite loop in perf report many times. Thanks David. On Mon, May 6, 2013 at 8:24 PM, David Ahern wrote: > perf data files cannot be processed until the header file is update > which is done via an on_exit handler. If perf is killed due to a SIGTERM > it

Re: [PATCH] perf record: handle death by SIGTERM

2013-05-06 Thread David Ahern
On 5/6/13 12:24 PM, David Ahern wrote: perf data files cannot be processed until the header file is update yuk, that is supposed to say "until the header is updated" David which is done via an on_exit handler. If perf is killed due to a SIGTERM it does not run the on_exit hooks leaving the p

[PATCH] perf record: handle death by SIGTERM

2013-05-06 Thread David Ahern
perf data files cannot be processed until the header file is update which is done via an on_exit handler. If perf is killed due to a SIGTERM it does not run the on_exit hooks leaving the perf.data file in a random state which perf-report will happily spin on trying to read. As noted by Mike an easy