Re: [PATCH] perf, tools: Stop perf stat -p when profiled process exits v3

2012-09-13 Thread Andi Kleen
> The is_alive function can be used by perf-top, perf-stat and perf-record > to know that its target has died so it can stop monitoring. Sorry that's to complicated and overengineered for me. My simple patch works for me at least. It's not solving world hunger, but it wasn't intended to do that.

Re: [PATCH] perf, tools: Stop perf stat -p when profiled process exits v3

2012-09-13 Thread David Ahern
On 9/13/12 9:58 AM, Andi Kleen wrote: From: Andi Kleen When counting a process with perf stat -p check if the process died and exit collection if yes. v2: Add more checks, handle non -p again. Handle /proc not there. v3: Handle multi pid case. Fix non /proc error path Signed-off-by: Andi Kleen

[PATCH] perf, tools: Stop perf stat -p when profiled process exits v3

2012-09-13 Thread Andi Kleen
From: Andi Kleen When counting a process with perf stat -p check if the process died and exit collection if yes. v2: Add more checks, handle non -p again. Handle /proc not there. v3: Handle multi pid case. Fix non /proc error path Signed-off-by: Andi Kleen --- tools/perf/builtin-stat.c | 14