lkml.org 
[lkml]   [2012]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf, tools: Stop perf stat -p when profiled process exits v2
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/%d", atoi(target.pid));
>
> else path has piddir not set.

It doesn't need to be set for else?

> target.pid can have multiple pids in it, so this fails if a user
> specified -p pid1,pid2 -- it will only check if the first process
> died.

Ok. I suppose can make it simply not check for that case.

-Andi


\
 
 \ /
  Last update: 2012-09-13 18:41    [W:0.048 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site