> 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.
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
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
On Wed, Sep 12, 2012 at 08:54:18AM -0600, David Ahern wrote:
> On 9/12/12 8:40 AM, Andi Kleen wrote:
> >-while(!done) sleep(1);
> >+char piddir[40];
> >+if (target.pid && access("/proc", X_OK) == 0)
> >+snprintf(piddir, sizeof piddir, "/proc/%
On 9/12/12 8:40 AM, Andi Kleen wrote:
- while(!done) sleep(1);
+ char piddir[40];
+ if (target.pid && access("/proc", X_OK) == 0)
+ snprintf(piddir, sizeof piddir, "/proc/%d",
atoi(target.pid));
else path has piddir not set. Also
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.
Signed-off-by: Andi Kleen
---
tools/perf/builtin-stat.c | 10 +-
1 files changed, 9 insertions(+), 1 dele
Hi Andi,
On Tue, 11 Sep 2012 23:09:04 -0700, Andi Kleen wrote:
> From: Andi Kleen
>
> When counting a process with perf stat -p check if the process died
> and exit collection if yes.
I guess we need something similar for perf record as well.
>
> Signed-off-by: Andi Kleen
> ---
> tools/perf/b
From: Andi Kleen
When counting a process with perf stat -p check if the process died
and exit collection if yes.
Signed-off-by: Andi Kleen
---
tools/perf/builtin-stat.c |9 -
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/built
8 matches
Mail list logo