[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120913155218.GE4092@tassilo.jf.intel.com>
Date: Thu, 13 Sep 2012 08:52:18 -0700
From: Andi Kleen <ak@...ux.intel.com>
To: David Ahern <dsahern@...il.com>
Cc: Andi Kleen <andi@...stfloor.org>, acme@...stprotocols.net,
linux-kernel@...r.kernel.org
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists